|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthok.model.TreeModel
public abstract class TreeModel
The TreeModel is the model for the TreeViewer of the ConstraintDialog. It implements the Composite design pattern.
Constructor Summary | |
---|---|
TreeModel(ITreeNode parent)
The Constructor. |
Method Summary | |
---|---|
void |
addChild(ITreeNode child)
Adds a child to the tree model. |
void |
addListener(ITreeNode element)
Adds a listener to the model. |
java.util.Set<ITreeNode> |
getChildren(ITreeNode parentElement)
Returns the children of a parent element. |
ITreeNode |
getParent()
Returns the parent of the current element. |
boolean |
hasChildren()
Checks if the current element has children. |
void |
removeChild(ITreeNode child)
Removes a child from the model. |
void |
removeListener(ITreeNode element)
Removes a listener from the model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeModel(ITreeNode parent)
parent
- the parent element or null.Method Detail |
---|
public void addListener(ITreeNode element)
ITreeListeners
addListener
in interface ITreeListeners
element
- the listener to add.public void removeListener(ITreeNode element)
ITreeListeners
removeListener
in interface ITreeListeners
element
- the listener to remove.public java.util.Set<ITreeNode> getChildren(ITreeNode parentElement)
ITreeNode
getChildren
in interface ITreeNode
parentElement
- the parent element.
public ITreeNode getParent()
ITreeNode
getParent
in interface ITreeNode
public boolean hasChildren()
ITreeNode
hasChildren
in interface ITreeNode
public void addChild(ITreeNode child)
ITreeNode
addChild
in interface ITreeNode
child
- the child to add.public void removeChild(ITreeNode child)
ITreeNode
removeChild
in interface ITreeNode
child
- the child to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |