public class IlvCompositeBehavior extends IlvSingleBehavior
IlvCompositeBehavior
is used to set several
values at the same time by means of a single behavior object.
This class is defined only for compatibility with Views C++ prototypes.
It should not be used when creating new prototypes.Constructor and Description |
---|
IlvCompositeBehavior(IlvCompositeBehavior source)
Creates a new behavior object by copying an existing one.
|
IlvCompositeBehavior(IlvInputStream in)
Reads the behavior from an
IlvInputStream stream. |
IlvCompositeBehavior(String name,
String[] subnames)
Creates a new composite behavior object.
|
Modifier and Type | Method and Description |
---|---|
IlvBehavior |
copy()
Returns a copy of the behavior.
|
protected Object |
get(IlvGroup group,
String name)
Retrieves all the values specified by the
subnames
argument passed to the constructor and returns the last non-null value. |
String[] |
getSubnames()
Gets the
subnames parameter for this behavior object. |
protected void |
set(IlvGroup group,
String name,
Object value)
Changes all the values specified by the
subnames
argument passed to the constructor to the new value . |
void |
setSubnames(String[] subnames)
Sets the
subnames 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 . |
get, getName, getValueNames, set, setName
attach, detach, getParameter, isOutput, isReadable, isWritable
public IlvCompositeBehavior(String name, String[] subnames)
name
- the name of the property defined by the new behavior object.subnames
- the names of the properties that will be set/read
when the name
value is set/read for the group. Subnames
can be values from the group or from elements in the group
(for example, car.wheel.tire.color
).public IlvCompositeBehavior(IlvCompositeBehavior source)
source
- the behavior object to be copied.public IlvCompositeBehavior(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
subnames
argument passed to the constructor to the new value
.set
in class IlvSingleBehavior
group
- the group to which the behavior object is attached.name
- the name of the behavior object.value
- the new value.IlvValueException
- if an error occurred while setting a property.IlvSingleBehavior.set(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
protected Object get(IlvGroup group, String name) throws IlvValueException
subnames
argument passed to the constructor and returns the last non-null value.get
in class IlvSingleBehavior
group
- the group to which the behavior object is attached.name
- the name of the behavior.subnames
argument passed to the constructor.IlvValueException
- if an error occurred while reading a property.IlvSingleBehavior.get(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
public void setSubnames(String[] subnames)
subnames
parameter for this behavior object.public String[] getSubnames()
subnames
parameter for this behavior object.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.