public class FileNode extends AbstractSwingTreeNode implements IFileNode
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
displayname
The cached display name.
|
protected java.io.File |
file
The file.
|
protected IIconCache |
iconcache
The icon cache.
|
protected java.util.List |
lastsiblings
The last siblings.
|
protected java.lang.String |
relative
The relative file name.
|
protected java.lang.String |
tostring |
tree| Constructor and Description |
|---|
FileNode(ISwingTreeNode parent,
AsyncSwingTreeModel model,
javax.swing.JTree tree,
java.io.File file,
IIconCache iconcache)
Create a new service container node.
|
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
convertPathToRelative(java.io.File file)
Get the corresponding relative path for a file.
|
java.lang.String |
getDisplayName()
Get the display name.
|
java.io.File |
getFile()
Get the file.
|
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.
|
javax.swing.JComponent |
getPropertiesComponent()
Get or create a component displaying the node properties.
|
java.lang.String |
getRelativePath()
Get the relative path.
|
javax.swing.Icon |
getSwingIcon()
Get the icon for a node.
|
java.lang.String |
getTooltipText()
Get tooltip text.
|
boolean |
hasProperties()
True, if the node has properties that can be displayed.
|
boolean |
isDirectory()
Check if the file is a directory.
|
boolean |
isLeaf()
Check if the node is a leaf.
|
void |
refresh(boolean recurse)
Refresh the node.
|
protected void |
searchChildren()
Asynchronously search for children.
|
java.lang.String |
toString()
Create a string representation.
|
addChild, addChild, equals, expandChildren, getCachedChildren, getChild, getChildCount, getChildren, getIndexOfChild, getModel, getParent, getTree, removeChild, setChildrencheckChildren, dispose, hashCode, removeAllChildren, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChild, getChildren, getParentprotected java.io.File file
protected final IIconCache iconcache
protected java.lang.String relative
protected java.lang.String displayname
protected java.lang.String tostring
protected java.util.List lastsiblings
public FileNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, java.io.File file, IIconCache iconcache)
public java.lang.Object getId()
getId in interface jadex.base.gui.asynctree.ITreeNodepublic byte[] getIcon()
getIcon in interface jadex.base.gui.asynctree.ITreeNodegetIcon in class jadex.base.gui.asynctree.AbstractTreeNodepublic javax.swing.Icon getSwingIcon()
getSwingIcon in interface ISwingTreeNodegetSwingIcon in class AbstractSwingTreeNodepublic void refresh(boolean recurse)
refresh in interface jadex.base.gui.asynctree.ITreeNoderefresh in class AbstractSwingTreeNoderecurse - Recursively refresh subnodes, if true.protected void searchChildren()
searchChildren in class jadex.base.gui.asynctree.AbstractTreeNodepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getDisplayName()
public java.lang.String getTooltipText()
getTooltipText in interface jadex.base.gui.asynctree.ITreeNodegetTooltipText in class jadex.base.gui.asynctree.AbstractTreeNodepublic boolean hasProperties()
hasProperties in interface jadex.base.gui.asynctree.ITreeNodehasProperties in class jadex.base.gui.asynctree.AbstractTreeNodepublic javax.swing.JComponent getPropertiesComponent()
getPropertiesComponent in interface ISwingTreeNodegetPropertiesComponent in class AbstractSwingTreeNodepublic java.io.File getFile()
public java.lang.String getRelativePath()
protected static java.lang.String convertPathToRelative(java.io.File file)
public boolean isLeaf()
isLeaf in interface jadex.base.gui.asynctree.ITreeNodeisLeaf in class AbstractSwingTreeNodepublic java.lang.String getFileName()
getFileName in interface IFileNodepublic java.lang.String getFilePath()
getFilePath in interface IFileNodepublic boolean isDirectory()
isDirectory in interface IFileNodepublic long getFileSize()
getFileSize in interface IFileNode