Package diva.graph.layout
Class IncrLayoutAdapter
- java.lang.Object
-
- diva.graph.layout.IncrLayoutAdapter
-
- All Implemented Interfaces:
GlobalLayout,IncrementalLayout
public class IncrLayoutAdapter extends java.lang.Object implements IncrementalLayout
An adapter to make global layouts incremental. This class just calls a global layout on every change to the graph.- Version:
- $Id$
- Author:
- Michael Shilman
- Pt.AcceptedRating:
- Red
-
-
Constructor Summary
Constructors Constructor Description IncrLayoutAdapter(GlobalLayout global)Construct a new adapter that uses the given global layout for every change in the graph, and operates within the context of the given layout target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidedgeDrawn(java.lang.Object edge)Called in response to the edge head being changed.voidedgeRouted(java.lang.Object edge)Called in response to the edge tail being changed.LayoutTargetgetLayoutTarget()Return the layout target.voidlayout(java.lang.Object composite)Call the global layout on the graph.voidnodeDrawn(java.lang.Object node)Called in response to the given node being added.voidnodeMoved(java.lang.Object node)Called in response to the given node being moved.voidsetLayoutTarget(LayoutTarget target)Set the layout target.
-
-
-
Constructor Detail
-
IncrLayoutAdapter
public IncrLayoutAdapter(GlobalLayout global)
Construct a new adapter that uses the given global layout for every change in the graph, and operates within the context of the given layout target.
-
-
Method Detail
-
nodeDrawn
public void nodeDrawn(java.lang.Object node)
Called in response to the given node being added.- Specified by:
nodeDrawnin interfaceIncrementalLayout
-
nodeMoved
public void nodeMoved(java.lang.Object node)
Called in response to the given node being moved.- Specified by:
nodeMovedin interfaceIncrementalLayout
-
edgeDrawn
public void edgeDrawn(java.lang.Object edge)
Called in response to the edge head being changed.- Specified by:
edgeDrawnin interfaceIncrementalLayout
-
edgeRouted
public void edgeRouted(java.lang.Object edge)
Called in response to the edge tail being changed.- Specified by:
edgeRoutedin interfaceIncrementalLayout
-
getLayoutTarget
public LayoutTarget getLayoutTarget()
Return the layout target.- Specified by:
getLayoutTargetin interfaceGlobalLayout
-
setLayoutTarget
public void setLayoutTarget(LayoutTarget target)
Set the layout target.- Specified by:
setLayoutTargetin interfaceGlobalLayout
-
layout
public void layout(java.lang.Object composite)
Call the global layout on the graph.- Specified by:
layoutin interfaceGlobalLayout
-
-