com.tensegrity.gui.swing.graph
Class SwingGraphPanelLayoutObserver

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

public class SwingGraphPanelLayoutObserver
extends AbstractLayoutObserver

This class manages redrawing for layout animation. It should be used in the case where the associated GraphPanel is not embeded within the skeleton application framework.

It is used by the GraphLayoutDialog and in other places where graph-layout is initiated.

Version:
$Id: SwingGraphPanelLayoutObserver.java,v 1.3 2004/10/12 14:42:26 MichaelKegel Exp $
Author:
S�bastien Guyon

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
SwingGraphPanelLayoutObserver(GraphPanel graphpanel)
           Initializes this SimpleSwingLayoutObserver instance.
SwingGraphPanelLayoutObserver(GraphPanel graphpanel, int updatesteps)
           Initializes this SimpleSwingLayoutObserver instance.
SwingGraphPanelLayoutObserver(GraphPanel graphpanel, int updatesteps, int viewportadjustment)
          Constructs a SwingGraphPanelLayoutObserver instance associated with the given GraphPanel 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

SwingGraphPanelLayoutObserver

public SwingGraphPanelLayoutObserver(GraphPanel graphpanel)

Initializes this SimpleSwingLayoutObserver instance.

Parameters:
graphpanel - the graph panel to update during the layout.

SwingGraphPanelLayoutObserver

public SwingGraphPanelLayoutObserver(GraphPanel graphpanel,
                                     int updatesteps)

Initializes this SimpleSwingLayoutObserver instance.

Parameters:
graphpanel - the graph panel to update during the layout.
updatesteps - repaint only every updatesteps.

SwingGraphPanelLayoutObserver

public SwingGraphPanelLayoutObserver(GraphPanel graphpanel,
                                     int updatesteps,
                                     int viewportadjustment)
Constructs a SwingGraphPanelLayoutObserver instance associated with the given GraphPanel reference for managing repainting during layout animation.

Parameters:
graphpanel - the graph panel to update during the layout
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.