public class IlvLinkImageAnimator extends Object implements IlvObjectAnimator, IlvApplyObject
IlvLinkImageAnimator
allows you to animate changes in the
shape of an IlvLinkImage
in an IlvManager
.
When an IlvManagerAnimator
is attached to the
IlvManager
, an IlvLinkImageAnimator
is created for
each link managed by the manager to support animation.
IlvManagerAnimator
,
IlvManagerAnimator.createLinkImageAnimator(ilog.views.IlvLinkImage)
Constructor and Description |
---|
IlvLinkImageAnimator(IlvLinkImage l)
Creates a new
IlvLinkImageAnimator . |
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.
|
void |
apply(IlvGraphic obj,
Object arg)
Reshapes the link.
|
double |
getNewLineWidth()
Returns the line width of the link that should be reached at the end
of the sequence of animation steps.
|
IlvPoint[] |
getNewLinkPoints()
Returns the new link points of the link, which define the shape
that should be reached at the end of the sequence of animation steps.
|
double |
getOldLineWidth()
Returns the line width that was recorded for the link.
|
IlvPoint[] |
getOldLinkPoints()
Returns the old link points recorded for the link.
|
void |
recordState()
Records the current state of the link in the link animator.
|
public IlvLinkImageAnimator(IlvLinkImage l)
IlvLinkImageAnimator
.l
- The link image to be animated.public IlvPoint[] getOldLinkPoints()
public IlvPoint[] getNewLinkPoints()
IlvManagerAnimator.animate()
, when animInit()
is called; they are cleaned up at the end of IlvManagerAnimator.animate()
,
when animCleanup()
is called.
animInit()
,
animStep(ilog.views.IlvManager, int, int)
,
animCleanup()
,
IlvLinkImage.getLinkPoints(ilog.views.IlvTransformer)
,
IlvLinkImage.getConnectionPoints(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
,
IlvLinkImage.setIntermediateLinkPoints(ilog.views.IlvPoint[], int, int)
public double getOldLineWidth()
public double getNewLineWidth()
IlvManagerAnimator.animate()
, when animInit()
is called.
public void recordState()
IlvManagerAnimator.recordState()
.
It updates the old link points and the old line width.
An animation sequence always shows the movement between the previous
recorded state and the current state.
recordState
in interface IlvObjectAnimator
IlvManagerAnimator.recordState()
,
getOldLinkPoints()
,
getOldLineWidth()
public void animInit()
animate
is performed. It updates the new link points and
the new line width.
animInit
in interface IlvObjectAnimator
IlvManagerAnimator.animate()
,
getNewLinkPoints()
,
getNewLineWidth()
public void animCleanup()
animate
is performed. It cleans up the memory.
animCleanup
in interface IlvObjectAnimator
IlvManagerAnimator.animate()
,
getNewLinkPoints()
public boolean animStep(IlvManager manager, int i, int maxI)
i = 1
to i = maxI
by
IlvManagerAnimator.animate()
to show 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)
public void apply(IlvGraphic obj, Object arg)
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
, which calls IlvApplyObject.apply(ilog.views.IlvGraphic, java.lang.Object)
.
Therefore the link animator implements the IlvApplyObject
interface.apply
in interface IlvApplyObject
obj
- The link.arg
- Unused.IlvApplyObject
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.