org.fife.rtext.plugins.project.tree
Class FileTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.fife.rtext.plugins.project.tree.AbstractWorkspaceTreeNode
          extended by org.fife.rtext.plugins.project.tree.FileTreeNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode, PhysicalLocationTreeNode

public class FileTreeNode
extends AbstractWorkspaceTreeNode
implements PhysicalLocationTreeNode

A tree node for regular files and directories.

Version:
1.0
Author:
Robert Futrell
See Also:
Serialized Form

Nested Class Summary
static class FileTreeNode.FileNameChecker
          Ensures that proposed file names are valid.
 
Nested classes/interfaces inherited from class org.fife.rtext.plugins.project.tree.AbstractWorkspaceTreeNode
AbstractWorkspaceTreeNode.AddFileAction, AbstractWorkspaceTreeNode.AddFolderAction, AbstractWorkspaceTreeNode.AddLogicalFolderAction, AbstractWorkspaceTreeNode.DeleteAction, AbstractWorkspaceTreeNode.MoveDownAction, AbstractWorkspaceTreeNode.MoveUpAction, AbstractWorkspaceTreeNode.OpenAction, AbstractWorkspaceTreeNode.PropertiesAction, AbstractWorkspaceTreeNode.RefreshAction, AbstractWorkspaceTreeNode.RenameAction
 
Nested classes/interfaces inherited from interface org.fife.rtext.plugins.project.tree.PhysicalLocationTreeNode
PhysicalLocationTreeNode.NotYetPopulatedChild
 
Field Summary
 
Fields inherited from class org.fife.rtext.plugins.project.tree.AbstractWorkspaceTreeNode
plugin
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
FileTreeNode(ProjectPlugin plugin, java.io.File file)
           
 
Method Summary
 java.lang.String getDisplayName()
          Returns the name to display for this node in the workspace tree.
 java.io.File getFile()
           
static java.lang.String getFilterString(java.lang.String[] filters)
          Returns a string representation of the specified array of filters.
static java.lang.String getFilterString(java.lang.String[] filters, java.lang.String def)
          Returns a string representation of the specified array of filters.
 javax.swing.Icon getIcon()
          Returns the icon for this tree node.
 java.util.List<PopupContent> getPopupActions()
           
 java.lang.String getToolTipText()
           
protected  void handleDelete()
           
static boolean handleDeleteNative(java.io.File[] files, ProjectPlugin plugin)
           
protected  void handleProperties()
           
 void handleRefresh()
          Refreshes the children of this node.
protected  void handleRename()
           
 boolean isNotPopulated()
          Returns whether this folder tree node has not yet been populated (expanded).
 void refreshChildren()
          Refreshes the child nodes of this node.
 void setFilterInfo(FolderFilterInfo info)
           
 
Methods inherited from class org.fife.rtext.plugins.project.tree.AbstractWorkspaceTreeNode
escapeForHtml, moveProjectEntityDown, moveProjectEntityUp, possiblyAddOpenInActions, toString
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Constructor Detail

FileTreeNode

public FileTreeNode(ProjectPlugin plugin,
                    java.io.File file)
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Description copied from class: AbstractWorkspaceTreeNode
Returns the name to display for this node in the workspace tree.

Specified by:
getDisplayName in class AbstractWorkspaceTreeNode
Returns:
The display name.

getFile

public java.io.File getFile()

getFilterString

public static final java.lang.String getFilterString(java.lang.String[] filters)
Returns a string representation of the specified array of filters.

Parameters:
filters - The array of filters, may be null.
Returns:
A string representation of the filters.

getFilterString

public static final java.lang.String getFilterString(java.lang.String[] filters,
                                                     java.lang.String def)
Returns a string representation of the specified array of filters.

Parameters:
filters - The array of filters, may be null.
def - The value to display if the filter array is null.
Returns:
A string representation of the filters.

getPopupActions

public java.util.List<PopupContent> getPopupActions()
Specified by:
getPopupActions in class AbstractWorkspaceTreeNode

getIcon

public javax.swing.Icon getIcon()
Description copied from class: AbstractWorkspaceTreeNode
Returns the icon for this tree node.

Specified by:
getIcon in class AbstractWorkspaceTreeNode
Returns:
The icon for this tree node.

getToolTipText

public java.lang.String getToolTipText()
Specified by:
getToolTipText in class AbstractWorkspaceTreeNode

handleDelete

protected void handleDelete()
Specified by:
handleDelete in class AbstractWorkspaceTreeNode

handleDeleteNative

public static final boolean handleDeleteNative(java.io.File[] files,
                                               ProjectPlugin plugin)

handleProperties

protected void handleProperties()
Specified by:
handleProperties in class AbstractWorkspaceTreeNode

handleRefresh

public void handleRefresh()
Description copied from interface: PhysicalLocationTreeNode
Refreshes the children of this node.

Specified by:
handleRefresh in interface PhysicalLocationTreeNode

handleRename

protected void handleRename()
Specified by:
handleRename in class AbstractWorkspaceTreeNode

isNotPopulated

public boolean isNotPopulated()
Description copied from interface: PhysicalLocationTreeNode
Returns whether this folder tree node has not yet been populated (expanded).

Specified by:
isNotPopulated in interface PhysicalLocationTreeNode
Returns:
Whether this node has not yet been populated.

refreshChildren

public void refreshChildren()
Description copied from interface: PhysicalLocationTreeNode
Refreshes the child nodes of this node. The tree model will need to be reloaded after making this call.

Specified by:
refreshChildren in interface PhysicalLocationTreeNode

setFilterInfo

public void setFilterInfo(FolderFilterInfo info)