Package diva.graph.layout
Class ProxyIncrLayout
- java.lang.Object
-
- diva.graph.layout.ProxyIncrLayout
-
- All Implemented Interfaces:
GlobalLayout
,IncrementalLayout
public class ProxyIncrLayout extends java.lang.Object implements IncrementalLayout
A proxy layout which forwards all events to a given incremental layout delegate. This class implements the proxy design pattern, hence its name. It is a useful base class for building layouts that know how to do a certain specific task, but want to delegate work to a more general layout for the cases that it doesn't know how to deal with.- Version:
- $Id$
- Author:
- Michael Shilman
- Pt.AcceptedRating:
- Red
-
-
Constructor Summary
Constructors Constructor Description ProxyIncrLayout(IncrementalLayout delegate)
Construct the proxy with the given target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
edgeDrawn(java.lang.Object edge)
Called in response to the given edge being given a figure.void
edgeRouted(java.lang.Object edge)
Called in response to the connector representing the given edge being rereouted.LayoutTarget
getLayoutTarget()
Return the layout target.void
layout(java.lang.Object composite)
Layout the graph model in the viewport specified by the layout target environment.void
nodeDrawn(java.lang.Object node)
Called in response to the given node being given a figure.void
nodeMoved(java.lang.Object node)
Called in response to the figure representing the given node being moved.void
setLayoutTarget(LayoutTarget target)
Set the layout target.
-
-
-
Constructor Detail
-
ProxyIncrLayout
public ProxyIncrLayout(IncrementalLayout delegate)
Construct the proxy with the given target.
-
-
Method Detail
-
edgeDrawn
public void edgeDrawn(java.lang.Object edge)
Called in response to the given edge being given a figure.- Specified by:
edgeDrawn
in interfaceIncrementalLayout
-
edgeRouted
public void edgeRouted(java.lang.Object edge)
Called in response to the connector representing the given edge being rereouted.- Specified by:
edgeRouted
in interfaceIncrementalLayout
-
nodeDrawn
public void nodeDrawn(java.lang.Object node)
Called in response to the given node being given a figure.- Specified by:
nodeDrawn
in interfaceIncrementalLayout
-
nodeMoved
public void nodeMoved(java.lang.Object node)
Called in response to the figure representing the given node being moved.- Specified by:
nodeMoved
in interfaceIncrementalLayout
-
getLayoutTarget
public LayoutTarget getLayoutTarget()
Return the layout target.- Specified by:
getLayoutTarget
in interfaceGlobalLayout
-
setLayoutTarget
public void setLayoutTarget(LayoutTarget target)
Set the layout target.- Specified by:
setLayoutTarget
in interfaceGlobalLayout
-
layout
public void layout(java.lang.Object composite)
Layout the graph model in the viewport specified by the layout target environment.- Specified by:
layout
in interfaceGlobalLayout
-
-