Package jadex.base.gui.filetree
Class RemoteFileNode
- java.lang.Object
-
- jadex.base.gui.asynctree.AbstractTreeNode
-
- jadex.base.gui.asynctree.AbstractSwingTreeNode
-
- jadex.base.gui.filetree.RemoteFileNode
-
- All Implemented Interfaces:
ISwingTreeNode,ITreeNode,IFileNode
- Direct Known Subclasses:
RemoteDirNode
public class RemoteFileNode extends AbstractSwingTreeNode implements IFileNode
The remote file node.
-
-
Field Summary
Fields Modifier and Type Field Description protected IExternalAccessextaThe external access.protected FileDatafileThe file.protected IIconCacheiconcacheThe icon cache.-
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 RemoteFileNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, FileData file, IIconCache iconcache, IExternalAccess exta)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.javax.swing.JComponentgetPropertiesComponent()Get or create a component displaying the node properties.FileDatagetRemoteFile()Get the file.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.booleanisDirectory()Check if the file is a directory.voidrefresh(boolean recurse)Refresh the node.protected voidsearchChildren()Asynchronously search for children.java.lang.StringtoString()Create a string representation.-
Methods inherited from class jadex.base.gui.asynctree.AbstractSwingTreeNode
addChild, addChild, equals, expandChildren, getCachedChildren, getChild, getChildCount, getChildren, getIndexOfChild, getModel, getParent, getTree, isLeaf, 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, isLeaf
-
-
-
-
Field Detail
-
file
protected FileData file
The file.
-
exta
protected IExternalAccess exta
The external access.
-
iconcache
protected final IIconCache iconcache
The icon cache.
-
-
Constructor Detail
-
RemoteFileNode
public RemoteFileNode(ISwingTreeNode parent, AsyncSwingTreeModel model, javax.swing.JTree tree, FileData file, IIconCache iconcache, IExternalAccess exta)
Create a new service container node.
-
-
Method Detail
-
getId
public java.lang.Object getId()
Get the id used for lookup.
-
getSwingIcon
public javax.swing.Icon getSwingIcon()
Get the icon for a node.- Specified by:
getSwingIconin interfaceISwingTreeNode- Specified by:
getSwingIconin classAbstractSwingTreeNode
-
getIcon
public byte[] getIcon()
Get the icon as byte[] for a node.- Specified by:
getIconin interfaceITreeNode- Specified by:
getIconin classAbstractTreeNode
-
refresh
public void refresh(boolean recurse)
Refresh the node.- Specified by:
refreshin interfaceITreeNode- Overrides:
refreshin classAbstractSwingTreeNode- Parameters:
recurse- Recursively refresh subnodes, if true.
-
searchChildren
protected void searchChildren()
Asynchronously search for children. Should call setChildren() once children are found.- Specified by:
searchChildrenin classAbstractTreeNode
-
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
-
toString
public java.lang.String toString()
Create a string representation.- Overrides:
toStringin classjava.lang.Object
-
getTooltipText
public java.lang.String getTooltipText()
Get tooltip text.- Specified by:
getTooltipTextin interfaceITreeNode- Specified by:
getTooltipTextin classAbstractTreeNode
-
hasProperties
public boolean hasProperties()
True, if the node has properties that can be displayed.- Specified by:
hasPropertiesin interfaceITreeNode- Overrides:
hasPropertiesin classAbstractTreeNode
-
getPropertiesComponent
public javax.swing.JComponent getPropertiesComponent()
Get or create a component displaying the node properties. Only to be called if hasProperties() is true;- Specified by:
getPropertiesComponentin interfaceISwingTreeNode- Overrides:
getPropertiesComponentin classAbstractSwingTreeNode
-
getRemoteFile
public FileData getRemoteFile()
Get the file.- Returns:
- the file.
-
getFileSize
public long getFileSize()
Get the file size.- Specified by:
getFileSizein interfaceIFileNode
-
-