com.tensegrity.gui.swing.graph
Class LayoutObserver

java.lang.Object
  extended bycom.tensegrity.gui.swing.graph.AbstractLayoutObserver
      extended bycom.tensegrity.gui.swing.graph.LayoutObserver
All Implemented Interfaces:
Observer

public class LayoutObserver
extends AbstractLayoutObserver

This class manages redrawing for layout animation. It is used by the GraphLayoutDialog and in other places where graph-layout is initiated.

Version:
$Id: LayoutObserver.java,v 1.24 2006/05/23 10:20:15 MichaelKegel Exp $
Author:
Stepan Rutz

Field Summary
 
Fields inherited from class com.tensegrity.gui.swing.graph.AbstractLayoutObserver
ADJUST_VIEWPORT_ACCORDING_TO_GRAPH, ADJUST_VIEWPORT_LEFTTOP, stepcounter, suppressFilling, suppressNavigatorAnimation, suppressText, suppressZoomToFit, updatesteps, viewportadjustment
 
Constructor Summary
LayoutObserver(GraphApplication graphapplication, NavigatorPanel navigatorpanel)
          Constructs a layout observer instance associated with the given graphframe reference for managing repainting during layout animation.
LayoutObserver(GraphApplication graphapplication, NavigatorPanel navigatorpanel, int updatesteps)
          Constructs a layout observer instance associated with the given graphframe reference for managing repainting during layout animation.
LayoutObserver(GraphApplication graphapplication, NavigatorPanel navigatorpanel, int updatesteps, int viewportadjustment)
          Constructs a layout observer instance associated with the given graphframe reference for managing repainting during layout animation.
 
Method Summary
 void update(Observable observable, java.lang.Object arg)
          This callback is invoked if the layoutservice returned STATUS_PARTIAL.
 
Methods inherited from class com.tensegrity.gui.swing.graph.AbstractLayoutObserver
getSuppressFilling, getSuppressNavigatorAnimation, getSuppressText, getSuppressZoomToFit, prepare, setSuppressFilling, setSuppressNavigatorAnimation, setSuppressText, setSuppressZoomToFit, unprepare, updateVisualGraphView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutObserver

public LayoutObserver(GraphApplication graphapplication,
                      NavigatorPanel navigatorpanel)
Constructs a layout observer instance associated with the given graphframe reference for managing repainting during layout animation.

Parameters:
graphapplication - reference to the application.
navigatorpanel - the panel holding the navigator (may be null).

LayoutObserver

public LayoutObserver(GraphApplication graphapplication,
                      NavigatorPanel navigatorpanel,
                      int updatesteps)
Constructs a layout observer instance associated with the given graphframe reference for managing repainting during layout animation.

Parameters:
graphapplication - reference to the application.
navigatorpanel - the panel holding the navigator (may be null).
updatesteps - repaint only every updatesteps.

LayoutObserver

public LayoutObserver(GraphApplication graphapplication,
                      NavigatorPanel navigatorpanel,
                      int updatesteps,
                      int viewportadjustment)
Constructs a layout observer instance associated with the given graphframe reference for managing repainting during layout animation.

Parameters:
graphapplication - reference to the application.
navigatorpanel - the panel holding the navigator (may be null).
updatesteps - repaint only every updatesteps.
viewportadjustment - constant that defines the view's viewport adjustment mode
Method Detail

update

public void update(Observable observable,
                   java.lang.Object arg)
This callback is invoked if the layoutservice returned STATUS_PARTIAL. It is used to repaint the graph

Parameters:
observable - the source of the call.
arg - additional information.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.