Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.visualization
Class FadingVertexLayout

    java.lang.Object
      edu.uci.ics.jung.visualization.FadingVertexLayout

All Implemented Interfaces:
  Layout, VertexLocationFunction

Deprecated. If you are using this code, PLEASE CONTACT US

public class FadingVertexLayout
extends Object
implements Layout

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`.

- Nodes that had been visible, but are now filtered out get the field `FADINGNODEVIZ` added, and have the level set to 0.
- Nodes that been filtered out, but are now visible, have the field `FADINGNODEVIZ` removed.

Other nodes are not altered. However, each time that `advancePositions` is called, all nodes that are currently hidden have their fading level incremented.

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.

Author:
  danyelf

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. Finds the closest vertex to an input (x,y) coordinate.
`Vertex` | `getVertex(double x, double y, double maxDistance)` Deprecated. Finds the closest vertex to an input (x,y) coordinate.
`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

### FadingVertexLayout

    public FadingVertexLayout(int fadelevels,
                              Layout layout)

  Deprecated.
  Adds user data to every vertex in the graph. Initially, no nodes are hidden.

Parameters:
  `fadelevels` - The number of levels through which a vertex should fade once it is removed.

Method Detail

### getCurrentSize

    public Dimension getCurrentSize()

  Deprecated.
  Description copied from interface: `Layout`
  Returns the current size of the visualization's space.

  Specified by:
    `getCurrentSize` in interface `Layout`
  See Also:
    `Layout.getCurrentSize()`

### initialize

    public void initialize(Dimension d)

  Deprecated.
  A pass-through to the contained Layout

  Specified by:
    `initialize` in interface `Layout`

### getStatus

    public String getStatus()

  Deprecated.
  Description copied from interface: `Layout`
  Returns the current status of the sytem, or null if there is no particular status to report. Useful for reporting things like number of iterations passed, temperature, and so on.

  Specified by:
    `getStatus` in interface `Layout`
  Returns:
    the status, as a string

### getVisibleEdges

    public Set getVisibleEdges()

  Deprecated.
  Returns *all* edges. Note that this is unusual: for example

  Specified by:
    `getVisibleEdges` in interface `Layout`
  See Also:
    `Layout.getVisibleEdges()`

### getGraph

    public Graph getGraph()

  Deprecated.
  A pass-through.

  Specified by:
    `getGraph` in interface `Layout`
  See Also:
    `Layout.getGraph()`

### getVertex

    public Vertex getVertex(double x,
                            double y)

  Deprecated. Use PickSupport instead A pass-through.

  Description copied from interface: `Layout`
  Finds the closest vertex to an input (x,y) coordinate. Useful for mouse clicks.

  Specified by:
    `getVertex` in interface `Layout`
  Parameters:
    `x` - The x coordinate of the input
    `y` - The y coordinate of the input
  Returns:
    The nearest vertex. It is up to the user to check if it is satisfactorily close.
  See Also:
    `Layout.getVertex(double, double)`

### getVertex

    public Vertex getVertex(double x,
                            double y,
                            double maxDistance)

  Deprecated. Use PickSupport instead A pass-through.

  Description copied from interface: `Layout`
  Finds the closest vertex to an input (x,y) coordinate. Useful for mouse clicks.

  Specified by:
    `getVertex` in interface `Layout`
  Parameters:
    `x` - The x coordinate of the input
    `y` - The y coordinate of the input
    `maxDistance` - The maximum acceptable distance. Beyond this, vertices are ignored.
  Returns:
    The nearest vertex. It is up to the user to check if it is satisfactorily close.
  See Also:
    `Layout.getVertex(double, double, double)`

### advancePositions

    public void advancePositions()

  Deprecated.
  In addition to being a passthrough, this also advances the fade function by calling ``tick``

  Specified by:
    `advancePositions` in interface `Layout`
  See Also:
    `Layout.advancePositions()`

### tick

    protected void tick()

  Deprecated.
  This method advances each node that is fading away. Each vertex's "fade" count is advanced one towards `getMaxLevel()`, and then moved outward.

### getFadingKey

    public Object getFadingKey()

  Deprecated.

### applyFilter

    public void applyFilter(Graph g_int)

  Deprecated.
  Tracks the changes in the set of visible vertices from the set of actual vertices.
  Vertices that have been REMOVED will be faded out through FADELEVELS steps; vertices that have been ADDED will be faded in through FADELEVELS steps. All hidden vertices will be labelled as hidden; all showing vertices will be labeled as nonhidden.

  Specified by:
    `applyFilter` in interface `Layout`
  Parameters:
    `g_int` - a filtered graph that is a subgraph of the Graph returned by `getGraph`
  See Also:
    `Layout.applyFilter(edu.uci.ics.jung.graph.Graph)`

