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()
Layout
getCurrentSize
in interface Layout
Layout.getCurrentSize()
public void initialize(java.awt.Dimension d)
initialize
in interface Layout
public java.lang.String getStatus()
Layout
public java.util.Set getVisibleEdges()
getVisibleEdges
in interface Layout
Layout.getVisibleEdges()
public Graph getGraph()
getGraph
in interface Layout
Layout.getGraph()
public Vertex getVertex(double x, double y)
Layout
getVertex
in interface Layout
x
- The x coordinate of the inputy
- The y coordinate of the inputLayout.getVertex(double, double)
public Vertex getVertex(double x, double y, double maxDistance)
Layout
getVertex
in interface Layout
x
- 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()
tick
advancePositions
in interface Layout
Layout.advancePositions()
protected void tick()
getMaxLevel()
, and then moved
outward.public java.lang.Object getFadingKey()
public void applyFilter(Graph g_int)
applyFilter
in interface Layout
g_int
- a filtered graph that is a subgraph of the Graph returned by getGraph
Layout.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 Layout
Layout.resize(java.awt.Dimension)
public void restart()
restart
in interface Layout
Layout.restart()
public double getX(Vertex vert)
getX
in interface Layout
vert
- The vertex being examinedLayout.getX(edu.uci.ics.jung.graph.Vertex)
public double getY(Vertex vert)
getY
in interface Layout
vert
- 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 Layout
Layout.getVisibleVertices()
public int getFadeLevel(Vertex v)
v
- public boolean isHidden(Vertex v)
v
- public void lockVertex(Vertex vert)
lockVertex
in interface Layout
vert
- vertexLayout.lockVertex(edu.uci.ics.jung.graph.Vertex)
public void unlockVertex(Vertex vert)
unlockVertex
in interface Layout
vert
- vertexLayout.unlockVertex(edu.uci.ics.jung.graph.Vertex)
public boolean isLocked(Vertex v)
isLocked
in interface Layout
Layout.isLocked(Vertex)
public void forceMove(Vertex picked, double x, double y)
public int getMaxLevel()
public boolean isIncremental()
isIncremental
in interface Layout
Layout.isIncremental()
public boolean incrementsAreDone()
incrementsAreDone
in interface Layout
Layout.incrementsAreDone()
public Layout getGraphLayout()
public java.awt.geom.Point2D getLocation(ArchetypeVertex v)
getLocation
in interface Layout
getLocation
in interface VertexLocationFunction
public java.util.Iterator getVertexIterator()
getVertexIterator
in interface VertexLocationFunction