Package jadex.base.gui.filetree
Class DirNode
- java.lang.Object
-
- jadex.base.gui.asynctree.AbstractTreeNode
-
- jadex.base.gui.asynctree.AbstractSwingTreeNode
-
- jadex.base.gui.filetree.FileNode
-
- jadex.base.gui.filetree.DirNode
-
- All Implemented Interfaces:
ISwingTreeNode
,ITreeNode
,IFileNode
- Direct Known Subclasses:
JarNode
public class DirNode extends FileNode
Node object representing a service container.
-
-
Field Summary
Fields Modifier and Type Field Description protected INodeFactory
factory
The factory.static java.util.Comparator
FILENODE_COMPARATOR
Comparator for filenodes.-
Fields inherited from class jadex.base.gui.filetree.FileNode
displayname, file, iconcache, lastsiblings, relative, tostring
-
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 DirNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, java.io.File file, IIconCache iconcache, INodeFactory factory)
Create a new service container node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDirectory()
Check if the file is a directory.boolean
isLeaf()
Check if the node is a leaf.protected IFuture
listFiles()
Get a file filter according to current file type settings.void
refresh(boolean recurse)
Refresh the node.protected void
searchChildren()
Asynchronously search for children.-
Methods inherited from class jadex.base.gui.filetree.FileNode
convertPathToRelative, getDisplayName, getFile, getFileName, getFilePath, getFileSize, getIcon, getId, getPropertiesComponent, getRelativePath, getSwingIcon, getTooltipText, hasProperties, toString
-
Methods inherited from class jadex.base.gui.asynctree.AbstractSwingTreeNode
addChild, addChild, equals, expandChildren, getCachedChildren, getChild, getChildCount, getChildren, getIndexOfChild, getModel, getParent, getTree, removeChild, setChildren
-
Methods inherited from class jadex.base.gui.asynctree.AbstractTreeNode
checkChildren, dispose, hashCode, 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
-
Methods inherited from interface jadex.base.gui.asynctree.ITreeNode
dispose, getCachedChildren, getChildCount, getIndexOfChild
-
-
-
-
Field Detail
-
factory
protected INodeFactory factory
The factory.
-
FILENODE_COMPARATOR
public static final java.util.Comparator FILENODE_COMPARATOR
Comparator for filenodes.
-
-
Constructor Detail
-
DirNode
public DirNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, java.io.File file, IIconCache iconcache, INodeFactory factory)
Create a new service container node.
-
-
Method Detail
-
searchChildren
protected void searchChildren()
Asynchronously search for children. Should call setChildren() once children are found.- Overrides:
searchChildren
in classFileNode
-
listFiles
protected IFuture listFiles()
Get a file filter according to current file type settings.
-
refresh
public void refresh(boolean recurse)
Refresh the node.
-
isLeaf
public boolean isLeaf()
Check if the node is a leaf.
-
isDirectory
public boolean isDirectory()
Check if the file is a directory.- Specified by:
isDirectory
in interfaceIFileNode
- Overrides:
isDirectory
in classFileNode
-
-