### moveVertexPrettily

    protected void moveVertexPrettily(Vertex vert)

  Deprecated.
  This code is called when a Vertex is being brought back onto the page. Currently, it merely examines the vertex' neighbors, picks an average point, and moves the vertex nearby, assuming that the neighbors will be placed correctly.

  Parameters:
    `vert` -

### moveOutward

    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.

  Parameters:
    `vert` -
    `x` - The desired origin X coordinate
    `y` - The desired origin Y coordinate
    `speed` - The speed with which the vertex moves outward

### resize

    public void resize(Dimension d)

  Deprecated.
  Passthrough.

  Specified by:
    `resize` in interface `Layout`
  Parameters:
    `d` -
  See Also:
    `Layout.resize(java.awt.Dimension)`

### restart

    public void restart()

  Deprecated.
  Passthrough.

  Specified by:
    `restart` in interface `Layout`
  See Also:
    `Layout.restart()`

### getX

    public double getX(Vertex vert)

  Deprecated.
  Passthrough. Note that you can't get X and Y of hidden nodes.

  Specified by:
    `getX` in interface `Layout`
  Parameters:
    `vert` - The vertex being examined
  Returns:
    the x coordinate of that vertex
  See Also:
    `Layout.getX(edu.uci.ics.jung.graph.Vertex)`

### getY

    public double getY(Vertex vert)

  Deprecated.
  Passthrough. Note that you can't get X and Y of hidden nodes.

  Specified by:
    `getY` in interface `Layout`
  Parameters:
    `vert` - The vertex being examined
  Returns:
    the y coordinate of that vertex
  See Also:
    `Layout.getX(edu.uci.ics.jung.graph.Vertex)`

### getVisibleVertices

    public Set getVisibleVertices()

  Deprecated.
  Returns both the visible and the hidden vertices. This function is an exception to the usual behavior of `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.

  Specified by:
    `getVisibleVertices` in interface `Layout`
  See Also:
    `Layout.getVisibleVertices()`

### getFadeLevel

    public int getFadeLevel(Vertex v)

  Deprecated.
  Static utility function returns the fade level of a given vertex. This vertex must be visaulized by a Fading Node Layout, or this function will throw an exception.

  Parameters:
    `v` -

### isHidden

    public boolean isHidden(Vertex v)

  Deprecated.
  Static utility function returns the fade level of a given vertex. This vertex must be visaulized by a Fading Node Layout, or this function will throw an exception.

  Parameters:
    `v` -

### lockVertex

    public void lockVertex(Vertex vert)

  Deprecated.
  Passthrough.

  Specified by:
    `lockVertex` in interface `Layout`
  Parameters:
    `vert` - vertex
  See Also:
    `Layout.lockVertex(edu.uci.ics.jung.graph.Vertex)`

### unlockVertex

    public void unlockVertex(Vertex vert)

  Deprecated.
  Passthrough.

  Specified by:
    `unlockVertex` in interface `Layout`
  Parameters:
    `vert` - vertex
  See Also:
    `Layout.unlockVertex(edu.uci.ics.jung.graph.Vertex)`

### isLocked

    public boolean isLocked(Vertex v)

  Deprecated.
  Passthrough.

  Specified by:
    `isLocked` in interface `Layout`
  See Also:
    `Layout.isLocked(Vertex)`

### forceMove

    public void forceMove(Vertex picked,
                          double x,
                          double y)

  Deprecated.
  Simply passes through the vertex.

  Specified by:
    `forceMove` in interface `Layout`
  Parameters:
    `picked` -
    `x` -
    `y` -
  See Also:
    `edu.uci.ics.jung.visualization.Layout#forceMove(edu.uci.ics.jung.graph.Vertex, int, int)`

### getMaxLevel

    public int getMaxLevel()

  Deprecated.
  Returns the number of levels that vertices fade through.

### isIncremental

    public boolean isIncremental()

  Deprecated.
  Passthrough.

  Specified by:
    `isIncremental` in interface `Layout`
  See Also:
    `Layout.isIncremental()`

### incrementsAreDone

    public boolean incrementsAreDone()

  Deprecated.
  Passthrough.

  Specified by:
    `incrementsAreDone` in interface `Layout`
  See Also:
    `Layout.incrementsAreDone()`

### getGraphLayout

    public Layout getGraphLayout()

  Deprecated.

### getLocation

    public Point2D getLocation(ArchetypeVertex v)

  Deprecated.
  Specified by:
    `getLocation` in interface `Layout`

### getVertexIterator

    public Iterator getVertexIterator()

  Deprecated.
  Specified by:
    `getVertexIterator` in interface `VertexLocationFunction`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD