public class IlvExportBehavior extends IlvSingleBehavior
IlvExportBehavior
class maps
a property of a group element to a property of the group.
Example:
Let us suppose that you define a group containing a graphic element named
circle
. To define a value circleColor
that sets the color of the circle
element, you
would add an IlvExportBehavior
object as follows:
group.addBehavior(new IlvExportBehavior("circleColor", "circle", "foreground"));
IlvExportOutputBehavior
,
Serialized FormConstructor and Description |
---|
IlvExportBehavior(IlvExportBehavior source)
Creates a new behavior object by copying an existing one.
|
IlvExportBehavior(IlvInputStream in)
Reads the behavior from an
IlvInputStream stream. |
IlvExportBehavior(String name,
String elementName,
String elementProperty)
Creates a new export behavior object.
|
Modifier and Type | Method and Description |
---|---|
IlvBehavior |
copy()
Returns a copy of the behavior.
|
protected Object |
get(IlvGroup group,
String name)
Retrieves the value specified by the
elementProperty parameter for the group element
specified by the elementName parameter. |
String |
getElementName()
Gets the
elementName parameter for this behavior object. |
String |
getElementProperty()
Gets the
elementProperty parameter for this behavior object. |
protected void |
set(IlvGroup group,
String name,
Object value)
Changes the value specified by the
elementProperty parameter for the group element specified
by the elementName parameter to the new
value . |
void |
setElementName(String elementName)
Sets the
elementName parameter for this behavior object. |
void |
setElementProperty(String elementProperty)
Sets the
elementProperty 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 IlvExportBehavior(String name, String elementName, String elementProperty)
name
- the name of the behavior object.elementName
- the name of the group element.elementProperty
- the name of the property to be exported.public IlvExportBehavior(IlvExportBehavior source)
source
- the behavior object to be copied.public IlvExportBehavior(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
elementProperty
parameter for the group element specified
by the elementName
parameter 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
elementProperty
parameter for the group element
specified by the elementName
parameter.get
in class IlvSingleBehavior
group
- the group to which the behavior object is attached.name
- the name of the behavior object.IlvValueException
- if an error occurred while reading a property.IlvSingleBehavior.get(ilog.views.prototypes.IlvGroup,
java.lang.String[], java.lang.Object[], boolean[])
public void setElementName(String elementName)
elementName
parameter for this behavior object.public String getElementName()
elementName
parameter for this behavior object.public void setElementProperty(String elementProperty)
elementProperty
parameter for this behavior object.public String getElementProperty()
elementProperty
parameter for this behavior object.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.