public abstract class IlpAbstractRepresentationNode extends Object implements IlpMutableRepresentationNode, ilog.cpl.css.internal.IlpCSSObject
IlpRepresentationNode
.IlpDefaultNetworkNode
,
IlpDefaultEquipmentNode
VALUE_NOT_SET
Modifier | Constructor and Description |
---|---|
protected |
IlpAbstractRepresentationNode(IlpAttributeGroup model,
IlpExpansionStrategy strategy,
Logger logger)
Creates a new node.
|
protected |
IlpAbstractRepresentationNode(IlpObject object,
IlpExtendedAttributeGroup model,
IlpExpansionStrategy strategy,
Logger logger)
Creates a new node attached to a business object.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttributeValueListener(AttributeValueListener listener)
Adds a listener to attribute value changes.
|
void |
addChild(IlpRepresentationNode child)
Inserts a child.
|
void |
addChildren(IlpRepresentationNode[] children)
Inserts a set of children.
|
void |
addChildren(int[] indices,
IlpRepresentationNode[] children)
Inserts a set of children.
|
void |
addRepresentationNodeListener(RepresentationNodeListener listener)
Adds a listener that is notified each time a change to this
container occurs.
|
void |
addTreeAttributeValueListener(AttributeValueListener listener)
Adds an attribute value listener.
|
void |
fireEvent(AttributeValueEvent event)
Fires an event to the registered attribute value listeners.
|
void |
fireRepresentationNodeEvent(RepresentationNodeEvent event)
Notifies the listeners of a container event.
|
boolean |
getAllowsChildren()
Returns
true if this node allows children. |
IlpAttributeGroup |
getAttributeGroup()
Returns the model that defines which attributes are allowed in
this instance.
|
Object |
getAttributeValue(IlpAttribute attribute)
Returns the value of an attribute of this object.
|
Object |
getAttributeValue(String name)
Returns the value of an attribute of this object.
|
List<IlpRepresentationNode> |
getChildren()
Returns a list of the child objects of this object.
|
String |
getCSSClasses()
Returns the CSS classes of the object.
|
String |
getCSSID(IlpContext context)
Returns the ID of the object.
|
String |
getCSSType()
Returns the type of the object.
|
ilog.cpl.model.edit.IlpRepresentationObjectEditor |
getEditor()
Get the editor for this object.
|
IlpExpansionStrategy |
getExpansionStrategy()
Returns the child object loader that was passed to this object at
construction time.
|
IlpObject |
getIlpObject()
Retrieves the
IlpObject of this representation. |
protected Logger |
getLogger()
Returns the logger.
|
IlpRepresentationNode |
getParent()
Returns the parent object of this object.
|
boolean |
hasAttributeValue(IlpAttribute a)
Returns
true if the requested attribute is part of the
attribute group of this instance, and if a value has been set for this
attribute. |
boolean |
isLeaf()
Returns
true if this object, by its nature, has no children. |
void |
removeAttributeValueListener(AttributeValueListener listener)
Removes the given listener from the notifications of attribute value
changes.
|
void |
removeChild(IlpRepresentationNode child)
Removes a child.
|
void |
removeChildren(IlpRepresentationNode[] children)
Removes a set of children.
|
void |
removeChildren(int[] indices)
Removes a set of children.
|
void |
removeChildren(int[] indices,
IlpRepresentationNode[] children)
Removes a set of children.
|
void |
removeRepresentationNodeListener(RepresentationNodeListener listener)
Removes a listener previously added with
addRepresentationNodeListener . |
void |
removeTreeAttributeValueListener(AttributeValueListener listener)
Removes an attribute value listener.
|
void |
setAttributeValue(IlpAttribute attribute,
Object value)
Sets the value of an attribute of this object.
|
void |
setAttributeValue(String name,
Object value)
Sets the value of an attribute of this object.
|
void |
setParent(IlpRepresentationNode parent)
Only to be called immediately after construction.
|
String |
toString()
Converts the object into a human-readable format.
|
protected IlpAbstractRepresentationNode(IlpAttributeGroup model, IlpExpansionStrategy strategy, Logger logger)
model
- The attribute group.strategy
- The child object loader, or null
for a leaf node.logger
- The logger for handling log messages.protected IlpAbstractRepresentationNode(IlpObject object, IlpExtendedAttributeGroup model, IlpExpansionStrategy strategy, Logger logger)
object
- The corresponding business object.model
- The attribute group.strategy
- The expansion strategy for this node.logger
- The logger for handling log messages.public IlpAttributeGroup getAttributeGroup()
getAttributeGroup
in interface IlpAttributeValueHolder
public Object getAttributeValue(IlpAttribute attribute)
getAttributeValue
in interface IlpAttributeValueHolder
attribute
- The name of the attribute.public boolean hasAttributeValue(IlpAttribute a)
true
if the requested attribute is part of the
attribute group of this instance, and if a value has been set for this
attribute.hasAttributeValue
in interface IlpAttributeValueHolder
public void setAttributeValue(IlpAttribute attribute, Object value)
VALUE_NOT_SET
for the
value
argument.setAttributeValue
in interface IlpAttributeValueHolder
attribute
- The attribute for which the value is set.value
- The new value of the attribute or
VALUE_NOT_SET
to remove the value of
the attribute.IllegalArgumentException
- If the attribute cannot have
its value modified.public Object getAttributeValue(String name)
getAttributeValue
in interface IlpAttributeValueHolder
name
- The name of the attribute.public void setAttributeValue(String name, Object value)
If the attribute does not exist, a default attribute with the given name is created and added to the local attribute model.
setAttributeValue
in interface IlpAttributeValueHolder
name
- The name of the attribute for which the value is to be
changed.value
- The new value of the attribute.public void addAttributeValueListener(AttributeValueListener listener)
addAttributeValueListener
in interface IlpAttributeValueHolder
public void removeAttributeValueListener(AttributeValueListener listener)
removeAttributeValueListener
in interface IlpAttributeValueHolder
public void fireEvent(AttributeValueEvent event)
fireEvent
in interface IlpAttributeValueHolder
public IlpObject getIlpObject()
IlpObject
of this representation.getIlpObject
in interface IlpRepresentationObject
IlpObject
of this representation.protected Logger getLogger()
public ilog.cpl.model.edit.IlpRepresentationObjectEditor getEditor()
IlpRepresentationObject
getAttributeValue
to the editor.
In this case it should also stop propagating attribute value
change events received from the BO.getEditor
in interface IlpRepresentationObject
public boolean isLeaf()
true
if this object, by its nature, has no children.
When this method returns false
, there may or may not be some
children attached to the object; children can be added or removed
dynamically.isLeaf
in interface IlpRepresentationNode
public List<IlpRepresentationNode> getChildren()
Note: The order of the returned list is important:
RepresentationNodeEvent
to indicate the position of the added children (after addition) or
the removed children (before removal).
This method forces the child objects to be loaded by calling
the method loadChildren
in the node expansion strategy.
getChildren
in interface IlpRepresentationNode
IlpRepresentationNode
s.IlpExpansionStrategy
public void addRepresentationNodeListener(RepresentationNodeListener listener)
addRepresentationNodeListener
in interface IlpRepresentationNode
public void removeRepresentationNodeListener(RepresentationNodeListener listener)
addRepresentationNodeListener
.removeRepresentationNodeListener
in interface IlpRepresentationNode
public IlpRepresentationNode getParent()
Note: The result of this method must not change while
this node is (directly or indirectly) accessible in an
IlpGraphModel
.
getParent
in interface IlpRepresentationNode
public boolean getAllowsChildren()
true
if this node allows children.getAllowsChildren
in interface IlpRepresentationNode
public IlpExpansionStrategy getExpansionStrategy()
getExpansionStrategy
in interface IlpRepresentationNode
public void addChild(IlpRepresentationNode child)
addChild
in interface IlpMutableRepresentationNode
child
- The child to insert.public void addChildren(int[] indices, IlpRepresentationNode[] children)
addChildren
in interface IlpMutableRepresentationNode
indices
- The indices of the added children, after insertion,
in ascending order.children
- The inserted children, in the same order as described
in indices
.public void addChildren(IlpRepresentationNode[] children)
addChildren
in interface IlpMutableRepresentationNode
public void removeChildren(int[] indices, IlpRepresentationNode[] children)
removeChildren
in interface IlpMutableRepresentationNode
indices
- The indices of the removed children, before removal,
in ascending order.children
- The removed children, in the same order as described
in indices
.public void removeChildren(int[] indices)
removeChildren
in interface IlpMutableRepresentationNode
indices
- The indices of the removed children, before removal,
in ascending order.public void removeChild(IlpRepresentationNode child)
removeChild
in interface IlpMutableRepresentationNode
child
- The child to be removed.public void removeChildren(IlpRepresentationNode[] children)
removeChildren
in interface IlpMutableRepresentationNode
public void setParent(IlpRepresentationNode parent)
RepresentationNodeEvent
for the parent node.public String toString()
public String getCSSType()
getCSSType
in interface ilog.cpl.css.internal.IlpCSSObject
null
is accepted.public String getCSSClasses()
getCSSClasses
in interface ilog.cpl.css.internal.IlpCSSObject
null
is accepted.public String getCSSID(IlpContext context)
getCSSID
in interface ilog.cpl.css.internal.IlpCSSObject
context
- Application context.null
is accepted.public void addTreeAttributeValueListener(AttributeValueListener listener)
public void removeTreeAttributeValueListener(AttributeValueListener listener)
public void fireRepresentationNodeEvent(RepresentationNodeEvent event)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.