public class IlvGroupBehavior extends IlvSingleBehavior
IlvGroupBehavior
class is used to define properties that
will be applied to all the elements of a group.
Example:
If the group behavior foreground
is attached to a group as
follows:
group.addBehavior(new IlvGroupBehavior("foreground"));Then the call:
group.set("foreground", new Color(255, 0, 0));will set the color of every graphic object contained in the group.
Constructor and Description |
---|
IlvGroupBehavior(IlvGroupBehavior source)
Creates a new behavior object by copying an existing one.
|
IlvGroupBehavior(IlvInputStream in)
Reads the behavior from an
IlvInputStream stream. |
IlvGroupBehavior(String name)
Creates a new group behavior object that handles the property
name . |
Modifier and Type | Method and Description |
---|---|
IlvBehavior |
copy()
Returns a copy of the behavior.
|
protected Object |
get(IlvGroup group,
String name)
Gets the value
name from all the elements in the specified
group. |
protected void |
set(IlvGroup group,
String name,
Object value)
Sets the value
name to value for all the elements
in the group. |
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 IlvGroupBehavior(String name)
name
.public IlvGroupBehavior(IlvGroupBehavior source)
source
- the behavior object to be copied.public IlvGroupBehavior(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
name
to value
for all the elements
in the group.set
in class IlvSingleBehavior
group
- the group to which the behavior object is attached.name
- the name of the property to be set.value
- the new value.IlvValueException
- if an error occurred while setting or reading a value.IlvSingleBehavior.set(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
protected Object get(IlvGroup group, String name) throws IlvValueException
name
from all the elements in the specified
group.get
in class IlvSingleBehavior
group
- the group to which the behavior object is attached.name
- the name of the property to be set.IlvGroup.indeterminate
.IlvValueException
- if an error occurred while setting or reading a value.IlvSingleBehavior.get(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.