|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.ics.jung.visualization.LayoutDecorator
public abstract class LayoutDecorator
a pure decorator for the Layout interface. Intended to be overridden to provide specific behavior decoration
PersistentLayoutImpl| Field Summary | |
|---|---|
protected ChangeEventSupport |
changeSupport
|
protected Layout |
delegate
|
| Constructor Summary | |
|---|---|
LayoutDecorator(Layout delegate)
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(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 |
ChangeListener[] |
getChangeListeners()
Returns an array of all the ChangeListeners added
with addChangeListener(). |
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. |
Point2D |
getLocation(ArchetypeVertex v)
|
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. |
Iterator |
getVertexIterator()
|
Set |
getVisibleEdges()
Returns all currently showing edges |
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(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(ChangeListener l)
Removes a ChangeListener. |
void |
resize(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Layout delegate
protected ChangeEventSupport changeSupport
| Constructor Detail |
|---|
public LayoutDecorator(Layout delegate)
| Method Detail |
|---|
public Layout getDelegate()
public void setDelegate(Layout delegate)
delegate - the new delegatepublic void advancePositions()
Layout
advancePositions in interface LayoutLayout.advancePositions()public void applyFilter(Graph subgraph)
Layout
applyFilter 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)
Layout
forceMove in interface LayoutLayout.forceMove(edu.uci.ics.jung.graph.Vertex, double, double)public Dimension getCurrentSize()
Layout
getCurrentSize in interface LayoutLayout.getCurrentSize()public Graph getGraph()
Layout
getGraph in interface LayoutLayout.getGraph()public Point2D getLocation(ArchetypeVertex v)
getLocation in interface LayoutgetLocation in interface VertexLocationFunctionLayout.getLocation(edu.uci.ics.jung.graph.ArchetypeVertex)public String getStatus()
Layout
getStatus in interface LayoutLayout.getStatus()
public Vertex getVertex(double x,
double y,
double maxDistance)
Layout
getVertex 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)
Layout
getVertex in interface Layoutx - The x coordinate of the inputy - The y coordinate of the input
Layout.getVertex(double, double)public Iterator getVertexIterator()
getVertexIterator in interface VertexLocationFunctionVertexLocationFunction.getVertexIterator()public Set getVisibleEdges()
Layout
getVisibleEdges in interface LayoutLayout.getVisibleEdges()public Set getVisibleVertices()
Layout
getVisibleVertices in interface LayoutLayout.getVisibleVertices()public double getX(Vertex v)
Layout
getX in interface Layoutv - The vertex being examined
Layout.getX(edu.uci.ics.jung.graph.Vertex)public double getY(Vertex v)
Layout
getY in interface Layoutv - The vertex being examined
Layout.getY(edu.uci.ics.jung.graph.Vertex)public boolean incrementsAreDone()
Layout
incrementsAreDone in interface LayoutLayout.incrementsAreDone()public void initialize(Dimension currentSize)
Layout
initialize in interface LayoutLayout.initialize(java.awt.Dimension)public boolean isIncremental()
Layout
isIncremental in interface LayoutLayout.isIncremental()public void lockVertex(Vertex v)
Layout
lockVertex 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(Dimension d)
LayoutLayout l = new XXXLayout( g ) l.initialize(); l.resize( this.getSize() );
resize in interface LayoutLayout.resize(java.awt.Dimension)public void restart()
Layout
restart in interface LayoutLayout.restart()public void unlockVertex(Vertex v)
Layout
unlockVertex in interface Layoutv - vertexLayout.unlockVertex(edu.uci.ics.jung.graph.Vertex)public void addChangeListener(ChangeListener l)
addChangeListener in interface ChangeEventSupportpublic void removeChangeListener(ChangeListener l)
ChangeEventSupport
removeChangeListener in interface ChangeEventSupportl - the listener to be removedpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||