Package org.eclipse.draw2d
Class RoutingAnimator
java.lang.Object
org.eclipse.draw2d.Animator
org.eclipse.draw2d.RoutingAnimator
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.draw2d.RoutingListener
RoutingListener.Stub -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a routing animator for use with one or more connections. -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetCurrentState(IFigure connection) Returns the current state of the connection.static RoutingAnimatorReturns the default instance.final voidinvalidate(Connection conn) Hooks invalidate for animation purposes.protected booleanPlays back the interpolated state.voidplaybackStarting(IFigure connection) Overridden to sync initial and final states.final voidpostRoute(Connection connection) Hooks post routing for animation purposes.final voidremove(Connection connection) This callback is unused.final booleanroute(Connection conn) Hooks route to intercept routing during animation playback.final voidsetConstraint(Connection connection, Object constraint) This callback is unused.Methods inherited from class org.eclipse.draw2d.Animator
capture, init, recordFinalState, recordInitialState, tearDown
-
Constructor Details
-
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
-
-
Method Details
-
playbackStarting
Overridden to sync initial and final states.- Overrides:
playbackStartingin classAnimator- Parameters:
connection- the figure- See Also:
-
getCurrentState
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:
getCurrentStatein classAnimator- Parameters:
connection- the figure- Returns:
- the current state
- See Also:
-
getDefault
Returns the default instance.- Returns:
- the default instance
- Since:
- 3.2
-
invalidate
Hooks invalidate for animation purposes.- Specified by:
invalidatein interfaceRoutingListener- Parameters:
conn- the connection- See Also:
-
playback
Plays back the interpolated state. -
postRoute
Hooks post routing for animation purposes.- Specified by:
postRoutein interfaceRoutingListener- Parameters:
connection- the routed connection- See Also:
-
remove
This callback is unused. Reserved for possible future use.- Specified by:
removein interfaceRoutingListener- Parameters:
connection- the connection- See Also:
-
route
Hooks route to intercept routing during animation playback.- Specified by:
routein interfaceRoutingListener- Parameters:
conn- the connection being routed- Returns:
trueif routing has been performed by the listener- See Also:
-
setConstraint
This callback is unused. Reserved for possible future use.- Specified by:
setConstraintin interfaceRoutingListener- Parameters:
connection- the connectionconstraint- the new constraint- See Also:
-