Modifier and Type | Field and Description |
---|---|
protected jadex.commons.future.Future<java.util.List<ITreeNode>> |
childrenfuture
The children future (result of next search).
|
protected boolean |
dirty
Flag to indicate that children were added / removed during ongoing search
(->restart search).
|
protected AsyncTreeModel |
model
The tree model.
|
protected ITreeNode |
parent
The parent node.
|
protected boolean |
recurse
Flag to indicate recursive refresh.
|
protected boolean |
searching
Flag to indicate search in progress.
|
Constructor and Description |
---|
AbstractTreeNode(ITreeNode parent,
AsyncTreeModel model)
Create a node.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(int index,
ITreeNode node)
Add a child and update the tree.
|
void |
addChild(ITreeNode node)
Add a child and update the tree.
|
protected boolean |
checkChildren(java.util.List oldcs,
java.util.List newcs)
Check the children for validity.
|
void |
dispose()
Called when the node is removed or the tree is closed.
|
boolean |
equals(java.lang.Object obj)
Test if two nodes are equal.
|
protected void |
expandChildren(boolean dorecurse,
java.util.List<ITreeNode> children) |
java.util.List<ITreeNode> |
getCachedChildren()
Get the cached children, i.e.
|
ITreeNode |
getChild(int index)
Get the given child.
|
int |
getChildCount()
Get the child count.
|
jadex.commons.future.IFuture<java.util.List<ITreeNode>> |
getChildren()
Get the current children, i.e.
|
abstract byte[] |
getIcon()
Get the icon for a node.
|
int |
getIndexOfChild(ITreeNode child)
Get the index of a child.
|
AsyncTreeModel |
getModel()
Get the model.
|
ITreeNode |
getParent()
Get the parent node.
|
abstract java.lang.String |
getTooltipText()
Get tooltip text.
|
int |
hashCode()
Generate a has code.
|
boolean |
hasProperties()
True, if the node has properties that can be displayed.
|
boolean |
isLeaf()
Check if the node is a leaf.
|
void |
refresh(boolean recurse)
Refresh the node.
|
void |
removeAllChildren()
Remove all children.
|
void |
removeChild(ITreeNode node)
Remove a child and update the tree.
|
protected abstract void |
searchChildren()
Asynchronously search for children.
|
protected void |
setChildren(java.util.List<? extends ITreeNode> newchildren)
Set the children.
|
void |
setParent(ITreeNode parent)
The dirty to set.
|
protected ITreeNode parent
protected final AsyncTreeModel model
protected boolean searching
protected boolean recurse
protected boolean dirty
protected jadex.commons.future.Future<java.util.List<ITreeNode>> childrenfuture
public AbstractTreeNode(ITreeNode parent, AsyncTreeModel model)
public void dispose()
public ITreeNode getParent()
public void setParent(ITreeNode parent)
dirty
- The dirty to setpublic int getChildCount()
getChildCount
in interface ITreeNode
public ITreeNode getChild(int index)
public int getIndexOfChild(ITreeNode child)
getIndexOfChild
in interface ITreeNode
public boolean isLeaf()
public void refresh(boolean recurse)
public java.util.List<ITreeNode> getCachedChildren()
getCachedChildren
in interface ITreeNode
public jadex.commons.future.IFuture<java.util.List<ITreeNode>> getChildren()
getChildren
in interface ITreeNode
public boolean hasProperties()
hasProperties
in interface ITreeNode
public abstract byte[] getIcon()
public abstract java.lang.String getTooltipText()
getTooltipText
in interface ITreeNode
protected abstract void searchChildren()
protected void setChildren(java.util.List<? extends ITreeNode> newchildren)
protected void expandChildren(boolean dorecurse, java.util.List<ITreeNode> children)
protected boolean checkChildren(java.util.List oldcs, java.util.List newcs)
public AsyncTreeModel getModel()
public void addChild(int index, ITreeNode node)
public void addChild(ITreeNode node)
public void removeChild(ITreeNode node)
public void removeAllChildren()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object