public class IlvDefaultSDMNode extends Object implements IlvMutableSDMNode, Serializable
IlvDefaultSDMNode
is a simple
implementation of the IlvSDMNode
interface that stores the node properties in memory.
This class can be subclassed to create SDM nodes with other built-in properties.
IlvDefaultSDMModel
,
Serialized FormModifier and Type | Field and Description |
---|---|
static byte |
MOVE_DOWN
Action of
shiftChild(IlvMutableSDMNode, byte) |
static byte |
MOVE_FIRST
Action of
shiftChild(IlvMutableSDMNode, byte) |
static byte |
MOVE_LAST
Action of
shiftChild(IlvMutableSDMNode, byte) |
static byte |
MOVE_UP
Action of
shiftChild(IlvMutableSDMNode, byte) |
Constructor and Description |
---|
IlvDefaultSDMNode(String tag)
Creates a new node of symbolic type
tag . |
Modifier and Type | Method and Description |
---|---|
void |
addChild(IlvMutableSDMNode child,
IlvMutableSDMNode before)
Adds a child to this object's submodel.
|
Enumeration |
getChildren()
Returns the children of this data object,
that is, the objects contained in the
submodel attached to this object.
|
int |
getChildrenCount()
Returns the number of children of this data object.
|
String[] |
getDependentProperties(String property)
Returns the set of properties that may be affected by a change to the
given property.
|
String |
getID()
Returns the identifier of the object.
|
IlvSDMNode |
getParent()
Returns the parent of this data object,
that is, the object to which the submodel
containing this object is attached.
|
Object |
getProperty(String property)
Returns the value of a property of the
data object, or
null if
the property does not exist. |
String[] |
getPropertyNames()
Returns the names of all the properties of this object.
|
String |
getTag()
Returns the symbolic type (or "tag") of the object.
|
void |
removeChild(IlvMutableSDMNode child)
Removes a child from this object's submodel.
|
void |
setID(String id)
Sets the identifier of the object.
|
void |
setParent(IlvMutableSDMNode parent)
Sets the parent of this data object,
that is, the object to which the submodel
containing this object is attached.
|
void |
setProperty(String property,
Object value)
Stores a property in this object's property table.
|
void |
shiftChild(IlvMutableSDMNode child,
byte action)
Moves a child up or down in the children list.
|
String |
toString()
Returns a
String containing the tag and the ID of the object. |
public static final byte MOVE_FIRST
shiftChild(IlvMutableSDMNode, byte)
public static final byte MOVE_LAST
shiftChild(IlvMutableSDMNode, byte)
public static final byte MOVE_UP
shiftChild(IlvMutableSDMNode, byte)
public static final byte MOVE_DOWN
shiftChild(IlvMutableSDMNode, byte)
public IlvDefaultSDMNode(String tag)
tag
.tag
- The symbolic type of the object.public String getTag()
getTag
in interface IlvSDMNode
public void setID(String id)
setID
in interface IlvMutableSDMNode
id
- The new identifier.public String getID()
getID
in interface IlvSDMNode
public void addChild(IlvMutableSDMNode child, IlvMutableSDMNode before)
addChild
in interface IlvMutableSDMNode
child
- The child to add.before
- The object before which the new child must
be inserted, or null
if the new child must
be appended to the list of children.public void shiftChild(IlvMutableSDMNode child, byte action)
child
- the childaction
- one of MOVE_DOWN
, MOVE_UP
,
MOVE_FIRST
, or MOVE_LAST
.public void removeChild(IlvMutableSDMNode child)
removeChild
in interface IlvMutableSDMNode
child
- The child to remove.public Enumeration getChildren()
getChildren
in interface IlvSDMNode
IlvSDMNode
s.public int getChildrenCount()
public void setParent(IlvMutableSDMNode parent)
setParent
in interface IlvMutableSDMNode
parent
- The parent to set.public IlvSDMNode getParent()
getParent
in interface IlvSDMNode
public void setProperty(String property, Object value)
setProperty
in interface IlvMutableSDMNode
property
- The name of the property.value
- The value of the property.public String[] getDependentProperties(String property)
null
, because in this
class there are no implicit property dependencies.getDependentProperties
in interface IlvMutableSDMNode
property
- The name of the property whose value is being changed.property
's change, or
null
for none.IlvMutableSDMNode.setProperty(String, Object)
public Object getProperty(String property)
null
if
the property does not exist.getProperty
in interface IlvSDMNode
property
- The name of the property.public String[] getPropertyNames()
getPropertyNames
in interface IlvSDMNode
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.