Package jadex.base.gui.componenttree
Class ComponentTreeNode
- java.lang.Object
- 
- jadex.base.gui.asynctree.AbstractTreeNode
- 
- jadex.base.gui.asynctree.AbstractSwingTreeNode
- 
- jadex.base.gui.componenttree.ComponentTreeNode
 
 
 
- 
- All Implemented Interfaces:
- ISwingTreeNode,- ITreeNode,- IActiveComponentTreeNode
 - Direct Known Subclasses:
- PlatformTreeNode,- PseudoProxyComponentTreeNode
 
 public class ComponentTreeNode extends AbstractSwingTreeNode implements IActiveComponentTreeNode Node object representing a service container.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IExternalAccessaccessThe platform access.protected booleanbrokenFlag indicating a broken node (e.g.protected booleanbusyFlag indicating a busy node (e.g.protected ISubscriptionIntermediateFuture<CMSStatusEvent>cmslistenerThe cms listener (if any).protected IComponentDescriptiondescThe component description.protected ComponentIconCacheiconcacheThe icon cache.static javax.swing.UIDefaultsiconsThe image icons.protected ComponentPropertiespropcompThe properties component (if any).- 
Fields inherited from class jadex.base.gui.asynctree.AbstractSwingTreeNodetree
 - 
Fields inherited from class jadex.base.gui.asynctree.AbstractTreeNodechildrenfuture, dirty, model, parent, recurse, searching
 
- 
 - 
Constructor SummaryConstructors Constructor Description ComponentTreeNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, IComponentDescription desc, ComponentIconCache iconcache, IExternalAccess access)Create a new service container node.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCMSListener(IComponentIdentifier cid)Add a CMS listener for tree updates of components from the given (platform) id.ISwingTreeNodecreateComponentNode(IComponentDescription desc)Create a new component node.protected IFuture<java.lang.Void>createNFPropertyNodes(java.util.Iterator<java.lang.String> names, java.util.List<ISwingTreeNode> results, IExternalAccess provider, IExternalAccess rootea, NFPropertyContainerNode cn)voiddispose()Remove listener, if any.IComponentIdentifiergetComponentIdentifier()Get the component id.IComponentDescriptiongetDescription()Get the component description.byte[]getIcon()Get the icon as byte[] for a node.java.lang.ObjectgetId()Get the id used for lookup.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.voidrefresh(boolean recurse)Refresh the node.protected voidsearchChildren()Asynchronously search for children.protected IFuture<java.util.List<ITreeNode>>searchChildren(IExternalAccess access, IComponentIdentifier cid)Asynchronously search for children.voidsetDescription(IComponentDescription desc)Set the component description.java.lang.StringtoString()Create a string representation.- 
Methods inherited from class jadex.base.gui.asynctree.AbstractSwingTreeNodeaddChild, addChild, equals, expandChildren, getCachedChildren, getChild, getChildCount, getChildren, getIndexOfChild, getModel, getParent, getTree, isLeaf, removeChild, setChildren
 - 
Methods inherited from class jadex.base.gui.asynctree.AbstractTreeNodecheckChildren, hashCode, removeAllChildren, setParent
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.base.gui.asynctree.ISwingTreeNodegetChild, getChildren, getParent
 - 
Methods inherited from interface jadex.base.gui.asynctree.ITreeNodegetCachedChildren, getChildCount, getIndexOfChild, isLeaf
 
- 
 
- 
- 
- 
Field Detail- 
iconspublic static final javax.swing.UIDefaults icons The image icons.
 - 
descprotected IComponentDescription desc The component description.
 - 
accessprotected IExternalAccess access The platform access.
 - 
iconcacheprotected final ComponentIconCache iconcache The icon cache.
 - 
propcompprotected ComponentProperties propcomp The properties component (if any).
 - 
cmslistenerprotected ISubscriptionIntermediateFuture<CMSStatusEvent> cmslistener The cms listener (if any).
 - 
brokenprotected boolean broken Flag indicating a broken node (e.g. children could not be searched due to network problems).
 - 
busyprotected boolean busy Flag indicating a busy node (e.g. update in progress).
 
- 
 - 
Constructor Detail- 
ComponentTreeNodepublic ComponentTreeNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, IComponentDescription desc, ComponentIconCache iconcache, IExternalAccess access) Create a new service container node.
 
- 
 - 
Method Detail- 
getIdpublic java.lang.Object getId() Get the id used for lookup.
 - 
getIconpublic byte[] getIcon() Get the icon as byte[] for a node.- Specified by:
- getIconin interface- ITreeNode
- Specified by:
- getIconin class- AbstractTreeNode
 
 - 
getSwingIconpublic javax.swing.Icon getSwingIcon() Get the icon for a node.- Specified by:
- getSwingIconin interface- ISwingTreeNode
- Specified by:
- getSwingIconin class- AbstractSwingTreeNode
 
 - 
getTooltipTextpublic java.lang.String getTooltipText() Get tooltip text.- Specified by:
- getTooltipTextin interface- ITreeNode
- Specified by:
- getTooltipTextin class- AbstractTreeNode
 
 - 
refreshpublic void refresh(boolean recurse) Refresh the node.- Specified by:
- refreshin interface- ITreeNode
- Overrides:
- refreshin class- AbstractSwingTreeNode
- Parameters:
- recurse- Recursively refresh subnodes, if true.
 
 - 
searchChildrenprotected void searchChildren() Asynchronously search for children. Should call setChildren() once children are found.- Specified by:
- searchChildrenin class- AbstractTreeNode
 
 - 
createComponentNodepublic ISwingTreeNode createComponentNode(IComponentDescription desc) Create a new component node.
 - 
toStringpublic java.lang.String toString() Create a string representation.- Overrides:
- toStringin class- java.lang.Object
 
 - 
getDescriptionpublic IComponentDescription getDescription() Get the component description.- Specified by:
- getDescriptionin interface- IActiveComponentTreeNode
 
 - 
getComponentIdentifierpublic IComponentIdentifier getComponentIdentifier() Get the component id.- Specified by:
- getComponentIdentifierin interface- IActiveComponentTreeNode
 
 - 
setDescriptionpublic void setDescription(IComponentDescription desc) Set the component description.
 - 
hasPropertiespublic boolean hasProperties() True, if the node has properties that can be displayed.- Specified by:
- hasPropertiesin interface- ITreeNode
- Overrides:
- hasPropertiesin 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
- Overrides:
- getPropertiesComponentin class- AbstractSwingTreeNode
 
 - 
searchChildrenprotected IFuture<java.util.List<ITreeNode>> searchChildren(IExternalAccess access, IComponentIdentifier cid) Asynchronously search for children.
 - 
createNFPropertyNodesprotected IFuture<java.lang.Void> createNFPropertyNodes(java.util.Iterator<java.lang.String> names, java.util.List<ISwingTreeNode> results, IExternalAccess provider, IExternalAccess rootea, NFPropertyContainerNode cn) 
 - 
addCMSListenerprotected void addCMSListener(IComponentIdentifier cid) Add a CMS listener for tree updates of components from the given (platform) id.
 - 
disposepublic void dispose() Remove listener, if any.- Specified by:
- disposein interface- ITreeNode
- Overrides:
- disposein class- AbstractTreeNode
 
 
- 
 
-