public abstract class IlvSingleBehavior extends IlvBehavior
IlvSingleBehavior
is an abstract class that provides a
simple way of defining behavior objects which handle a single property.
Most of the predefined behavior classes supplied in the package
ilog.views.prototypes
derive from this class.
IlvBehavior
,
IlvGroup
,
IlvGroup
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
IlvSingleBehavior()
Creates a new, unnamed
IlvSingleBehavior object. |
protected |
IlvSingleBehavior(IlvInputStream in)
Reads the behavior from an
IlvInputStream stream. |
protected |
IlvSingleBehavior(IlvSingleBehavior source)
Creates a new behavior object by copying an existing one.
|
protected |
IlvSingleBehavior(String name)
Creates a new
IlvSingleBehavior . |
Modifier and Type | Method and Description |
---|---|
protected Object |
get(IlvGroup group,
String name)
Called by
get with the single value handled by this behavior
object. |
protected void |
get(IlvGroup group,
String[] names,
Object[] values,
boolean[] done)
If the array
names contains the name of this behavior object,
the method calls get with this value. |
String |
getName()
Returns the name of the property handled by this behavior object.
|
protected String[] |
getValueNames(IlvGroup group)
Returns an array containing a single string.
|
protected void |
set(IlvGroup group,
String[] names,
Object[] values,
boolean[] done)
If the array
names contains the name of this behavior object,
the method calls set with this value. |
protected void |
set(IlvGroup group,
String name,
Object value)
Called by
set with the single value handled by this behavior
object. |
void |
setName(String name)
Sets the name of the property handled by this behavior object.
|
void |
write(IlvOutputStream out)
Writes the behavior to an
IlvOutputStream . |
attach, copy, detach, getParameter, isOutput, isReadable, isWritable, toString
protected IlvSingleBehavior()
IlvSingleBehavior
object.protected IlvSingleBehavior(String name)
IlvSingleBehavior
.name
- the name of the property handled by this behavior object.protected IlvSingleBehavior(IlvSingleBehavior source)
source
- the behavior object to be copied.protected IlvSingleBehavior(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 IlvBehavior
out
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public final String getName()
public void setName(String name)
renameValue
of the class
IlvGroup
.setName
in class IlvBehavior
name
- the new name of the property.IlvGroup.renameValue(java.lang.String, java.lang.String)
protected final void set(IlvGroup group, String[] names, Object[] values, boolean[] done) throws IlvValueException
names
contains the name of this behavior object,
the method calls set
with this value.set
in class IlvBehavior
group
- the group to which this behavior is attached.names
- the names of the properties to be set.values
- the new values.done
- an array of boolean values.IlvValueException
- if an error occurred while setting a property.set(ilog.views.prototypes.IlvGroup,
java.lang.String, java.lang.Object)
protected final void get(IlvGroup group, String[] names, Object[] values, boolean[] done) throws IlvValueException
names
contains the name of this behavior object,
the method calls get
with this value.get
in class IlvBehavior
group
- the group to which this behavior object is attached.names
- the names of the properties to be retrieved.values
- the array where the values read will be stored.done
- an array of boolean values.IlvValueException
- if an error occurred while reading a property.get(ilog.views.prototypes.IlvGroup,
java.lang.String)
protected String[] getValueNames(IlvGroup group) throws IlvValueException
getValueNames
in class IlvBehavior
group
- the group to which this behavior object is attached.IlvValueException
- if a error occurred while reading a property.protected void set(IlvGroup group, String name, Object value) throws IlvValueException
set
with the single value handled by this behavior
object.
The default implementation does nothing.
group
- the group to which this behavior is attached.name
- the name of the property to be set.value
- the new value.IlvValueException
- if an error occurred while setting a property.set(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
protected Object get(IlvGroup group, String name) throws IlvValueException
get
with the single value handled by this behavior
object.
The default implementation returns null
.
group
- the group to which this behavior object is attached.name
- the name of the property to be read.IlvValueException
- if an error occurred while reading a property.get(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.