|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.visualization.FadingVertexLayout
public class FadingVertexLayout
Implements a pass-through visaulizer that fades out nodes that have been removed, and fades in nodes that have appeared. Adds a field FADINGNODEVIZ to the nodes, which directs the _Renderer to view those nodes as faded.
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.
Nested Class Summary | |
---|---|
class |
FadingVertexLayout.FadingVertexLayoutData
Deprecated. |
Constructor Summary | |
---|---|
FadingVertexLayout(int fadelevels,
Layout layout)
Deprecated. Adds user data to every vertex in the graph. |
Method Summary | |
---|---|
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. |
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. |
Object |
getFadingKey()
Deprecated. |
Graph |
getGraph()
Deprecated. A pass-through. |
Layout |
getGraphLayout()
Deprecated. |
Point2D |
getLocation(ArchetypeVertex v)
Deprecated. |
int |
getMaxLevel()
Deprecated. Returns the number of levels that vertices fade through. |
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. |
Iterator |
getVertexIterator()
Deprecated. |
Set |
getVisibleEdges()
Deprecated. Returns *all* edges. |
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(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(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
public Dimension getCurrentSize()
Layout
getCurrentSize
in interface Layout
Layout.getCurrentSize()
public void initialize(Dimension d)
initialize
in interface Layout
public String getStatus()
Layout
getStatus
in interface Layout
public 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 input
Layout.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 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(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 examined
Layout.getX(edu.uci.ics.jung.graph.Vertex)
public double getY(Vertex vert)
getY
in interface Layout
vert
- The vertex being examined
Layout.getX(edu.uci.ics.jung.graph.Vertex)
public 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)
forceMove
in interface Layout
edu.uci.ics.jung.visualization.Layout#forceMove(edu.uci.ics.jung.graph.Vertex, int, int)
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 Point2D getLocation(ArchetypeVertex v)
getLocation
in interface Layout
getLocation
in interface VertexLocationFunction
public Iterator getVertexIterator()
getVertexIterator
in interface VertexLocationFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |