Package jadex.base.gui.filetree
Class RIDNode
- java.lang.Object
-
- jadex.base.gui.asynctree.AbstractTreeNode
-
- jadex.base.gui.asynctree.AbstractSwingTreeNode
-
- jadex.base.gui.filetree.RIDNode
-
- All Implemented Interfaces:
ISwingTreeNode,ITreeNode,IFileNode
public class RIDNode extends AbstractSwingTreeNode implements IFileNode
Node for rid based jar or local artifact directory. todo: move to modeltree?!
-
-
Field Summary
Fields Modifier and Type Field Description protected INodeFactoryfactoryThe factory.protected java.io.FilefileThe file.protected IIconCacheiconcacheThe icon cache.protected IResourceIdentifierridThe resource identifier.-
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 RIDNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, IResourceIdentifier rid, IIconCache iconcache, INodeFactory factory)Create a new service container node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFileName()Get the file name.java.lang.StringgetFilePath()Get the file path.longgetFileSize()Get the file size.byte[]getIcon()Get the icon as byte[] for a node.java.lang.ObjectgetId()Get the id used for lookup.IResourceIdentifiergetResourceIdentifier()Get the rid.javax.swing.IcongetSwingIcon()Get the icon for a node.java.lang.StringgetTooltipText()Get tooltip text.booleanisDirectory()Check if the file is a directory.booleanisJar()Test if jar.protected IFuturelistFiles()Get a file filter according to current file type settings.protected voidsearchChildren()Asynchronously search for children.voidsetFile(java.io.File file)Set the file.java.lang.StringtoString()Get the string representation.-
Methods inherited from class jadex.base.gui.asynctree.AbstractSwingTreeNode
addChild, addChild, equals, expandChildren, getCachedChildren, getChild, getChildCount, getChildren, getIndexOfChild, getModel, getParent, getPropertiesComponent, getTree, isLeaf, refresh, removeChild, setChildren
-
Methods inherited from class jadex.base.gui.asynctree.AbstractTreeNode
checkChildren, dispose, hashCode, hasProperties, removeAllChildren, setParent
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.base.gui.asynctree.ISwingTreeNode
getChild, getChildren, getParent, getPropertiesComponent
-
Methods inherited from interface jadex.base.gui.asynctree.ITreeNode
dispose, getCachedChildren, getChildCount, getIndexOfChild, hasProperties, isLeaf, refresh
-
-
-
-
Field Detail
-
file
protected java.io.File file
The file.
-
iconcache
protected final IIconCache iconcache
The icon cache.
-
rid
protected IResourceIdentifier rid
The resource identifier.
-
factory
protected INodeFactory factory
The factory.
-
-
Constructor Detail
-
RIDNode
public RIDNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, IResourceIdentifier rid, IIconCache iconcache, INodeFactory factory)
Create a new service container node.
-
-
Method Detail
-
setFile
public void setFile(java.io.File file)
Set the file.
-
getResourceIdentifier
public IResourceIdentifier getResourceIdentifier()
Get the rid.- Returns:
- The rid.
-
getFileName
public java.lang.String getFileName()
Get the file name.- Specified by:
getFileNamein interfaceIFileNode
-
getFilePath
public java.lang.String getFilePath()
Get the file path.- Specified by:
getFilePathin interfaceIFileNode
-
isDirectory
public boolean isDirectory()
Check if the file is a directory.- Specified by:
isDirectoryin interfaceIFileNode
-
getId
public java.lang.Object getId()
Get the id used for lookup.
-
getTooltipText
public java.lang.String getTooltipText()
Get tooltip text.- Specified by:
getTooltipTextin interfaceITreeNode- Specified by:
getTooltipTextin classAbstractTreeNode
-
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
-
isJar
public boolean isJar()
Test if jar.
-
searchChildren
protected void searchChildren()
Asynchronously search for children. Should call setChildren() once children are found.- Specified by:
searchChildrenin classAbstractTreeNode
-
listFiles
protected IFuture listFiles()
Get a file filter according to current file type settings.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object
-
getFileSize
public long getFileSize()
Get the file size.- Specified by:
getFileSizein interfaceIFileNode
-
-