public class CircleLayout extends java.lang.Object implements Layout
| Modifier and Type | Class and Description |
|---|---|
static class |
CircleLayout.CircleEdgeData |
static class |
CircleLayout.CircleVertexData |
static interface |
CircleLayout.LengthFunction
If the edge is weighted, then override this method to
show what the visualized length is.
|
class |
CircleLayout.SpringDimensionChecker |
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Dimension |
currentSize |
protected java.util.Set |
dontmove |
static CircleLayout.LengthFunction |
UNITLENGTHFUNCTION |
| Constructor and Description |
|---|
CircleLayout(Graph g)
Constructor for a SpringVisualizer for a raw graph with associated
dimension--the input knows how big the graph is.
|
| Modifier and Type | Method and Description |
|---|---|
void |
advancePositions()
Does nothing: this method is non-incremental.'
|
void |
advanceVisualization()
Relaxation step.
|
void |
applyFilter(Graph g)
Sets this filtered graph to be the applicable graph.
|
void |
forceMove(Vertex picked,
double x,
double y)
Forces a node to be moved to location x,y
|
protected java.util.Iterator |
getAllVertices() |
protected Vertex |
getAVertex(Edge e) |
CircleLayout.CircleVertexData |
getCircleData(Vertex v) |
java.lang.Object |
getCircleKey() |
java.awt.Dimension |
getCurrentSize()
Returns the current size of the visualization's space.
|
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.awt.geom.Point2D |
getLocation(Vertex v) |
CircleLayout.CircleEdgeData |
getSpringData(Edge e) |
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 |
getVertexIter() |
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()
Shouldn't be used.
|
void |
initialize(java.awt.Dimension d)
Initializes fields in the node that may not have
been set during the constructor.
|
boolean |
isIncremental()
Returns false.
|
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 |
resize(java.awt.Dimension size)
Resets the size of the visualization.
|
void |
restart()
Resets the vertex positions to their initial locations.
|
void |
unlockVertex(Vertex v)
Allows this vertex to be moved.
|
protected java.util.Set dontmove
protected java.awt.Dimension currentSize
public static final CircleLayout.LengthFunction UNITLENGTHFUNCTION
public CircleLayout(Graph g)
public java.lang.Object getCircleKey()
public java.awt.Dimension getCurrentSize()
LayoutgetCurrentSize in interface Layoutpublic Graph getGraph()
Layoutpublic java.lang.String getStatus()
Layoutpublic void initialize(java.awt.Dimension d)
Layoutinitialize in interface Layoutpublic void advanceVisualization()
public CircleLayout.CircleVertexData getCircleData(Vertex v)
public CircleLayout.CircleEdgeData getSpringData(Edge e)
public double getX(Vertex v)
Layoutpublic double getY(Vertex v)
Layoutpublic void resize(java.awt.Dimension size)
LayoutLayout l = new XXXLayout( g ) l.initialize(); l.resize( this.getSize() );
public void restart()
Layoutprotected java.util.Iterator getAllVertices()
public Vertex getVertex(double x, double y)
Layoutpublic Vertex getVertex(double x, double y, double maxDistance)
Layoutpublic void forceMove(Vertex picked, double x, double y)
Layoutpublic void lockVertex(Vertex v)
LayoutlockVertex in interface Layoutv - vertexLayout.unlockVertex(Vertex),
Layout.isLocked(Vertex)public void unlockVertex(Vertex v)
LayoutunlockVertex in interface Layoutv - vertexLayout.lockVertex(Vertex),
Layout.isLocked(Vertex)public boolean isLocked(Vertex v)
Layouttrue if the position of vertex v
is locked.isLocked in interface LayoutLayout.lockVertex(Vertex),
Layout.unlockVertex(Vertex)public void applyFilter(Graph g)
LayoutapplyFilter in interface Layoutg - a filtered graph that is a subgraph of the Graph returned by getGraphpublic java.util.Set getVisibleEdges()
LayoutgetVisibleEdges in interface Layoutpublic java.util.Set getVisibleVertices()
LayoutgetVisibleVertices in interface Layoutpublic java.util.Iterator getVertexIter()
public void advancePositions()
advancePositions in interface LayoutLayout.advancePositions()public boolean isIncremental()
isIncremental in interface LayoutLayout.isIncremental()public boolean incrementsAreDone()
incrementsAreDone in interface LayoutLayout.incrementsAreDone()public java.awt.geom.Point2D getLocation(Vertex v)
public java.awt.geom.Point2D getLocation(ArchetypeVertex v)
getLocation in interface LayoutgetLocation in interface VertexLocationFunctionpublic java.util.Iterator getVertexIterator()
getVertexIterator in interface VertexLocationFunction