public abstract class LayoutDecorator extends java.lang.Object implements Layout, ChangeEventSupport
PersistentLayoutImpl| Modifier and Type | Field and Description |
|---|---|
protected ChangeEventSupport |
changeSupport |
protected Layout |
delegate |
| Constructor and Description |
|---|
LayoutDecorator(Layout delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l) |
void |
advancePositions()
Advances an incremental visualization.
|
void |
applyFilter(Graph subgraph)
Sets this filtered graph to be the applicable graph.
|
void |
fireStateChanged() |
void |
forceMove(Vertex picked,
double x,
double y)
Forces a node to be moved to location x,y
|
javax.swing.event.ChangeListener[] |
getChangeListeners()
Returns an array of all the
ChangeListeners added
with addChangeListener(). |
java.awt.Dimension |
getCurrentSize()
Returns the current size of the visualization's space.
|
Layout |
getDelegate()
getter for the delegate
|
Graph |
getGraph()
Returns the full graph (the one that was passed in at
construction time) that this Layout refers to.
|
java.awt.geom.Point2D |
getLocation(ArchetypeVertex v) |
java.lang.String |
getStatus()
Returns the current status of the sytem, or null if there
is no particular status to report.
|
Vertex |
getVertex(double x,
double y)
Finds the closest vertex to an input (x,y) coordinate.
|
Vertex |
getVertex(double x,
double y,
double maxDistance)
Finds the closest vertex to an input (x,y) coordinate.
|
java.util.Iterator |
getVertexIterator() |
java.util.Set |
getVisibleEdges()
Returns all currently showing edges
|
java.util.Set |
getVisibleVertices()
Returns all currently visible vertices
|
double |
getX(Vertex v)
Returns the x coordinate of vertex v at this stage in the
iteration.
|
double |
getY(Vertex v)
Returns the y coordinate of vertex v at this stage in the
iteration.
|
boolean |
incrementsAreDone()
If this visualization is incremental, tells whether it has
stabilized at a satisfactory spot yet.
|
void |
initialize(java.awt.Dimension currentSize)
Initializes fields in the node that may not have
been set during the constructor.
|
boolean |
isIncremental()
Indicates whether this visualization has an incremental mode.
|
boolean |
isLocked(Vertex v)
Returns
true if the position of vertex v
is locked. |
void |
lockVertex(Vertex v)
Sets a flag which fixes this vertex in place.
|
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener.
|
void |
resize(java.awt.Dimension d)
Resets the size of the visualization.
|
void |
restart()
Resets the vertex positions to their initial locations.
|
void |
setDelegate(Layout delegate)
setter for the delegate
|
void |
unlockVertex(Vertex v)
Allows this vertex to be moved.
|
protected Layout delegate
protected ChangeEventSupport changeSupport
public LayoutDecorator(Layout delegate)
public Layout getDelegate()
public void setDelegate(Layout delegate)
delegate - the new delegatepublic void advancePositions()
LayoutadvancePositions in interface LayoutLayout.advancePositions()public void applyFilter(Graph subgraph)
LayoutapplyFilter in interface Layoutsubgraph - a filtered graph that is a subgraph of the Graph returned by getGraphLayout.applyFilter(edu.uci.ics.jung.graph.Graph)public void forceMove(Vertex picked, double x, double y)
LayoutforceMove in interface LayoutLayout.forceMove(edu.uci.ics.jung.graph.Vertex, double, double)public java.awt.Dimension getCurrentSize()
LayoutgetCurrentSize in interface LayoutLayout.getCurrentSize()public Graph getGraph()
LayoutgetGraph in interface LayoutLayout.getGraph()public java.awt.geom.Point2D getLocation(ArchetypeVertex v)
getLocation in interface LayoutgetLocation in interface VertexLocationFunctionLayout.getLocation(edu.uci.ics.jung.graph.ArchetypeVertex)public java.lang.String getStatus()
LayoutgetStatus in interface LayoutLayout.getStatus()public Vertex getVertex(double x, double y, double maxDistance)
LayoutgetVertex in interface Layoutx - The x coordinate of the inputy - The y coordinate of the inputmaxDistance - The maximum acceptable distance. Beyond this, vertices are ignored.Layout.getVertex(double, double, double)public Vertex getVertex(double x, double y)
LayoutgetVertex in interface Layoutx - The x coordinate of the inputy - The y coordinate of the inputLayout.getVertex(double, double)public java.util.Iterator getVertexIterator()
getVertexIterator in interface VertexLocationFunctionVertexLocationFunction.getVertexIterator()public java.util.Set getVisibleEdges()
LayoutgetVisibleEdges in interface LayoutLayout.getVisibleEdges()public java.util.Set getVisibleVertices()
LayoutgetVisibleVertices in interface LayoutLayout.getVisibleVertices()public double getX(Vertex v)
LayoutgetX in interface Layoutv - The vertex being examinedLayout.getX(edu.uci.ics.jung.graph.Vertex)public double getY(Vertex v)
LayoutgetY in interface Layoutv - The vertex being examinedLayout.getY(edu.uci.ics.jung.graph.Vertex)public boolean incrementsAreDone()
LayoutincrementsAreDone in interface LayoutLayout.incrementsAreDone()public void initialize(java.awt.Dimension currentSize)
Layoutinitialize in interface LayoutLayout.initialize(java.awt.Dimension)public boolean isIncremental()
LayoutisIncremental in interface LayoutLayout.isIncremental()public void lockVertex(Vertex v)
LayoutlockVertex in interface Layoutv - vertexLayout.lockVertex(edu.uci.ics.jung.graph.Vertex)public boolean isLocked(Vertex v)
Layouttrue if the position of vertex v
is locked.isLocked in interface LayoutLayout.isLocked(Vertex)public void resize(java.awt.Dimension d)
LayoutLayout l = new XXXLayout( g ) l.initialize(); l.resize( this.getSize() );
resize in interface LayoutLayout.resize(java.awt.Dimension)public void restart()
Layoutrestart in interface LayoutLayout.restart()public void unlockVertex(Vertex v)
LayoutunlockVertex in interface Layoutv - vertexLayout.unlockVertex(edu.uci.ics.jung.graph.Vertex)public void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener in interface ChangeEventSupportpublic void removeChangeListener(javax.swing.event.ChangeListener l)
ChangeEventSupportremoveChangeListener in interface ChangeEventSupportl - the listener to be removedpublic javax.swing.event.ChangeListener[] getChangeListeners()
ChangeEventSupportChangeListeners added
with addChangeListener().getChangeListeners in interface ChangeEventSupportChangeListeners added or an empty
array if no listeners have been addedpublic void fireStateChanged()
fireStateChanged in interface ChangeEventSupport