|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uka.algo.algovis3d.quanten.ChangeVertexLocationAbsolutely
public class ChangeVertexLocationAbsolutely
This quantum changes the location of one vertex or a set of vertices to the given absolute location. A translation of one vertex can also be animated by setting the animate flag in the fitting constructor.
VisualizationQuantum
,
Graph
Constructor Summary | |
---|---|
ChangeVertexLocationAbsolutely(java.util.Set<edu.uci.ics.jung.graph.Vertex> vertices,
javax.vecmath.Vector3f location)
Translates all vertices to location . |
|
ChangeVertexLocationAbsolutely(edu.uci.ics.jung.graph.Vertex vertex,
javax.vecmath.Vector3f location)
Translates the vertex immediatly to location . |
|
ChangeVertexLocationAbsolutely(edu.uci.ics.jung.graph.Vertex vertex,
javax.vecmath.Vector3f location,
boolean animate)
Translates the vertex to location . |
Method Summary | |
---|---|
void |
apply(Visualizer visualizer)
Applies the quantum on the given visualizer and remembers the state of the objects, that were changed. |
void |
reset()
|
java.lang.String |
toString()
|
void |
undo(Visualizer visualizer)
Undoes the changes on the given visualizer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChangeVertexLocationAbsolutely(edu.uci.ics.jung.graph.Vertex vertex, javax.vecmath.Vector3f location)
vertex
immediatly to location
.
vertex
- The targetlocation
- The new locationpublic ChangeVertexLocationAbsolutely(edu.uci.ics.jung.graph.Vertex vertex, javax.vecmath.Vector3f location, boolean animate)
vertex
to location
. If animate
is
true
, the vertex will not be translated to its new location immediately but
slide into position.
vertex
- The targetlocation
- The new locationanimate
- Shall it be an animated translation?public ChangeVertexLocationAbsolutely(java.util.Set<edu.uci.ics.jung.graph.Vertex> vertices, javax.vecmath.Vector3f location)
vertices
to location
. (If undo() is
called on this object, the location of every target vertex will be set to its old one).
Unfortunately, animation is not possible because only one vertex can animated at the same
time.
- Parameters:
vertices
- The targetslocation
- The new location
Method Detail |
---|
public void apply(Visualizer visualizer)
VisualizationQuantum
apply
in interface VisualizationQuantum
visualizer
- The visualizer object the quantum is applied on.public void undo(Visualizer visualizer)
VisualizationQuantum
undo
in interface VisualizationQuantum
visualizer
- The visualizer object the quantum is undone on.public void reset()
reset
in interface VisualizationQuantum
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |