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 INodeFactory
factory
The factory.protected java.io.File
file
The file.protected IIconCache
iconcache
The icon cache.protected IResourceIdentifier
rid
The 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.String
getFileName()
Get the file name.java.lang.String
getFilePath()
Get the file path.long
getFileSize()
Get the file size.byte[]
getIcon()
Get the icon as byte[] for a node.java.lang.Object
getId()
Get the id used for lookup.IResourceIdentifier
getResourceIdentifier()
Get the rid.javax.swing.Icon
getSwingIcon()
Get the icon for a node.java.lang.String
getTooltipText()
Get tooltip text.boolean
isDirectory()
Check if the file is a directory.boolean
isJar()
Test if jar.protected IFuture
listFiles()
Get a file filter according to current file type settings.protected void
searchChildren()
Asynchronously search for children.void
setFile(java.io.File file)
Set the file.java.lang.String
toString()
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:
getFileName
in interfaceIFileNode
-
getFilePath
public java.lang.String getFilePath()
Get the file path.- Specified by:
getFilePath
in interfaceIFileNode
-
isDirectory
public boolean isDirectory()
Check if the file is a directory.- Specified by:
isDirectory
in interfaceIFileNode
-
getId
public java.lang.Object getId()
Get the id used for lookup.
-
getTooltipText
public java.lang.String getTooltipText()
Get tooltip text.- Specified by:
getTooltipText
in interfaceITreeNode
- Specified by:
getTooltipText
in classAbstractTreeNode
-
getIcon
public byte[] getIcon()
Get the icon as byte[] for a node.- Specified by:
getIcon
in interfaceITreeNode
- Specified by:
getIcon
in classAbstractTreeNode
-
getSwingIcon
public javax.swing.Icon getSwingIcon()
Get the icon for a node.- Specified by:
getSwingIcon
in interfaceISwingTreeNode
- Specified by:
getSwingIcon
in 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:
searchChildren
in 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:
toString
in classjava.lang.Object
-
getFileSize
public long getFileSize()
Get the file size.- Specified by:
getFileSize
in interfaceIFileNode
-
-