|
Eclipse Draw2d 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.Animator
org.eclipse.draw2d.LayoutAnimator
Animates the layout of a figure's children. The animator will capture the effects of a layout manager, and then play back the placement of children using linear interpolation for each child's start and end locations.
To use an animator, hook it as a layout listener for the figure whose layout is to
be animated, by calling IFigure.addLayoutListener(LayoutListener). It is not
necessary to have an animator for every figure in a composition that is undergoing
animation. For example, if a figure without an animator moves during the animation, it
will continue to move and layout its children normally during each step of the
animation.
Animator must be used in conjunction with layouts. If figures are placed manually using
setBounds(), the animator may not be able to track and playback the
changes that occur.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.draw2d.LayoutListener |
LayoutListener.Stub |
| Constructor Summary | |
protected |
LayoutAnimator()
Constructs a new Animator. |
| Method Summary | |
protected Object |
getCurrentState(IFigure container)
Returns an object encapsulating the placement of children in a container. |
static LayoutAnimator |
getDefault()
Returns the default instance. |
void |
invalidate(IFigure container)
Hooks invalidation in case animation is in progress. |
boolean |
layout(IFigure container)
Hooks layout in case animation is in progress. |
protected boolean |
playback(IFigure container)
Plays back the animated layout. |
void |
postLayout(IFigure container)
Hooks post layout in case animation is in progress. |
void |
remove(IFigure child)
This callback is unused. |
void |
setConstraint(IFigure child,
Object constraint)
This callback is unused. |
| Methods inherited from class org.eclipse.draw2d.Animator |
capture, init, playbackStarting, recordFinalState, recordInitialState, tearDown |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected LayoutAnimator()
getDefault()) can be used on
all figures being animated.
| Method Detail |
protected Object getCurrentState(IFigure container)
getCurrentState in class Animatorcontainer - the container figure
public static LayoutAnimator getDefault()
public final void invalidate(IFigure container)
invalidate in interface LayoutListenercontainer - the invalidated FigureLayoutListener.invalidate(IFigure)public final boolean layout(IFigure container)
layout in interface LayoutListenercontainer - the figure incurring a layout
true if the layout has been intercepted by the listenerLayoutListener.layout(org.eclipse.draw2d.IFigure)protected boolean playback(IFigure container)
playback in class Animatorcontainer - the figure being animated
true if playback was successfulAnimator.playback(IFigure)public final void postLayout(IFigure container)
postLayout in interface LayoutListenercontainer - the figure incurring a layoutLayoutListener.postLayout(IFigure)public final void remove(IFigure child)
remove in interface LayoutListenerchild - the child being removedLayoutListener.remove(IFigure)
public final void setConstraint(IFigure child,
Object constraint)
setConstraint in interface LayoutListenerchild - the child being updatedconstraint - the child's new constraintLayoutListener.setConstraint(IFigure, Object)
|
Eclipse Draw2d 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||