|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.LayoutMorpher
public class LayoutMorpher
This class applies layout information provided by a suitable
GraphLayout instance to a given Graph2DView's internal graph
in an animated fashion.
![]() |
![]() |
| 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)
|
protected Rectangle2D |
calcBoundingBox(Graph graph,
GraphLayout gli,
Rectangle2D tb)
Calculates the true bounding box of the graph using the given GraphLayout the values in tb are updated and tb is finally returned |
void |
calcFrame(double time)
Calculates the next animation frame. |
void |
disposeAnimation()
Disposes the animation. |
void |
execute()
|
void |
initAnimation()
Initializes the animation. |
boolean |
isEasedExecution()
Returns true iff the layout morphing is animated using ease
in/ease out effects for a smoother animation start/animation end feeling. |
boolean |
isKeepZoomFactor()
|
long |
preferredDuration()
Returns the preferred duration for the animated layout morphing in milliseconds. |
void |
setEasedExecution(boolean easedExecution)
Specifies whether the layout morphing should be animated using ease in/ ease out effects for a smoother animation start/animation end feeling. |
void |
setFocusNode(Node focusNode)
Sets the node being focused at the end of the animation. |
void |
setKeepZoomFactor(boolean keepZoomFactor)
Sets whether the zoom factor is kept when morphing the layout. |
void |
setPreferredDuration(long preferredDuration)
Specifies the preferred duration for the animated layout morphing in milliseconds. |
void |
setSmoothViewTransform(boolean smoothViewTransform)
If set, the animation will smoothly transform the view's zoom level and translation. |
| 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)
| Method Detail |
|---|
public boolean isEasedExecution()
true iff the layout morphing is animated using ease
in/ease out effects for a smoother animation start/animation end feeling.
By the default, layout morphing is eased.
true iff the layout morphing is animated using ease
in/ease out effects for a smoother animation start/animation end feeling.public void setEasedExecution(boolean easedExecution)
easedExecution - if true, layout morphing is animated
using ease in/ease out effectspublic long preferredDuration()
preferredDuration in interface AnimationObjectpublic void setPreferredDuration(long preferredDuration)
preferredDuration - the animation duration in millisecondspublic void setFocusNode(Node focusNode)
If the given focusNode is unequal to null and
part of the associated view's graph, then the coordinate system of
the view will be 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 of the view will remain unchanged if such a focus node is defined.
Note that this feature, smoothViewTransform,
and keepZoomFactor are mutually exclusive
in the sense that only one is obeyed.
If two or more of these features are used, then this one precludes the others.
focusNode - The node that is to be focused at the end of the animation.public void setSmoothViewTransform(boolean smoothViewTransform)
By default this feature is disabled.
Note that this feature, focusNode, and keepZoomFactor
are mutually exclusive in the sense that only one is obeyed.
If two or more of these features are used, then this one precludes keepZoomFactor.
public void initAnimation()
initAnimation in interface AnimationObject
protected Rectangle2D calcBoundingBox(Graph graph,
GraphLayout gli,
Rectangle2D tb)
public void calcFrame(double time)
calcFrame in interface AnimationObjecttime - a point in [0.0, 1.0]public void disposeAnimation()
disposeAnimation in interface AnimationObjectpublic void execute()
protected static void assignLayout(Graph2D targetGraph,
GraphLayout sourceGraph)
public boolean isKeepZoomFactor()
public void setKeepZoomFactor(boolean keepZoomFactor)
Note that this feature, smoothViewTransform,
and focusNode are mutually exclusive in the sense
that only one is obeyed.
If two or more of these features are used, then this one is precluded by the
others.
keepZoomFactor - If true, then the zoom factor is kept while morphing.
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||