public class IlvRotateBehavior extends IlvAnimationBehavior
IlvRotateBehavior
is used to rotate a prototype
element at a specified time interval.Constructor and Description |
---|
IlvRotateBehavior(IlvInputStream in)
Reads the behavior from an
IlvInputStream stream. |
IlvRotateBehavior(IlvRotateBehavior source)
Creates a new behavior object by copying an existing one.
|
IlvRotateBehavior(String name,
String period,
String elementName,
String angle,
String centerX,
String centerY)
Creates a new rotate behavior object.
|
Modifier and Type | Method and Description |
---|---|
IlvBehavior |
copy()
Returns a copy of the behavior.
|
protected void |
doit()
Rotates the element specified by the
elementName parameter
according to the angle of rotation specified by the angle
parameter, around the point specified by the centerX and
centerY parameters. |
String |
getAngle()
Gets the
angle parameter for this behavior object. |
String |
getCenterX()
Gets the
centerX parameter for this behavior object. |
String |
getCenterY()
Gets the
centerY parameter of this behavior. |
String |
getElementName()
Gets the
elementName parameter for this behavior object. |
int |
getSynchronizationCount()
Implementation of the Timer interface.
|
void |
setAngle(String angle)
Sets the
angle parameter for this behavior object. |
void |
setCenterX(String centerX)
Sets the
centerX parameter for this behavior object. |
void |
setCenterY(String centerY)
Sets the
centerY parameter for this behavior object. |
void |
setElementName(String elementName)
Sets the
elementName parameter for this behavior object. |
String |
toString()
Returns a short text describing this behavior object.
|
void |
write(IlvOutputStream out)
Writes the behavior to an
IlvOutputStream . |
attach, detach, get, getPeriod, getTimerPeriod, set, setPeriod, start, stop, timerTicked
get, getName, getValueNames, set, setName
getParameter, isOutput, isReadable, isWritable
public IlvRotateBehavior(String name, String period, String elementName, String angle, String centerX, String centerY)
name
- the name of the Boolean value used to start or stop the rotation.period
- the time interval (in milliseconds) between two rotations. This
value can be either a direct value (for example, 100
), the name of another property, or an expression.elementName
- the name of the element to be rotated. This parameter can be set
to "[all]"
to rotate the whole prototype to which
this behavior object is attached.angle
- the rotation angle (in degrees). This value can be either a direct
value, the name of another property, or an expression.centerX
- the horizontal coordinate of the rotation center. This value can
be either a direct value, the name of another property, or an
expression.centerY
- the vertical coordinate of the rotation center. This value can be
either a direct value, the name of another property, or an
expression.public IlvRotateBehavior(IlvRotateBehavior source)
source
- the behavior object to be copied.public IlvRotateBehavior(IlvInputStream in) throws IlvReadFileException
IlvInputStream
stream. This
constructor must be called by the input constructors of subclasses.in
- The input stream.IlvReadFileException
- if the stream format is not correct.public void write(IlvOutputStream out) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvAnimationBehavior
out
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public IlvBehavior copy()
copy
in class IlvBehavior
public String toString()
toString
in class IlvBehavior
protected void doit() throws IlvValueException
elementName
parameter
according to the angle of rotation specified by the angle
parameter, around the point specified by the centerX
and
centerY
parameters. All these parameters are passed to the
constructor.doit
in class IlvAnimationBehavior
IlvValueException
- if an error occurred while setting or reading a value.public void setElementName(String elementName)
elementName
parameter for this behavior object.public String getElementName()
elementName
parameter for this behavior object.public void setAngle(String angle)
angle
parameter for this behavior object.public String getAngle()
angle
parameter for this behavior object.public void setCenterX(String centerX)
centerX
parameter for this behavior object.public String getCenterX()
centerX
parameter for this behavior object.public void setCenterY(String centerY)
centerY
parameter for this behavior object.public String getCenterY()
centerY
parameter of this behavior.public int getSynchronizationCount()
getSynchronizationCount
in class IlvAnimationBehavior
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.