|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.ViewAnimationFactory
public class ViewAnimationFactory
Provides factory methods for miscellaneous animations.
Drawables
Animations created through the factory methods of this class require either
the associated Graph2DView or the associated
Graph2DViewRepaintManager to be registered as an
AnimationListener with the AnimationPlayer
used to process the animations.
For this reason, a convenience factory method
createConfiguredPlayer is provided that ensures that a
suitable AnimationListener is registered on the returned
AnimationPlayer.
This class also provides factory methods to create Drawable
representations of NodeRealizer, EdgeRealizer,
and YLabel instances.
AnimationPlayer,
Graph2DViewRepaintManager,
createConfiguredPlayer(),
createDrawable(NodeRealizer),
createDrawable(EdgeRealizer),
createDrawable(YLabel)
| Nested Class Summary | |
|---|---|
static class |
ViewAnimationFactory.AnimationQuality
Enumeration type that governs the quality/performance trade-off of certain animation effects. |
static class |
ViewAnimationFactory.NodeOrder
Enumeration type that governs the chronological order of animation effects for nodes in fade-in and fade-out animations for whole graph structures. |
static class |
ViewAnimationFactory.StructuralEffect
Enumeration type that governs the structural consequences of certain animation effects. |
| Field Summary | |
|---|---|
static ViewAnimationFactory.StructuralEffect |
APPLY_EFFECT
Structural effect hint to recommend applying structural effects. |
static ViewAnimationFactory.NodeOrder |
CLOCKWISE
Orders nodes descending according to the angle of the polar coordinates relative to the center of the associated graph. |
static ViewAnimationFactory.NodeOrder |
COUNTER_CLOCKWISE
Orders nodes ascending according to the angle of the polar coordinates relative to the center of the associated graph. |
static ViewAnimationFactory.AnimationQuality |
DEFAULT
Animations are chosen according to what the factory determines to be appropriate. |
static ViewAnimationFactory.AnimationQuality |
HIGH_PERFORMANCE
Appropriate animations are chosen with a preference for animation speed. |
static ViewAnimationFactory.AnimationQuality |
HIGH_QUALITY
Appropriate animations are chosen with a preference for animation quality. |
static ViewAnimationFactory.NodeOrder |
LEFT_TO_RIGHT
Orders nodes ascending according to the x coordinate of the
node realizer. |
static ViewAnimationFactory.StructuralEffect |
RESET_EFFECT
Structural effect hint to recommend resetting all animation side effects. |
static ViewAnimationFactory.NodeOrder |
RIGHT_TO_LEFT
Orders nodes descending according to the x coordinate of the
node realizer. |
static ViewAnimationFactory.StructuralEffect |
SIMULATE_EFFECT
Structural effect hint to recommend simulating structural effects only. |
| Constructor Summary | |
|---|---|
ViewAnimationFactory(Graph2DView view)
Creates a new ViewAnimationFactory that produces animations for the specified Graph2DView. |
|
ViewAnimationFactory(Graph2DViewRepaintManager repaintManager)
Creates a new ViewAnimationFactory that produces animations for the specified Graph2DViewRepaintManager and its
associated Graph2DView. |
|
| Method Summary | |
|---|---|
AnimationObject |
blink(NodeRealizer nr,
long preferredDuration)
Creates an AnimationObject that lets the node represented
by the specified NodeRealizer blink (once). |
AnimationObject |
blurIn(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies a blurring
fade-in effect to the specified Drawable. |
AnimationObject |
blurIn(EdgeRealizer er,
long preferredDuration)
Creates an AnimationObject that applies a blurring
fade-in effect to the specified EdgeRealizer. |
AnimationObject |
blurIn(NodeRealizer nr,
long preferredDuration)
Creates an AnimationObject that applies a blurring
fade-in effect to the specified NodeRealizer. |
AnimationObject |
blurOut(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies a blurring
fade-out effect to the specified Drawable. |
AnimationObject |
blurOut(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies a blurring
fade-out effect to the specified EdgeRealizer. |
AnimationObject |
blurOut(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies a blurring
fade-out effect to the specified NodeRealizer. |
AnimationObject |
color(EdgeRealizer er,
Color lineColor,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that changes the
lineColor property of the specified EdgeRealizer
to the given color value. |
AnimationObject |
color(NodeRealizer nr,
Color fillColor,
Color fillColor2,
Color lineColor,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that changes the appropriate color
properties of the specified NodeRealizer to the given color
values. |
AnimationPlayer |
createConfiguredPlayer()
Creates a new AnimationPlayer that is set to be
non-blocking and on which an AnimationListener, which
ensures that this factory's Graph2DView gets updated
on animation events, has been registered. |
static Drawable |
createDrawable(EdgeRealizer er)
Creates a Drawable representation of the specified
EdgeRealizer that is independent of the graph to which the
realizer's edge belongs. |
static Drawable |
createDrawable(NodeRealizer nr)
Creates a Drawable representation of the specified
NodeRealizer that is independent of the graph to which the
realizer's node belongs. |
static Drawable |
createDrawable(YLabel label)
Creates a Drawable representation of the specified
YLabel. |
AnimationObject |
explode(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies an explosion
effect to the specified Drawable. |
AnimationObject |
explode(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies an explosion
effect to the specified EdgeRealizer. |
AnimationObject |
explode(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies an explosion
effect to the specified NodeRealizer. |
AnimationObject |
extract(EdgeRealizer er,
long preferredDuration)
Creates an AnimationObject that traverses the edge path
of the edge represented by the specified EdgeRealizer
from source node to target node thereby creating an
extracting effect. |
AnimationObject |
fadeIn(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies a fade from
invisibility to visibility effect to the specified
Drawable. |
AnimationObject |
fadeIn(EdgeRealizer er,
long preferredDuration)
Creates an AnimationObject that applies a fade from
invisibility to visibility effect to the specified
EdgeRealizer. |
AnimationObject |
fadeIn(Graph2D graph,
ViewAnimationFactory.NodeOrder order,
boolean obeyEdgeDirection,
double ratio,
long preferredDuration)
Creates an AnimationObject that applies a fade-in effect to
the specified Graph2D by successively fading in nodes
and extracting edges. |
AnimationObject |
fadeIn(NodeRealizer nr,
long preferredDuration)
Creates an AnimationObject that applies a fade from
invisibility to visibility effect to the specified
NodeRealizer. |
AnimationObject |
fadeOut(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies a fade from
visibility to invisibility effect to the specified
Drawable. |
AnimationObject |
fadeOut(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies a fade from
visibility to invisibility effect to the specified
EdgeRealizer. |
AnimationObject |
fadeOut(Graph2D graph,
ViewAnimationFactory.NodeOrder order,
boolean obeyEdgeDirection,
double ratio,
long preferredDuration)
Creates an AnimationObject that applies a fade-out effect to
the specified Graph2D by successively fading out nodes
and retracting edges. |
AnimationObject |
fadeOut(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies a fade from
visibility to invisibility effect to the specified
NodeRealizer. |
AnimationObject |
focusView(double newZoom,
Value2D newCenter,
long preferredDuration)
Creates an AnimationObject that smoothly changes the zoom
level and center view point of this factory's Graph2DView. |
ViewAnimationFactory.AnimationQuality |
getQuality()
Returns the quality hint that is used to determine whether the animations created by this factory should be optimized for quality or performance. |
Graph2DViewRepaintManager |
getRepaintManager()
Returns the Graph2DViewRepaintManager for which this factory
produces animations. |
Graph2DView |
getView()
Returns the Graph2DView for which this factory produces
animations. |
AnimationObject |
implode(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies an implosion
effect to the specified Drawable. |
AnimationObject |
implode(EdgeRealizer er,
long preferredDuration)
Creates an AnimationObject that applies an implosion
effect to the specified EdgeRealizer. |
AnimationObject |
implode(NodeRealizer nr,
long preferredDuration)
Creates an AnimationObject that applies an implosion
effect to the specified NodeRealizer. |
AnimationObject |
morph(NodeRealizer src,
NodeRealizer tgt,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies the graphical
representation of tgt to the node represented by
src. |
AnimationObject |
move(NodeRealizer[] nr,
Value2D[] destinations,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that moves the nodes represented
by the specified NodeRealizers in such a way, that the center
of each node is translated to the appropriate coordinates given by the
destinations array. |
AnimationObject |
move(NodeRealizer nr,
Value2D destination,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that moves the node represented
by the specified NodeRealizer in such a way, that the center
of the node is translated to the specified destination (in view
coordinates). |
AnimationObject |
moveCamera(GeneralPath path,
long preferredDuration)
Creates an AnimationObject that simulates camera
movement for this factory's Graph2DView along the
given GeneralPath. |
AnimationObject |
moveCamera(Value2D destination,
long preferredDuration)
Creates an AnimationObject that simulates camera
movement for this factory's Graph2DView. |
AnimationObject |
resize(NodeRealizer nr,
Value2D size,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that resizes the node represented
by the specified NodeRealizer. |
AnimationObject |
retract(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that traverses the edge path
of the edge represented by the specified EdgeRealizer
from the target node to the source node thereby creating an
retracting effect. |
AnimationObject |
scale(NodeRealizer nr,
Value2D scaleFactor,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that scales the node represented
by the specified NodeRealizer. |
void |
setQuality(ViewAnimationFactory.AnimationQuality quality)
Specifies the quality hint that is used to determine whether the animations created by this factory should be optimized for quality or performance. |
AnimationObject |
traverseEdge(EdgeRealizer er,
EdgeRealizer visitedTheme,
EdgeRealizer unvisitedTheme,
boolean srcToTgt,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that continuously applies the
given visitedTheme to er while traversing the
edge path of er from source node to target node. |
AnimationObject |
traverseEdge(EdgeRealizer er,
EdgeRealizer visitedTheme,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that continuously applies the
given visitedTheme to er while traversing the
edge path of er from source node to target node. |
AnimationObject |
traversePath(GeneralPath path,
boolean invertPath,
Drawable item,
boolean rotateInDirection,
boolean restrictRotation,
long preferredDuration)
Creates an AnimationObject that moves the specified
Drawable along the given GeneralPath. |
AnimationObject |
traversePath(GeneralPath path,
boolean invertPath,
Drawable item,
long preferredDuration)
Creates an AnimationObject that moves the specified
Drawable along the given GeneralPath. |
AnimationObject |
traversePath(GeneralPath path,
boolean invertPath,
NodeRealizer item,
long preferredDuration)
Creates an AnimationObject that moves the specified
NodeRealizer along the given GeneralPath. |
AnimationObject |
traversePath(GeneralPath path,
boolean invertPath,
Value2DSettable position,
Value2DSettable direction,
long preferredDuration)
Creates an AnimationObject that allows for generic movement
related effects. |
AnimationObject |
whirlIn(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies a whirling
fade-in effect to the specified Drawable. |
AnimationObject |
whirlIn(NodeRealizer nr,
long preferredDuration)
Creates an AnimationObject that applies a whirling
fade-in effect to the specified NodeRealizer. |
AnimationObject |
whirlOut(Drawable drawable,
long preferredDuration)
Creates an AnimationObject that applies a whirling
fade-out effect to the specified Drawable. |
AnimationObject |
whirlOut(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies a whirling
fade-out effect to the specified NodeRealizer. |
AnimationObject |
zoom(double newZoom,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
Creates an AnimationObject that applies the
specified zoom factor to this factory's Graph2DView. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ViewAnimationFactory.NodeOrder LEFT_TO_RIGHT
x coordinate of the
node realizer.
public static final ViewAnimationFactory.NodeOrder RIGHT_TO_LEFT
x coordinate of the
node realizer.
public static final ViewAnimationFactory.NodeOrder CLOCKWISE
public static final ViewAnimationFactory.NodeOrder COUNTER_CLOCKWISE
public static final ViewAnimationFactory.AnimationQuality HIGH_QUALITY
public static final ViewAnimationFactory.AnimationQuality DEFAULT
public static final ViewAnimationFactory.AnimationQuality HIGH_PERFORMANCE
public static final ViewAnimationFactory.StructuralEffect RESET_EFFECT
public static final ViewAnimationFactory.StructuralEffect SIMULATE_EFFECT
public static final ViewAnimationFactory.StructuralEffect APPLY_EFFECT
| Constructor Detail |
|---|
public ViewAnimationFactory(Graph2DView view)
Graph2DView.
view - the Graph2DViewpublic ViewAnimationFactory(Graph2DViewRepaintManager repaintManager)
Graph2DViewRepaintManager and its
associated Graph2DView.
repaintManager - the Graph2DViewRepaintManager| Method Detail |
|---|
public ViewAnimationFactory.AnimationQuality getQuality()
public void setQuality(ViewAnimationFactory.AnimationQuality quality)
IllegalArgumentException - if quality is
null.quality - the AnimationQuality hintpublic Graph2DView getView()
Graph2DView for which this factory produces
animations.
Graph2DView for which this factory produces
animations.public Graph2DViewRepaintManager getRepaintManager()
Graph2DViewRepaintManager for which this factory
produces animations. May be null.
Graph2DViewRepaintManager for which this factory
produces animations.
public AnimationObject blurIn(Drawable drawable,
long preferredDuration)
AnimationObject that applies a blurring
fade-in effect to the specified Drawable.
The effect is visualized by adding a specialized image copy
of drawable to the specified Graph2D.
After the animation is done, the image copy is removed again.
If the location of the specified Drawable changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the blur effect is
applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a blurring
fade-in effect to drawable.
public AnimationObject blurOut(Drawable drawable,
long preferredDuration)
AnimationObject that applies a blurring
fade-out effect to the specified Drawable.
The effect is visualized by adding a specialized image copy
of drawable to the specified Graph2D.
After the animation is done, the image copy is removed again.
If the location of the specified Drawable changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the blur effect is
applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a blurring
fade-out effect to drawable.
public AnimationObject fadeIn(Drawable drawable,
long preferredDuration)
AnimationObject that applies a fade from
invisibility to visibility effect to the specified
Drawable.
The effect is visualized by adding a specialized image copy
of drawable to the specified Graph2D.
After the animation is done, the image copy is removed again.
If the location of the specified Drawable changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the fade effect is
applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
invisibility to visibility effect to drawable.
public AnimationObject fadeOut(Drawable drawable,
long preferredDuration)
AnimationObject that applies a fade from
visibility to invisibility effect to the specified
Drawable.
The effect is visualized by adding a specialized image copy
of drawable to the specified Graph2D.
After the animation is done, the image copy is removed again.
If the location of the specified Drawable changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the fade effect is
applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
visibility to invisibility effect to drawable.
public AnimationObject implode(Drawable drawable,
long preferredDuration)
AnimationObject that applies an implosion
effect to the specified Drawable.
Note:
This is an expensive effect since several Image objects
have to be created. Applying this effect to a lot of objects at the
same time will almost certainly result in very low animation frame rates.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the implosion effect
is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies an implosion
effect to drawable.
public AnimationObject explode(Drawable drawable,
long preferredDuration)
AnimationObject that applies an explosion
effect to the specified Drawable.
Note:
This is an expensive effect since several Image objects
have to be created. Applying this effect to a lot of objects at the
same time will almost certainly result in very low animation frame rates.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the explosion effect
is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies an explosion
effect to drawable.
public AnimationObject whirlIn(Drawable drawable,
long preferredDuration)
AnimationObject that applies a whirling
fade-in effect to the specified Drawable.
The effect is visualized by adding a specialized image copy
of drawable to the specified Graph2D.
After the animation is done, the image copy is removed again.
If the location of the specified Drawable changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the whirl effect is
applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a whirling
fade-in effect to drawable.
public AnimationObject whirlOut(Drawable drawable,
long preferredDuration)
AnimationObject that applies a whirling
fade-out effect to the specified Drawable.
The effect is visualized by adding a specialized image copy
of drawable to the specified Graph2D.
After the animation is done, the image copy is removed again.
If the location of the specified Drawable changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.drawable - the Drawable to which the whirl effect is
applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a whirling
fade-out effect to drawable.
public AnimationObject traversePath(GeneralPath path,
boolean invertPath,
Drawable item,
long preferredDuration)
AnimationObject that moves the specified
Drawable along the given GeneralPath.
Invoking this method is equal to calling
traversePath( path, invertPath, item, false, false )
IllegalArgumentException - if preferredDuration is
less than 0.path - the GeneralPath to be traversed.invertPath - if true, the specified path
is traversed backwards, i.e. from last point
to first point.item - the Drawable to move along
the specified path.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that moves item along
path.
public AnimationObject traversePath(GeneralPath path,
boolean invertPath,
Drawable item,
boolean rotateInDirection,
boolean restrictRotation,
long preferredDuration)
AnimationObject that moves the specified
Drawable along the given GeneralPath.
IllegalArgumentException - if preferredDuration is
less than 0.path - the GeneralPath to be traversed.invertPath - if true, the specified path
is traversed backwards, i.e. from last point
to first point.item - the Drawable to move along
the specified path.rotateInDirection - if true the item is
rotated to match the direction of
path at any given position.restrictRotation - if true the rotation angle which is
applied to item is mapped to
[-Pi/2, Pi/2].preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that moves item along
path.
public AnimationObject color(NodeRealizer nr,
Color fillColor,
Color fillColor2,
Color lineColor,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that changes the appropriate color
properties of the specified NodeRealizer to the given color
values.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer representing the node whose
graphical representation is changed.fillColor - the new color value for the specified
NodeRealizer's fillColor
property.fillColor2 - the new color value for the specified
NodeRealizer's fillColor2
property.lineColor - the new color value for the specified
NodeRealizer's lineColor
property.effect - specifies post-animation structural effects:
fillColor,
fillColor2, and lineColor
are reset to their pre-animation state.fillColor,
fillColor2, and lineColor
are kept.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies the given colors to
nr.
public AnimationObject move(NodeRealizer nr,
Value2D destination,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that moves the node represented
by the specified NodeRealizer in such a way, that the center
of the node is translated to the specified destination (in view
coordinates).
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizers representing the
nodes to be moved.destination - the destination of the node movement in view
coordinates.effect - specifies post-animation structural effects:
preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that moves a node to a specified
destination.
public AnimationObject move(NodeRealizer[] nr,
Value2D[] destinations,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that moves the nodes represented
by the specified NodeRealizers in such a way, that the center
of each node is translated to the appropriate coordinates given by the
destinations array.
IllegalArgumentException - if preferredDuration is
less than 0 or if the lengths of nr and
destinations are not equal.nr - the NodeRealizers representing the
nodes to be moved.destinations - the destinations of the node movements in view
coordinates.effect - specifies post-animation structural effects:
preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that moves nodes to specified
destinations.
public AnimationObject morph(NodeRealizer src,
NodeRealizer tgt,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies the graphical
representation of tgt to the node represented by
src.
The following properties of src are modified:
fillColorfillColor2lineColorwidthheightcenterXcenterY
IllegalArgumentException - if preferredDuration is
less than 0.src - the NodeRealizer representing the
node whose graphical representation is changed.tgt - the NodeRealizer that is used as
a template for src.effect - specifies post-animation structural effects:
preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies the graphical
representation of tgt to src.
public AnimationObject resize(NodeRealizer nr,
Value2D size,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that resizes the node represented
by the specified NodeRealizer. The x data of
the specified Value2D instance is interpreted as the node´s
new width; the y data accordingly as its new height.
Note:
A negative width or height will result in a invisible node.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer representing the
node to be resized.size - the Value2D representing the new
node size.effect - specifies post-animation structural effects:
preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that resizes nr to
size.
public AnimationObject scale(NodeRealizer nr,
Value2D scaleFactor,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that scales the node represented
by the specified NodeRealizer. The x data of
the specified Value2D instance is interpreted as scale factor
for the node width; the y data accordingly as scale factor
for the node height.
Note:
A negative width or height will result in a invisible node.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer representing the
node to be resized.scaleFactor - the Value2D representing the scale
factors for node width and height.effect - specifies post-animation structural effects:
preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that scales nr
according to scaleFactor.
public AnimationObject blink(NodeRealizer nr,
long preferredDuration)
AnimationObject that lets the node represented
by the specified NodeRealizer blink (once).
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that lets the node blink (once).
public AnimationObject blurIn(NodeRealizer nr,
long preferredDuration)
AnimationObject that applies a blurring
fade-in effect to the specified NodeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which nr belongs.
After the animation is done, the image copy is removed again.
If the location of the specified NodeRealizer changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
blur effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a blurring
fade-in effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.NodeRealizer's
visible property will be true.
public AnimationObject blurOut(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies a blurring
fade-out effect to the specified NodeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which nr belongs.
After the animation is done, the image copy is removed again.
If the location of the specified NodeRealizer changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
blur effect is applied.effect - specifies post-animation structural effects:
nr is
reset to its pre-animation state.visible property of nr
is set to false.nr is bound, has been removed from
its associated graph.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a blurring
fade-out effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.
public AnimationObject implode(NodeRealizer nr,
long preferredDuration)
AnimationObject that applies an implosion
effect to the specified NodeRealizer.
Note:
This is an expensive effect since several Image objects
have to be created. Applying this effect to a lot of nodes at the
same time will almost certainly result in very low animation frame rates.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
implosion effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies an implosion
effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.NodeRealizer's
visible property will be true.
public AnimationObject explode(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies an explosion
effect to the specified NodeRealizer.
Note:Image objects
have to be created. Applying this effect to a lot of nodes at the
same time will almost certainly result in very low animation frame rates.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
blur effect is applied.effect - specifies post-animation structural effects:
nr is
reset to its pre-animation state.visible property of nr
is set to false.nr is bound, has been removed from
its associated graph.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies an explosion
effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.
public AnimationObject fadeIn(NodeRealizer nr,
long preferredDuration)
AnimationObject that applies a fade from
invisibility to visibility effect to the specified
NodeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which nr belongs.
After the animation is done, the image copy is removed again.
If the location of the specified NodeRealizer changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
fade effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
invisibility to visibility effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.NodeRealizer's
visible property will be true.
public AnimationObject fadeOut(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies a fade from
visibility to invisibility effect to the specified
NodeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which nr belongs.
After the animation is done, the image copy is removed again.
If the location of the specified NodeRealizer changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
fade effect is applied.effect - specifies post-animation structural effects:
nr is
reset to its pre-animation state.visible property of nr
is set to false.nr is bound, has been removed from
its associated graph.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
visibility to invisibility effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.
public AnimationObject whirlIn(NodeRealizer nr,
long preferredDuration)
AnimationObject that applies a whirling
fade-in effect to the specified NodeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which nr belongs.
After the animation is done, the image copy is removed again.
If the location of the specified NodeRealizer changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
whirl effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a whirling
fade-in effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.NodeRealizer's
visible property will be true.
public AnimationObject whirlOut(NodeRealizer nr,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies a whirling
fade-out effect to the specified NodeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which nr belongs.
After the animation is done, the image copy is removed again.
If the location of the specified NodeRealizer changes during
the animation, the location of the image used to visualize the animation
effect is adjusted accordingly.
IllegalArgumentException - if preferredDuration is
less than 0.nr - the NodeRealizer to which the
whirl effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.effect - specifies post-animation structural effects:
nr is
reset to its pre-animation state.visible property of nr
is set to false.nr is bound, has been removed from
its associated graph.AnimationObject that applies a whirling
fade-out effect to nr.NodeRealizer must be bound to a node that belongs
to a Graph2D.
public AnimationObject traversePath(GeneralPath path,
boolean invertPath,
NodeRealizer item,
long preferredDuration)
AnimationObject that moves the specified
NodeRealizer along the given GeneralPath.
IllegalArgumentException - if preferredDuration is
less than 0.path - the GeneralPath to be traversed.invertPath - if true, the specified path
is traversed backwards, i.e. from last point
to first point.item - the NodeRealizer to move along
the specified path.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that moves item along
path.GeneralPath is the center of item.
public AnimationObject blurIn(EdgeRealizer er,
long preferredDuration)
AnimationObject that applies a blurring
fade-in effect to the specified EdgeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which er belongs.
After the animation is done, the image copy is removed again.
The image is created as a snapshot of the specified
EdgeRealizer when the animation is initialized.
The animation effect will therefore not reflect changes that are made
to er after initAnimation has been called.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
blur effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a blurring
fade-in effect to er.EdgeRealizer must be bound to an edge that belongs
to a Graph2D.EdgeRealizer's
visible property will be true.
public AnimationObject blurOut(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies a blurring
fade-out effect to the specified EdgeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which er belongs.
After the animation is done, the image copy is removed again.
The image is created as a snapshot of the specified
EdgeRealizer when the animation is initialized.
The animation effect will therefore not reflect changes that are made
to er after initAnimation has been called.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
blur effect is applied.effect - specifies post-animation structural effects:
er is
reset to its pre-animation state.visible property of er
is set to false.er is bound, has been removed from
its associated graph.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a blurring
fade-out effect to er.EdgeRealizer must be bound to an edge that belongs
to a Graph2D.
public AnimationObject color(EdgeRealizer er,
Color lineColor,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that changes the
lineColor property of the specified EdgeRealizer
to the given color value.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer representing the edge whose
graphical representation is changed.lineColor - the new color value for the specified
EdgeRealizer's lineColor
property.effect - specifies post-animation structural effects:
lineColor
is reset to its pre-animation state.lineColor
are kept.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies the given line color
to er.
public AnimationObject implode(EdgeRealizer er,
long preferredDuration)
AnimationObject that applies an implosion
effect to the specified EdgeRealizer.
Note:
This is an expensive effect since several Image objects
have to be created. Applying this effect to a lot of edges at the
same time will almost certainly result in very low animation frame rates.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
implosion effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies an implosion
effect to er.EdgeRealizer must be bound to a edge that belongs
to a Graph2D.EdgeRealizer's
visible property will be true.
public AnimationObject explode(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies an explosion
effect to the specified EdgeRealizer.
Note:
This is an expensive effect since several Image objects
have to be created. Applying this effect to a lot of edges at the
same time will almost certainly result in very low animation frame rates.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
explosion effect is applied.effect - specifies post-animation structural effects:
er is
reset to its pre-animation state.visible property of er
is set to false.er is bound, has been removed from
its associated graph.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies an explosion
effect to er.EdgeRealizer must be bound to a edge that belongs
to a Graph2D.
public AnimationObject fadeIn(EdgeRealizer er,
long preferredDuration)
AnimationObject that applies a fade from
invisibility to visibility effect to the specified
EdgeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which er belongs.
After the animation is done, the image copy is removed again.
The image is created as a snapshot of the specified
EdgeRealizer when the animation is initialized.
The animation effect will therefore not reflect changes that are made
to er after initAnimation has been called.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
fade effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
invisibility to visibility effect to er.EdgeRealizer must be bound to a edge that belongs
to a Graph2D.EdgeRealizer's
visible property will be true.
public AnimationObject fadeOut(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies a fade from
visibility to invisibility effect to the specified
EdgeRealizer.
The effect is visualized by adding a specialized image copy
to the Graph2D to which er belongs.
After the animation is done, the image copy is removed again.
The image is created as a snapshot of the specified
EdgeRealizer when the animation is initialized.
The animation effect will therefore not reflect changes that are made
to er after initAnimation has been called.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
fade effect is applied.effect - specifies post-animation structural effects:
er is
reset to its pre-animation state.visible property of er
is set to false.er is bound, has been removed from
its associated graph.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
visibility to invisibility effect to er.EdgeRealizer must be bound to a edge that belongs
to a Graph2D.
public AnimationObject extract(EdgeRealizer er,
long preferredDuration)
AnimationObject that traverses the edge path
of the edge represented by the specified EdgeRealizer
from source node to target node thereby creating an
extracting effect.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
effect is applied.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that creates an extracting
effect for er.EdgeRealizer must be bound to a edge that belongs
to a Graph2D.EdgeRealizer's
visible property will be true.
public AnimationObject retract(EdgeRealizer er,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that traverses the edge path
of the edge represented by the specified EdgeRealizer
from the target node to the source node thereby creating an
retracting effect.
IllegalArgumentException - if preferredDuration is
less than 0.er - the EdgeRealizer to which the
effect is applied.effect - specifies post-animation structural effects:
er is
reset to its pre-animation state.visible property of er
is set to false.er is bound, has been removed from
its associated graph.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that creates an retracting
effect for er.EdgeRealizer must be bound to a edge that belongs
to a Graph2D.
public AnimationObject traverseEdge(EdgeRealizer er,
EdgeRealizer visitedTheme,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that continuously applies the
given visitedTheme to er while traversing the
edge path of er from source node to target node.
The animation effect will not reflect changes that are made
to er after the animation has been initialized.
IllegalArgumentException - if preferredDuration is
less than 0.er - the edge path to be traversed.visitedTheme - the EdgeRealizer whose visual
properties are used to mark the already
traversed portion of the path.effect - specifies post-animation structural effects:
er is
reset to its pre-animation state.visitedTheme are
applied to er.
The following properties of er are
modified:
visibilitylineColorlineTypesourceArrowtargetArrowpreferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that simulates edge traversal
by partially applying the visual properties of
visitedTheme to erer must be bound to a edge that belongs
to a Graph2D.
public AnimationObject traverseEdge(EdgeRealizer er,
EdgeRealizer visitedTheme,
EdgeRealizer unvisitedTheme,
boolean srcToTgt,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that continuously applies the
given visitedTheme to er while traversing the
edge path of er from source node to target node.
The animation effect will not reflect changes that are made
to er after the animation has been initialized.
IllegalArgumentException - if preferredDuration is
less than 0.er - the edge path to be traversed.visitedTheme - the EdgeRealizer whose visual
properties are used to mark the already
traversed portion of the path.unvisitedTheme - the EdgeRealizer whose visual
properties are used to mark the not yet
traversed portion of the path.srcToTgt - if true the edge path is traversed
from source node to target node;
otherwise the direction is inverted.effect - specifies post-animation structural effects:
er is
reset to its pre-animation state.visitedTheme are
applied to er.
The following properties of er are
modified:
visibilitylineColorlineTypesourceArrowtargetArrowpreferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that simulates edge traversal
by partially applying the visual properties of
visitedTheme to erer must be bound to a edge that belongs
to a Graph2D.
public AnimationObject traversePath(GeneralPath path,
boolean invertPath,
Value2DSettable position,
Value2DSettable direction,
long preferredDuration)
AnimationObject that allows for generic movement
related effects.
The position on the path and the direction of the movement at any given
time during the animation is reported via the specified
position's and direction's set
methods.
IllegalArgumentException - if preferredDuration is
less than 0.path - the GeneralPath to be traversed.invertPath - if true, the specified path
is traversed backwards, i.e. from last point
to first point.position - callback provider for the position on the path
at any given time during the animation.direction - callback provider for the direction of the
movement at any given time during the animation.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that allows for generic movement
related effects.
public AnimationObject moveCamera(Value2D destination,
long preferredDuration)
AnimationObject that simulates camera
movement for this factory's Graph2DView.
IllegalArgumentException - if preferredDuration is
less than 0.destination - the destination of the camera movement.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that simulates camera
movement.destination is the center of
view.
public AnimationObject moveCamera(GeneralPath path,
long preferredDuration)
AnimationObject that simulates camera
movement for this factory's Graph2DView along the
given GeneralPath.
IllegalArgumentException - if preferredDuration is
less than 0.path - the path of the camera movement.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that simulates camera
movement.GeneralPath is the center of view.
public AnimationObject zoom(double newZoom,
ViewAnimationFactory.StructuralEffect effect,
long preferredDuration)
AnimationObject that applies the
specified zoom factor to this factory's Graph2DView.
IllegalArgumentException - if preferredDuration is
less than 0.newZoom - the new zoom factor for the given
Graph2DView.effect - specifies post-animation structural effects:
preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies the
specified zoom factor to this factory's Graph2DView.
public AnimationObject fadeIn(Graph2D graph,
ViewAnimationFactory.NodeOrder order,
boolean obeyEdgeDirection,
double ratio,
long preferredDuration)
AnimationObject that applies a fade-in effect to
the specified Graph2D by successively fading in nodes
and extracting edges.
IllegalArgumentException - if preferredDuration is
less than 0.graph - the Graph to which the
fade effect is applied.order - specifies an ordering of the nodes in
graph that determines the
chronological order of the fade-in effects
for the nodes.obeyEdgeDirection - if true, edge extraction is done
from edge source to edge target;
otherwise edge extraction is done according
to the given NodeOrder.ratio - specifies the ratio of the preferred duration
for the fade effects of the individual graph
objects to the total preferred duration
given by preferredDuration.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
invisibility to visibility effect to graph.visible property of all
realizers in graph will be true.
public AnimationObject fadeOut(Graph2D graph,
ViewAnimationFactory.NodeOrder order,
boolean obeyEdgeDirection,
double ratio,
long preferredDuration)
AnimationObject that applies a fade-out effect to
the specified Graph2D by successively fading out nodes
and retracting edges.
IllegalArgumentException - if preferredDuration is
less than 0.graph - the Graph to which the
fade effect is applied.order - specifies an ordering of the nodes in
graph that determines the
chronological order of the fade-out effects
for the nodes.obeyEdgeDirection - if true, edge retraction is done
from edge source to edge target;
otherwise edge retraction is done according
to the given NodeOrder.ratio - specifies the ratio of the preferred duration
for the fade effects of the individual graph
objects to the total preferred duration
given by preferredDuration.preferredDuration - the preferred animation duration measured in
milliseconds.
AnimationObject that applies a fade from
visibility to invisibility effect to graph.visible property of all
realizers in graph will be false.public static Drawable createDrawable(NodeRealizer nr)
Drawable representation of the specified
NodeRealizer that is independent of the graph to which the
realizer's node belongs.
nr - the NodeRealizer
Drawable representation of nr.public static Drawable createDrawable(EdgeRealizer er)
Drawable representation of the specified
EdgeRealizer that is independent of the graph to which the
realizer's edge belongs.
This implementation works properly for simple edge paths only.
er - the EdgeRealizer
Drawable representation of er.public static Drawable createDrawable(YLabel label)
Drawable representation of the specified
YLabel.
label - the YLabel
Drawable representation of label.public AnimationPlayer createConfiguredPlayer()
AnimationPlayer that is set to be
non-blocking and on which an AnimationListener, which
ensures that this factory's Graph2DView gets updated
on animation events, has been registered.
AnimationPlayer
public AnimationObject focusView(double newZoom,
Value2D newCenter,
long preferredDuration)
AnimationObject that smoothly changes the zoom
level and center view point of this factory's Graph2DView.
IllegalArgumentException - if preferredDuration is
less than 0.newZoom - the new zoom levelnewCenter - the new center coordinate of the view.preferredDuration - the preferred animation duration measured in milliseconds.
AnimationObject that that smoothly changes the zoom
level and center view point of this factory's Graph2DView.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||