public class RoutingAnimator extends Animator implements RoutingListener
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.
RoutingListener.Stub| Modifier | Constructor and Description |
|---|---|
protected |
RoutingAnimator()
Constructs a routing animator for use with one or more connections.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
getCurrentState(IFigure connection)
Returns the current state of the connection.
|
static RoutingAnimator |
getDefault()
Returns the default instance.
|
void |
invalidate(Connection conn)
Hooks invalidate for animation purposes.
|
protected boolean |
playback(IFigure figure)
Plays back the interpolated state.
|
void |
playbackStarting(IFigure connection)
Overridden to sync initial and final states.
|
void |
postRoute(Connection connection)
Hooks post routing for animation purposes.
|
void |
remove(Connection connection)
This callback is unused.
|
boolean |
route(Connection conn)
Hooks route to intercept routing during animation playback.
|
void |
setConstraint(Connection connection,
java.lang.Object constraint)
This callback is unused.
|
capture, init, recordFinalState, recordInitialState, tearDownprotected RoutingAnimator()
getDefault() can be used on any number of
connections.public void playbackStarting(IFigure connection)
playbackStarting in class Animatorconnection - the figureAnimator.playbackStarting(IFigure)protected java.lang.Object getCurrentState(IFigure connection)
getCurrentState in class Animatorconnection - the figureAnimator.getCurrentState(IFigure)public static RoutingAnimator getDefault()
public final void invalidate(Connection conn)
invalidate in interface RoutingListenerconn - the connectionRoutingListener.invalidate(Connection)protected boolean playback(IFigure figure)
playback in class Animatorfigure - the figure being animatedtrue if playback was successfulAnimator.playback(IFigure)public final void postRoute(Connection connection)
postRoute in interface RoutingListenerconnection - the routed connectionRoutingListener.postRoute(Connection)public final void remove(Connection connection)
remove in interface RoutingListenerconnection - the connectionRoutingListener.remove(Connection)public final boolean route(Connection conn)
route in interface RoutingListenerconn - the connection being routedtrue if routing has been performed by the listenerRoutingListener.route(Connection)public final void setConstraint(Connection connection, java.lang.Object constraint)
setConstraint in interface RoutingListenerconnection - the connectionconstraint - the new constraintRoutingListener.setConstraint(Connection, Object)Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.