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
ConstructorsModifierConstructorDescriptionprotected
Constructs a routing animator for use with one or more connections. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getCurrentState
(IFigure connection) Returns the current state of the connection.static RoutingAnimator
Returns the default instance.final void
invalidate
(Connection conn) Hooks invalidate for animation purposes.protected boolean
Plays back the interpolated state.void
playbackStarting
(IFigure connection) Overridden to sync initial and final states.final void
postRoute
(Connection connection) Hooks post routing for animation purposes.final void
remove
(Connection connection) This callback is unused.final boolean
route
(Connection conn) Hooks route to intercept routing during animation playback.final void
setConstraint
(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:
playbackStarting
in 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:
getCurrentState
in 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:
invalidate
in interfaceRoutingListener
- Parameters:
conn
- the connection- See Also:
-
playback
Plays back the interpolated state. -
postRoute
Hooks post routing for animation purposes.- Specified by:
postRoute
in interfaceRoutingListener
- Parameters:
connection
- the routed connection- See Also:
-
remove
This callback is unused. Reserved for possible future use.- Specified by:
remove
in interfaceRoutingListener
- Parameters:
connection
- the connection- See Also:
-
route
Hooks route to intercept routing during animation playback.- Specified by:
route
in interfaceRoutingListener
- Parameters:
conn
- the connection being routed- Returns:
true
if routing has been performed by the listener- See Also:
-
setConstraint
This callback is unused. Reserved for possible future use.- Specified by:
setConstraint
in interfaceRoutingListener
- Parameters:
connection
- the connectionconstraint
- the new constraint- See Also:
-