Package jadex.base.gui.filetree
Class RootNode
- java.lang.Object
-
- jadex.base.gui.asynctree.AbstractTreeNode
-
- jadex.base.gui.asynctree.AbstractSwingTreeNode
-
- jadex.base.gui.filetree.RootNode
-
- All Implemented Interfaces:
ISwingTreeNode,ITreeNode
public class RootNode extends AbstractSwingTreeNode
The root node.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ListchildrenThe list of child nodes.protected ComponentPropertiespropcompThe properties component (if any).-
Fields inherited from class jadex.base.gui.asynctree.AbstractSwingTreeNode
tree
-
Fields inherited from class jadex.base.gui.asynctree.AbstractTreeNode
childrenfuture, dirty, model, parent, recurse, searching
-
-
Constructor Summary
Constructors Constructor Description RootNode(AsyncSwingTreeModel model, javax.swing.JTree tree)Create a new service container node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(ISwingTreeNode child)Add a child node.byte[]getIcon()Get the icon as byte[] for a node.java.lang.ObjectgetId()Get the id used for lookup.intgetIndex(ISwingTreeNode node)Returns the index of node in the receivers children.java.lang.String[]getPathEntries()Get the path entries {path, display name}.javax.swing.JComponentgetPropertiesComponent()Get or create a component displaying the node properties.javax.swing.IcongetSwingIcon()Get the icon for a node.java.lang.StringgetTooltipText()Get tooltip text.booleanhasProperties()True, if the node has properties that can be displayed.booleanisLeaf()Check if the node is a leaf.voidrefresh(boolean recurse)Refresh the node.voidremoveAll()Remove a path entry from the tree.voidremoveChild(ISwingTreeNode child)Remove a path entry from the tree.protected voidsearchChildren()Asynchronously search for children.voidsetChildren(java.util.List newchildren)Set the children.java.lang.StringtoString()Create a string representation.-
Methods inherited from class jadex.base.gui.asynctree.AbstractSwingTreeNode
addChild, addChild, equals, expandChildren, getCachedChildren, getChild, getChildCount, getChildren, getIndexOfChild, getModel, getParent, getTree, removeChild
-
Methods inherited from class jadex.base.gui.asynctree.AbstractTreeNode
checkChildren, dispose, hashCode, removeAllChildren, setParent
-
-
-
-
Field Detail
-
children
protected java.util.List children
The list of child nodes.
-
propcomp
protected ComponentProperties propcomp
The properties component (if any).
-
-
Constructor Detail
-
RootNode
public RootNode(AsyncSwingTreeModel model, javax.swing.JTree tree)
Create a new service container node.
-
-
Method Detail
-
setChildren
public void setChildren(java.util.List newchildren)
Set the children.- Overrides:
setChildrenin classAbstractSwingTreeNode
-
getId
public java.lang.Object getId()
Get the id used for lookup.
-
getIcon
public byte[] getIcon()
Get the icon as byte[] for a node.- Specified by:
getIconin interfaceITreeNode- Specified by:
getIconin classAbstractTreeNode
-
getSwingIcon
public javax.swing.Icon getSwingIcon()
Get the icon for a node.- Specified by:
getSwingIconin interfaceISwingTreeNode- Specified by:
getSwingIconin classAbstractSwingTreeNode
-
refresh
public void refresh(boolean recurse)
Refresh the node.- Specified by:
refreshin interfaceITreeNode- Overrides:
refreshin classAbstractSwingTreeNode- Parameters:
recurse- Recursively refresh subnodes, if true.
-
searchChildren
protected void searchChildren()
Asynchronously search for children. Should call setChildren() once children are found.- Specified by:
searchChildrenin classAbstractTreeNode
-
addChild
public void addChild(ISwingTreeNode child)
Add a child node.- Parameters:
child- The child node.
-
removeChild
public void removeChild(ISwingTreeNode child)
Remove a path entry from the tree.- Parameters:
child- The child node.
-
removeAll
public void removeAll()
Remove a path entry from the tree.
-
toString
public java.lang.String toString()
Create a string representation.- Overrides:
toStringin classjava.lang.Object
-
getTooltipText
public java.lang.String getTooltipText()
Get tooltip text.- Specified by:
getTooltipTextin interfaceITreeNode- Specified by:
getTooltipTextin classAbstractTreeNode
-
hasProperties
public boolean hasProperties()
True, if the node has properties that can be displayed.- Specified by:
hasPropertiesin interfaceITreeNode- Overrides:
hasPropertiesin classAbstractTreeNode
-
getPropertiesComponent
public javax.swing.JComponent getPropertiesComponent()
Get or create a component displaying the node properties. Only to be called if hasProperties() is true;- Specified by:
getPropertiesComponentin interfaceISwingTreeNode- Overrides:
getPropertiesComponentin classAbstractSwingTreeNode
-
isLeaf
public boolean isLeaf()
Check if the node is a leaf.- Specified by:
isLeafin interfaceITreeNode- Overrides:
isLeafin classAbstractSwingTreeNode
-
getIndex
public int getIndex(ISwingTreeNode node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.- Parameters:
node-- Returns:
- an int.
-
getPathEntries
public java.lang.String[] getPathEntries()
Get the path entries {path, display name}.
-
-