public class IlvToggleBehavior extends IlvSingleBehavior
IlvToggleBehavior
is used to toggle a Boolean value
between true
and false
.
This class is defined only for compatibility with Views C++ prototypes. It
should not be used when creating new prototypes. Instead, you should use an
IlvTriggerBehavior
object, and use the expression "!source" for
the source value.IlvTriggerBehavior
,
Serialized FormConstructor and Description |
---|
IlvToggleBehavior(IlvInputStream in)
Reads the behavior from an
IlvInputStream stream. |
IlvToggleBehavior(IlvToggleBehavior source)
Creates a new behavior object by copying an existing one.
|
IlvToggleBehavior(String name,
String value)
Creates a new toggle behavior object.
|
Modifier and Type | Method and Description |
---|---|
IlvBehavior |
copy()
Returns a copy of the behavior.
|
String |
getValue()
Gets the
value parameter of this behavior. |
protected void |
set(IlvGroup group,
String name,
Object value)
Toggles the Boolean value specified by the
value parameter
passed to the constructor. |
void |
setValue(String value)
Sets the
value parameter of this behavior. |
String |
toString()
Returns a short text describing this behavior object.
|
void |
write(IlvOutputStream out)
Writes the behavior to an
IlvOutputStream . |
get, get, getName, getValueNames, set, setName
attach, detach, getParameter, isOutput, isReadable, isWritable
public IlvToggleBehavior(String name, String value)
name
- the name of this behavior object.value
- the name of the property to be toggled.public IlvToggleBehavior(IlvToggleBehavior source)
source
- the behavior object to be copied.public IlvToggleBehavior(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 IlvSingleBehavior
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 set(IlvGroup group, String name, Object value) throws IlvValueException
value
parameter
passed to the constructor.set
in class IlvSingleBehavior
group
- the group to which this behavior object is attached.name
- the name of this behavior object.value
- the new value. Actually, this value is ignored because the
specified value is toggled only if this behavior object has been
set.IlvValueException
- if an error occurred while setting a property.IlvSingleBehavior.set(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
public void setValue(String value)
value
parameter of this behavior.public String getValue()
value
parameter of this behavior.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.