public class IlvBlinkBehavior extends IlvAnimationBehavior
IlvBlinkBehavior
is a subclass of IlvAnimationBehavior
that makes an object flash on and off at a specified time interval.Constructor and Description |
---|
IlvBlinkBehavior(IlvBlinkBehavior source)
Creates a new behavior object by copying an existing one.
|
IlvBlinkBehavior(IlvInputStream in)
Reads the behavior from an
IlvInputStream stream. |
IlvBlinkBehavior(String name,
String period,
String blinkProperty)
Creates a new
IlvBlinkBehavior object that periodically toggles a
given value between true and false . |
Modifier and Type | Method and Description |
---|---|
IlvBehavior |
copy()
Returns a copy of the behavior.
|
protected void |
doit()
Reads the current
blinkProperty of the group and sets it
to its opposite value. |
String |
getBlinkProperty()
Gets the
blinkProperty parameter for this behavior object. |
int |
getSynchronizationCount()
Implementation of the Timer interface.
|
void |
setBlinkProperty(String blinkProperty)
Sets the
blinkProperty 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 IlvBlinkBehavior(String name, String period, String blinkProperty)
IlvBlinkBehavior
object that periodically toggles a
given value between true
and false
.name
- the name of the Boolean value used
to start or stop the animation.period
- the time interval
(in milliseconds) between two blinkings. This value
can be either a direct value (for example, 100
), the
name of another property, or an expression.blinkProperty
- the name of the property that will be toggled between
true
and false
. This value is generally
the visible
value of a group element, but it can
also be any other value.public IlvBlinkBehavior(IlvBlinkBehavior source)
source
- the behavior object to be copied.public IlvBlinkBehavior(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
blinkProperty
of the group and sets it
to its opposite value.doit
in class IlvAnimationBehavior
IlvValueException
- if an error occurred while reading a property.public void setBlinkProperty(String blinkProperty)
blinkProperty
parameter for this behavior object.public String getBlinkProperty()
blinkProperty
parameter for this behavior object.public int getSynchronizationCount()
getSynchronizationCount
in class IlvAnimationBehavior
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.