public class IlvGraphicAnimator extends Object implements IlvObjectAnimator
IlvGraphicAnimator
allows you to animate changes in the
position and size of an IlvGraphic
(a node) in an
IlvManager
.
When an IlvManagerAnimator
is attached to the
IlvManager
, an IlvGraphicAnimator
is created for
each node managed by the manager to support animation.
IlvManagerAnimator
,
IlvManagerAnimator.createGraphicAnimator(ilog.views.IlvGraphic)
Constructor and Description |
---|
IlvGraphicAnimator(IlvGraphic g)
Creates a new
IlvGraphicAnimator . |
Modifier and Type | Method and Description |
---|---|
void |
animCleanup()
Cleans up animation.
|
void |
animInit()
Initializes animation.
|
boolean |
animStep(IlvManager manager,
int i,
int maxI)
This method is called in the ith animation step.
|
IlvRect |
getNewBoundingBox()
Returns the bounding box of the object that should be reached
at the end of the sequence of animation steps.
|
IlvRect |
getOldBoundingBox()
Returns the bounding box that was recorded for the object.
|
boolean |
isResizeAllowed()
Returns
true if resizing the animated object during
animation is allowed. |
void |
recordState()
Records the current state of the object in the object animator.
|
void |
setResizeAllowed(boolean enable)
Sets whether resizing the animated object during animation is
allowed.
|
public IlvGraphicAnimator(IlvGraphic g)
IlvGraphicAnimator
.g
- The graphic to be animated.public IlvRect getOldBoundingBox()
public IlvRect getNewBoundingBox()
IlvManagerAnimator.animate()
when
animInit()
is called; it is cleaned up at the end of
IlvManagerAnimator.animate()
, when animCleanup()
is called.
public void setResizeAllowed(boolean enable)
public boolean isResizeAllowed()
true
if resizing the animated object during
animation is allowed.public void recordState()
IlvManagerAnimator.recordState()
.
It updates the old bounding box.
An animation sequence always shows the movement between the previous
recorded state and the current state.
recordState
in interface IlvObjectAnimator
IlvManagerAnimator.recordState()
,
getOldBoundingBox()
public void animInit()
animate
is performed. It updates the new bounding box.
animInit
in interface IlvObjectAnimator
IlvManagerAnimator.animate()
,
getNewBoundingBox()
public void animCleanup()
animate
is performed. It cleans up the memory.
animCleanup
in interface IlvObjectAnimator
IlvManagerAnimator.animate()
,
getNewBoundingBox()
public boolean animStep(IlvManager manager, int i, int maxI)
i = 1
to i = maxI
by
IlvManagerAnimator.animate()
to show an animated movement,
for example, moving or resizing objects in small steps.
It returns true
if animation must continue for this
object, and false
if animation is finished for this
object after the ith step.
animStep
in interface IlvObjectAnimator
manager
- The manager that contains the graphic to be animated.i
- The number of the current animation step.maxI
- The maximum number of animation steps.IlvManagerAnimator.animate()
,
IlvManagerAnimator.animStep(int)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.