org.eclipse.draw2d
Class RoutingAnimator
java.lang.Object
org.eclipse.draw2d.Animator
org.eclipse.draw2d.RoutingAnimator
-
All Implemented Interfaces:
-
RoutingListener
- public class RoutingAnimator
- extends
Animator
- implements
RoutingListener
Animates the routing of a connection. The animator will capture the effects of the
connection's router, and the play back the placement of the routing, interpolating the
intermediate routes.
To use a routing animator, hook it as a routing listener for the connection whose
points are to be animated, by calling
PolylineConnection.addRoutingListener(RoutingListener)
. An animator is active
only when the Animation utility is activated.
-
Since:
- 3.2
Constructor Summary
|
protected
|
RoutingAnimator
()
Constructs a routing animator for use with one or more connections. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
RoutingAnimator
protected RoutingAnimator()
- Constructs a routing animator for use with one or more connections. The default
instance (
getDefault()
can be used on any number of connections.
-
Since:
- 3.2
playbackStarting
public void playbackStarting(
IFigure connection)
- Overridden to sync initial and final states.
-
-
Overrides:
-
playbackStarting
in class
Animator
-
-
Parameters:
-
connection
- the figure -
See Also:
-
Animator.playbackStarting(IFigure)
getCurrentState
protected java.lang.Object getCurrentState(
IFigure connection)
- Returns the current state of the connection. Currently, this is a copy of the list of
points. However this Object could change in future releases and should not be
considered API.
-
-
Specified by:
-
getCurrentState
in class
Animator
-
-
Parameters:
-
connection
- the figure
-
Returns:
- the current state
-
See Also:
-
Animator.getCurrentState(IFigure)
getDefault
public static
RoutingAnimator getDefault()
- Returns the default instance.
-
-
-
Returns:
- the default instance
-
Since:
- 3.2
invalidate
public final void invalidate(
Connection conn)
- Hooks invalidate for animation purposes.
-
-
Specified by:
-
invalidate
in interface
RoutingListener
-
-
Parameters:
-
conn
- the connection -
See Also:
-
RoutingListener.invalidate(Connection)
playback
protected boolean playback(
IFigure figure)
- Plays back the interpolated state.
-
-
Overrides:
-
playback
in class
Animator
-
-
Parameters:
-
figure
- the figure being animated
-
Returns:
-
true
if playback was successful -
See Also:
-
Animator.playback(IFigure)
postRoute
public final void postRoute(
Connection connection)
- Hooks post routing for animation purposes.
-
-
Specified by:
-
postRoute
in interface
RoutingListener
-
-
Parameters:
-
connection
- the routed connection -
See Also:
-
RoutingListener.postRoute(Connection)
remove
public final void remove(
Connection connection)
- This callback is unused. Reserved for possible future use.
-
-
Specified by:
-
remove
in interface
RoutingListener
-
-
Parameters:
-
connection
- the connection -
See Also:
-
RoutingListener.remove(Connection)
route
public final boolean route(
Connection conn)
- Hooks route to intercept routing during animation playback.
-
-
Specified by:
-
route
in interface
RoutingListener
-
-
Parameters:
-
conn
- the connection being routed
-
Returns:
-
true
if routing has been performed by the listener -
See Also:
-
RoutingListener.route(Connection)
setConstraint
public final void setConstraint(
Connection connection,
java.lang.Object constraint)
- This callback is unused. Reserved for possible future use.
-
-
Specified by:
-
setConstraint
in interface
RoutingListener
-
-
Parameters:
-
connection
- the connection -
constraint
- the new constraint -
See Also:
-
RoutingListener.setConstraint(Connection, Object)
Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.