|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.anim.AnimationCommand | +--y.view.LayoutMorpher
Command that applies a suitable GraphLayoutInfo object to a Graph2D in an animated fashion. Since an animation needs a view to display it's effects, the target graph of the animation will be the one associated with a given Graph2DView.
To start the animated layout morphing use the method AnimationCommand.execute()
or pass it to an AnimationPlayer
object.
Field Summary |
Fields inherited from class y.anim.AnimationCommand |
animationLength, preferredDuration |
Constructor Summary | |
LayoutMorpher(Graph2DView view,
GraphLayout gli)
Creates a new LayoutMorpher that applies the given GraphLayout to the graph that resides in the given view. |
Method Summary | |
protected static void |
assignLayout(Graph2D targetGraph,
GraphLayout sourceGraph)
|
void |
calcNextFrame(int cursor,
int delta)
Calculates the next animation frame. |
void |
disposeAnimation()
Disposes the animation. |
void |
initAnimation()
Initializes the animation. |
void |
redo()
Not implemented. |
void |
setFocusNode(Node v)
Sets the node being focused at the end of the animation. |
void |
setSmoothViewTransform(boolean b)
If set the animation will smoothly transform the view's zoom level and translation. |
void |
undo()
Not implemented. |
Methods inherited from class y.anim.AnimationCommand |
emit, execute, getAnimationLength, getAnimationListener, getPreferredDuration, setAnimationLength, setAnimationListener, setPreferredDuration |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LayoutMorpher(Graph2DView view, GraphLayout gli)
Precondition:The given GraphLayout be valid for all nodes and edges of the graph that belongs to the given view.
Method Detail |
public void setFocusNode(Node v)
null
and
part of the associated view's graph then the coordinate system of
the view will smoothly translated during the animation to the effect
that the focused node will be centered at the end of the animation
process. The zoom level ogf the view will remain unchanged if such
a focus node is defined.
If no focus node is given the the view's will be transformed
such that it fits the bounding box of the given graph layout info.
public void setSmoothViewTransform(boolean b)
public void initAnimation()
public void calcNextFrame(int cursor, int delta)
public void disposeAnimation()
protected static void assignLayout(Graph2D targetGraph, GraphLayout sourceGraph)
public void redo()
public void undo()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |