public class SimpleTreeDataModel extends java.lang.Object implements ITreeDataModel, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected ITreeNode |
m_objRootNode |
| Constructor and Description |
|---|
SimpleTreeDataModel(ITreeNode objRootNode)
Constructor for SimpleTreeDataModel.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getChildCount(java.lang.Object objParent)
Returns the number of children of parent node.
|
java.util.Iterator |
getChildren(java.lang.Object objParent)
Get an iterator to the Collection of children belonging to the parent node object
|
java.lang.Object |
getObject(java.lang.Object objUniqueKey)
Get the actual node object based on some identifier (for example an UUID)
|
java.lang.Object |
getParentUniqueKey(java.lang.Object objChildUniqueKey)
Get the unique identifier of the parent of an object
|
java.lang.Object |
getRoot()
Returns the root node of the tree
|
java.lang.Object |
getUniqueKey(java.lang.Object objTarget,
java.lang.Object objParentUniqueKey)
Get the unique identifier (UUID) of the node object with a certain parent node
|
boolean |
isAncestorOf(java.lang.Object objTargetUniqueKey,
java.lang.Object objParentUniqueKey)
Check to see (on the basis of some node object identifier) whether the parent node is indeed the parent of the object
|
protected ITreeNode m_objRootNode
public SimpleTreeDataModel(ITreeNode objRootNode)
public java.lang.Object getRoot()
ITreeDataModelgetRoot in interface ITreeDataModelITreeDataModel.getRoot()public int getChildCount(java.lang.Object objParent)
ITreeDataModelgetChildCount in interface ITreeDataModelobjParent - is the parent object whose nr of children are soughtITreeDataModel.getChildCount(Object)public java.util.Iterator getChildren(java.lang.Object objParent)
ITreeDataModelgetChildren in interface ITreeDataModelobjParent - is the parent object whose children are requestedITreeDataModel.getChildren(Object)public java.lang.Object getObject(java.lang.Object objUniqueKey)
ITreeDataModelgetObject in interface ITreeDataModelobjUniqueKey - is the unique identifier of the node object being retrievedITreeDataModel.getObject(Object)public java.lang.Object getUniqueKey(java.lang.Object objTarget, java.lang.Object objParentUniqueKey)
ITreeDataModelgetUniqueKey in interface ITreeDataModelobjTarget - is the Object whose identifier is requiredobjParentUniqueKey - is the unique id of the parent of objTargetITreeDataModel.getUniqueKey(Object, Object)public boolean isAncestorOf(java.lang.Object objTargetUniqueKey, java.lang.Object objParentUniqueKey)
ITreeDataModelisAncestorOf in interface ITreeDataModelobjTargetUniqueKey - is the identifier of the object whose parent is being checkedobjParentUniqueKey - is the identifier of the parent which is to be checked againstITreeDataModel.isAncestorOf(Object, Object)public java.lang.Object getParentUniqueKey(java.lang.Object objChildUniqueKey)
ITreeDataModelgetParentUniqueKey in interface ITreeDataModelobjChildUniqueKey - is the identifier of the Object for which the parent identifier is soughtITreeDataModel.getParentUniqueKey(java.lang.Object)