Package jadex.base.gui.asynctree
Class AbstractSwingTreeNode
- java.lang.Object
- 
- jadex.base.gui.asynctree.AbstractTreeNode
- 
- jadex.base.gui.asynctree.AbstractSwingTreeNode
 
 
- 
- All Implemented Interfaces:
- ISwingTreeNode,- ITreeNode
 - Direct Known Subclasses:
- ComponentTreeNode,- FileNode,- NFPropertyContainerNode,- NFPropertyNode,- ProvidedServiceInfoNode,- RemoteFileNode,- RequiredServiceNode,- RIDNode,- RootNode,- ServiceContainerNode,- ViewTreeNode
 
 public abstract class AbstractSwingTreeNode extends AbstractTreeNode implements ISwingTreeNode Basic node object.
- 
- 
Field SummaryFields Modifier and Type Field Description protected javax.swing.JTreetreeThe tree.- 
Fields inherited from class jadex.base.gui.asynctree.AbstractTreeNodechildrenfuture, dirty, model, parent, recurse, searching
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractSwingTreeNode(ITreeNode parent, AsyncTreeModel model, javax.swing.JTree tree)Create a node.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddChild(int index, ITreeNode node)Add a child and update the tree.voidaddChild(ITreeNode node)Add a child and update the tree.booleanequals(java.lang.Object obj)Test if two nodes are equal.protected voidexpandChildren(boolean dorecurse, java.util.List<ITreeNode> children)java.util.List<ITreeNode>getCachedChildren()Get the cached children, i.e.ISwingTreeNodegetChild(int index)Get the given child.intgetChildCount()Get the child count.IFuture<java.util.List<ITreeNode>>getChildren()Get the current children, i.e.intgetIndexOfChild(ITreeNode child)Get the index of a child.AsyncSwingTreeModelgetModel()Get the model.ISwingTreeNodegetParent()Get the parent node.javax.swing.JComponentgetPropertiesComponent()Get or create a component displaying the node properties.abstract javax.swing.IcongetSwingIcon()Get the icon for a node.javax.swing.JTreegetTree()Get the tree.booleanisLeaf()Check if the node is a leaf.voidrefresh(boolean recurse)Refresh the node.voidremoveChild(ITreeNode node)Remove a child and update the tree.protected voidsetChildren(java.util.List<? extends ITreeNode> newchildren)Set the children.- 
Methods inherited from class jadex.base.gui.asynctree.AbstractTreeNodecheckChildren, dispose, getIcon, getTooltipText, hashCode, hasProperties, removeAllChildren, searchChildren, setParent
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jadex.base.gui.asynctree.ITreeNodedispose, getIcon, getId, getTooltipText, hasProperties
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractSwingTreeNodepublic AbstractSwingTreeNode(ITreeNode parent, AsyncTreeModel model, javax.swing.JTree tree) Create a node.
 
- 
 - 
Method Detail- 
getParentpublic ISwingTreeNode getParent() Get the parent node.- Specified by:
- getParentin interface- ISwingTreeNode
- Specified by:
- getParentin interface- ITreeNode
- Overrides:
- getParentin class- AbstractTreeNode
 
 - 
getChildCountpublic int getChildCount() Get the child count.- Specified by:
- getChildCountin interface- ITreeNode
- Overrides:
- getChildCountin class- AbstractTreeNode
 
 - 
getChildpublic ISwingTreeNode getChild(int index) Get the given child.- Specified by:
- getChildin interface- ISwingTreeNode
- Specified by:
- getChildin interface- ITreeNode
- Overrides:
- getChildin class- AbstractTreeNode
 
 - 
getIndexOfChildpublic int getIndexOfChild(ITreeNode child) Get the index of a child.- Specified by:
- getIndexOfChildin interface- ITreeNode
- Overrides:
- getIndexOfChildin class- AbstractTreeNode
 
 - 
isLeafpublic boolean isLeaf() Check if the node is a leaf.- Specified by:
- isLeafin interface- ITreeNode
- Overrides:
- isLeafin class- AbstractTreeNode
 
 - 
refreshpublic void refresh(boolean recurse) Refresh the node.- Specified by:
- refreshin interface- ITreeNode
- Overrides:
- refreshin class- AbstractTreeNode
- Parameters:
- recurse- Recursively refresh subnodes, if true.
 
 - 
getCachedChildrenpublic java.util.List<ITreeNode> getCachedChildren() Get the cached children, i.e. do not start any background processes for updating the children.- Specified by:
- getCachedChildrenin interface- ITreeNode
- Overrides:
- getCachedChildrenin class- AbstractTreeNode
 
 - 
getChildrenpublic IFuture<java.util.List<ITreeNode>> getChildren() Get the current children, i.e. start a new update process and provide the result as a future.- Specified by:
- getChildrenin interface- ISwingTreeNode
- Specified by:
- getChildrenin interface- ITreeNode
- Overrides:
- getChildrenin class- AbstractTreeNode
 
 - 
getPropertiesComponentpublic javax.swing.JComponent getPropertiesComponent() Get or create a component displaying the node properties. Only to be called if hasProperties() is true;- Specified by:
- getPropertiesComponentin interface- ISwingTreeNode
 
 - 
getSwingIconpublic abstract javax.swing.Icon getSwingIcon() Get the icon for a node.- Specified by:
- getSwingIconin interface- ISwingTreeNode
 
 - 
setChildrenprotected void setChildren(java.util.List<? extends ITreeNode> newchildren) Set the children. No children should be represented as empty list to avoid ongoing search for children.- Overrides:
- setChildrenin class- AbstractTreeNode
 
 - 
expandChildrenprotected void expandChildren(boolean dorecurse, java.util.List<ITreeNode> children)- Overrides:
- expandChildrenin class- AbstractTreeNode
 
 - 
getModelpublic AsyncSwingTreeModel getModel() Get the model.- Overrides:
- getModelin class- AbstractTreeNode
 
 - 
getTreepublic javax.swing.JTree getTree() Get the tree.
 - 
addChildpublic void addChild(int index, ITreeNode node)Add a child and update the tree. Must be called from swing thread.- Overrides:
- addChildin class- AbstractTreeNode
 
 - 
addChildpublic void addChild(ITreeNode node) Add a child and update the tree. Must be called from swing thread.- Overrides:
- addChildin class- AbstractTreeNode
 
 - 
removeChildpublic void removeChild(ITreeNode node) Remove a child and update the tree. Must be called from swing thread.- Overrides:
- removeChildin class- AbstractTreeNode
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test if two nodes are equal.- Overrides:
- equalsin class- AbstractTreeNode
 
 
- 
 
-