public class FadingVertexLayout extends java.lang.Object implements Layout
In order to use this class, create a FadingNodeLayout that takes as an arguemnt the Layout you actually wish to use:
Layout v= new FadingNodeLayout( 10, new SpringLayout( g ));
In order to operate, this implementation tracks the vertices that
are visible before and after each call to applyFilte.
In this documentaiton, code that is labelled as a passthrough has no functionality except to pass the data through to the contained layout.
Be sure to use a _Renderer that knows to pay attention to the Fading information. In particular, it must know that the FADINGNODEVIZ field gives information about the fade level.
| Modifier and Type | Class and Description |
|---|---|
class |
FadingVertexLayout.FadingVertexLayoutData
Deprecated.
|
| Constructor and Description |
|---|
FadingVertexLayout(int fadelevels,
Layout layout)
Deprecated.
Adds user data to every vertex in the graph.
|
| Modifier and Type | Method and Description |
|---|---|
void |
advancePositions()
Deprecated.
In addition to being a passthrough, this also advances
the fade function by calling
tick |
void |
applyFilter(Graph g_int)
Deprecated.
Tracks the changes in the set of visible vertices from the set of
actual vertices.
|
void |
forceMove(Vertex picked,
double x,
double y)
Deprecated.
Simply passes through the vertex.
|
java.awt.Dimension |
getCurrentSize()
Deprecated.
Returns the current size of the visualization's space.
|
int |
getFadeLevel(Vertex v)
Deprecated.
Static utility function returns the fade level of a
given vertex.
|
java.lang.Object |
getFadingKey()
Deprecated.
|
Graph |
getGraph()
Deprecated.
A pass-through.
|
Layout |
getGraphLayout()
Deprecated.
|
java.awt.geom.Point2D |
getLocation(ArchetypeVertex v)
Deprecated.
|
int |
getMaxLevel()
Deprecated.
Returns the number of levels that vertices fade through.
|
java.lang.String |
getStatus()
Deprecated.
Returns the current status of the sytem, or null if there
is no particular status to report.
|
Vertex |
getVertex(double x,
double y)
Deprecated.
Use PickSupport instead
A pass-through.
|
Vertex |
getVertex(double x,
double y,
double maxDistance)
Deprecated.
Use PickSupport instead
A pass-through.
|
java.util.Iterator |
getVertexIterator()
Deprecated.
|
java.util.Set |
getVisibleEdges()
Deprecated.
Returns *all* edges.
|
java.util.Set |
getVisibleVertices()
Deprecated.
Returns both the visible and the hidden vertices.
|
double |
getX(Vertex vert)
Deprecated.
Passthrough.
|
double |
getY(Vertex vert)
Deprecated.
Passthrough.
|
boolean |
incrementsAreDone()
Deprecated.
Passthrough.
|
void |
initialize(java.awt.Dimension d)
Deprecated.
A pass-through to the contained Layout
|
boolean |
isHidden(Vertex v)
Deprecated.
Static utility function returns the fade level of a
given vertex.
|
boolean |
isIncremental()
Deprecated.
Passthrough.
|
boolean |
isLocked(Vertex v)
Deprecated.
Passthrough.
|
void |
lockVertex(Vertex vert)
Deprecated.
Passthrough.
|
protected void |
moveOutward(Vertex vert,
double x,
double y,
double speed)
Deprecated.
Moves a vertex outward, toward the outer edge of the screen
by calling
forceMove on the vertex. |
protected void |
moveVertexPrettily(Vertex vert)
Deprecated.
This code is called when a Vertex is being brought
back onto the page.
|
void |
resize(java.awt.Dimension d)
Deprecated.
Passthrough.
|
void |
restart()
Deprecated.
Passthrough.
|
protected void |
tick()
Deprecated.
This method advances each node that is fading away.
|
void |
unlockVertex(Vertex vert)
Deprecated.
Passthrough.
|
public FadingVertexLayout(int fadelevels,
Layout layout)
fadelevels - The number of levels through which
a vertex should fade once it is removed.l - The layout that is responsible for
fading the information.public java.awt.Dimension getCurrentSize()
LayoutgetCurrentSize in interface LayoutLayout.getCurrentSize()public void initialize(java.awt.Dimension d)
initialize in interface Layoutpublic java.lang.String getStatus()
Layoutpublic java.util.Set getVisibleEdges()
getVisibleEdges in interface LayoutLayout.getVisibleEdges()public Graph getGraph()
getGraph in interface LayoutLayout.getGraph()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 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 void advancePositions()
tickadvancePositions in interface LayoutLayout.advancePositions()protected void tick()
getMaxLevel(), and then moved
outward.public java.lang.Object getFadingKey()
public void applyFilter(Graph g_int)
applyFilter in interface Layoutg_int - a filtered graph that is a subgraph of the Graph returned by getGraphLayout.applyFilter(edu.uci.ics.jung.graph.Graph)protected void moveVertexPrettily(Vertex vert)
vert - protected void moveOutward(Vertex vert, double x, double y, double speed)
forceMove on the vertex.vert - x - The desired origin X coordinatey - The desired origin Y coordinatespeed - The speed with which the vertex moves outwardpublic void resize(java.awt.Dimension d)
resize in interface LayoutLayout.resize(java.awt.Dimension)public void restart()
restart in interface LayoutLayout.restart()public double getX(Vertex vert)
getX in interface Layoutvert - The vertex being examinedLayout.getX(edu.uci.ics.jung.graph.Vertex)public double getY(Vertex vert)
getY in interface Layoutvert - The vertex being examinedLayout.getX(edu.uci.ics.jung.graph.Vertex)public java.util.Set getVisibleVertices()
getVisibleVertices. Where usually only visible
vertices would be passed, this function also passes the
hidden ones, and counts on the _Renderer (or other calling
client) to know what to do with it appropriately. This is done
in order to ensure that fading vertices are still shown.getVisibleVertices in interface LayoutLayout.getVisibleVertices()public int getFadeLevel(Vertex v)
v - public boolean isHidden(Vertex v)
v - public void lockVertex(Vertex vert)
lockVertex in interface Layoutvert - vertexLayout.lockVertex(edu.uci.ics.jung.graph.Vertex)public void unlockVertex(Vertex vert)
unlockVertex in interface Layoutvert - vertexLayout.unlockVertex(edu.uci.ics.jung.graph.Vertex)public boolean isLocked(Vertex v)
isLocked in interface LayoutLayout.isLocked(Vertex)public void forceMove(Vertex picked, double x, double y)
public int getMaxLevel()
public boolean isIncremental()
isIncremental in interface LayoutLayout.isIncremental()public boolean incrementsAreDone()
incrementsAreDone in interface LayoutLayout.incrementsAreDone()public Layout getGraphLayout()
public java.awt.geom.Point2D getLocation(ArchetypeVertex v)
getLocation in interface LayoutgetLocation in interface VertexLocationFunctionpublic java.util.Iterator getVertexIterator()
getVertexIterator in interface VertexLocationFunction