com.tensegrity.gui.swt.graph
Class SwtGraphPanelLayoutObserver

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

public class SwtGraphPanelLayoutObserver
extends AbstractLayoutObserver

Instances of SwtGraphPanelLayoutObserver are used in order to manage redrawing for layout animation in the SWT context.

Typically an instance of this class must be added to the LayoutController by means of the LayoutController.addObserver(Observer) method before the layout is applied.

Version:
$Id: SwtGraphPanelLayoutObserver.java,v 1.8 2005/11/30 11:49:38 ArndHouben 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
SwtGraphPanelLayoutObserver(GraphPanel graphpanel)
           Initializes this SwtGraphPanelLayoutObserver instance with AbstractLayoutObserver.ADJUST_VIEWPORT_LEFTTOP viewports adjustment.
SwtGraphPanelLayoutObserver(GraphPanel graphpanel, int updatesteps)
           Initializes this SwtGraphPanelLayoutObserver instance with AbstractLayoutObserver.ADJUST_VIEWPORT_LEFTTOP viewports adjustment.
SwtGraphPanelLayoutObserver(GraphPanel graphpanel, int updatesteps, int viewportadjustment)
           Initializes this SwtGraphPanelLayoutObserver instance.
 
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

SwtGraphPanelLayoutObserver

public SwtGraphPanelLayoutObserver(GraphPanel graphpanel)

Initializes this SwtGraphPanelLayoutObserver instance with AbstractLayoutObserver.ADJUST_VIEWPORT_LEFTTOP viewports adjustment.

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

SwtGraphPanelLayoutObserver

public SwtGraphPanelLayoutObserver(GraphPanel graphpanel,
                                   int updatesteps)

Initializes this SwtGraphPanelLayoutObserver instance with AbstractLayoutObserver.ADJUST_VIEWPORT_LEFTTOP viewports adjustment.

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

SwtGraphPanelLayoutObserver

public SwtGraphPanelLayoutObserver(GraphPanel graphpanel,
                                   int updatesteps,
                                   int viewportadjustment)

Initializes this SwtGraphPanelLayoutObserver instance.

Parameters:
graphpanel - the graph panel to update during the layout.
updatesteps - repaint only every updatesteps.
viewportadjustment - constant that defines the view's viewport. One of AbstractLayoutObserver.ADJUST_VIEWPORT_LEFTTOP or AbstractLayoutObserver.ADJUST_VIEWPORT_ACCORDING_TO_GRAPH
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.