public class IlvPrototype extends IlvGroup
IlvPrototype
implements groups that can be duplicated
and reused in applications.
A prototype is basically a group that can be used as a model to create other groups (the prototype's instances). The instances of a prototype are full copies of this prototype that have the capability to compare their own properties with the properties of the original prototype, so that only the differences are recorded. When the structure or the behavior of a prototype is modified, its existing instances will inherit from these modifications.
Prototypes are organized in libraries. Prototype libraries are responsible for loading and saving prototypes using different formats.
indeterminate
Constructor and Description |
---|
IlvPrototype(IlvInputStream in)
Reads a prototype.
|
IlvPrototype(IlvPrototype source)
Creates a copy of the given prototype.
|
IlvPrototype(String name)
Creates a new prototype.
|
Modifier and Type | Method and Description |
---|---|
void |
addInitialValue(String name,
Object value)
Adds an initial value to this prototype.
|
void |
clear()
Removes all the elements, behavior objects, and initial values of this
prototype.
|
IlvGroupElement |
copy()
Returns a copy of this prototype.
|
void |
copy(IlvGroup source)
Makes this prototype a copy of another prototype.
|
IlvPrototypeInstance |
createInstance(String name)
Creates a new instance of this prototype.
|
String[] |
getInitialValueNames()
Returns the names of the initial values of this prototype.
|
Object[] |
getInitialValues()
Returns the initial values of this prototype.
|
IlvPrototypeLibrary |
getLibrary()
Returns the prototype library to which this prototype belongs.
|
void |
removeInitialValue(String name)
Removes an initial value from this prototype.
|
void |
setName(String name)
Sets the name of this prototype.
|
void |
write(IlvOutputStream out)
Writes a prototype.
|
addBehavior, addElement, findElement, getBehaviors, getElements, getGroupBag, getGroupFrame, getTopGroup, getValueNames, isABehaviorValue, isOutput, isPrivate, removeBehavior, removeElement, renameValue, setMessageWriter, setPrivate, swapBehaviors, traverse, unsubscribe
applyTransform, applyTransform, boundingBox, boundingBox, get, get, get, getBoolean, getDouble, getFloat, getInt, getLong, getName, getParent, getRelativePath, getString, getSubscribers, getSubscriptionValues, move, pushValue, pushValues, set, set, set, set, set, set, set, subscribe
public IlvPrototype(String name)
name
- the name of the new prototype.public IlvPrototype(IlvPrototype source) throws IlvValueException
source
- the prototype to be copied.IlvValueException
- if an error occurred while setting or reading a value.public IlvPrototype(IlvInputStream in) throws IlvReadFileException
IlvReadFileException
- if an error occurred while reading the prototype.public void write(IlvOutputStream out) throws IOException
write
in interface IlvPersistentObject
write
in class IlvGroup
out
- the stream to which the group is written.IOException
- if an error occurred while writing the prototype.IlvGroup.write(ilog.views.io.IlvOutputStream)
public void copy(IlvGroup source) throws IlvValueException
IlvGroup
to copy the initial values of the
source prototype.
copy
in class IlvGroup
source
- the prototype from which elements, behaviors, and initial values
are copied.IlvValueException
- if an error occurred while copying the prototype.public IlvGroupElement copy() throws IlvValueException
copy
in class IlvGroup
IlvValueException
- if an error occurred while setting or reading a value.IlvGroup.copy(ilog.views.prototypes.IlvGroup)
public void clear()
public IlvPrototypeInstance createInstance(String name) throws IlvValueException
name
- the name of the new instance.IlvValueException
- if an error occurred while setting or reading a value.public IlvPrototypeLibrary getLibrary()
public void setName(String name)
setName
in class IlvGroupElement
name
- the new name of the prototype.public void addInitialValue(String name, Object value)
name
- the name of the new initial value.value
- the data of the initial value.public void removeInitialValue(String name)
name
- the name of the initial value to remove.public String[] getInitialValueNames()
public Object[] getInitialValues()
getInitialValueNames
method.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.