Class FastRenderingLayout<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.visualization.spatial.FastRenderingLayout<V,E>
-
- Type Parameters:
V
- the vertex typeE
- the edge type
- All Implemented Interfaces:
com.google.common.base.Function<V,java.awt.geom.Point2D>
,Layout<V,E>
,java.util.function.Function<V,java.awt.geom.Point2D>
public class FastRenderingLayout<V,E> extends java.lang.Object implements Layout<V,E>
break into several rectangular areas, each of which will have a reference Graph
-
-
Constructor Summary
Constructors Constructor Description FastRenderingLayout(Layout<V,E> layout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Point2D
apply(V arg0)
Graph<V,E>
getGraph()
java.awt.Dimension
getSize()
void
initialize()
Initializes fields in the node that may not have been set during the constructor.boolean
isLocked(V v)
void
lock(V v, boolean state)
Locks or unlocks the specified vertex.void
reset()
void
setGraph(Graph<V,E> graph)
void
setInitializer(com.google.common.base.Function<V,java.awt.geom.Point2D> initializer)
void
setLocation(V v, java.awt.geom.Point2D location)
Changes the layout coordinates ofv
tolocation
.void
setSize(java.awt.Dimension d)
-
-
-
Method Detail
-
getSize
public java.awt.Dimension getSize()
-
initialize
public void initialize()
Description copied from interface:Layout
Initializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.- Specified by:
initialize
in interfaceLayout<V,E>
-
isLocked
public boolean isLocked(V v)
-
lock
public void lock(V v, boolean state)
Description copied from interface:Layout
Locks or unlocks the specified vertex. Locking the vertex fixes it at its current position, so that it will not be affected by the layout algorithm. Unlocking it allows the layout algorithm to change the vertex's position.
-
setInitializer
public void setInitializer(com.google.common.base.Function<V,java.awt.geom.Point2D> initializer)
- Specified by:
setInitializer
in interfaceLayout<V,E>
- Parameters:
initializer
- a function that specifies initial locations for all vertices
-
setLocation
public void setLocation(V v, java.awt.geom.Point2D location)
Description copied from interface:Layout
Changes the layout coordinates ofv
tolocation
.- Specified by:
setLocation
in interfaceLayout<V,E>
- Parameters:
v
- the vertex whose location is to be specifiedlocation
- the coordinates of the specified location
-
setSize
public void setSize(java.awt.Dimension d)
-
-