se.datadosen.jalbum
Class RemoteFSNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by se.datadosen.jalbum.RemoteFSNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class RemoteFSNode
extends javax.swing.tree.DefaultMutableTreeNode

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
RemoteFSNode(RemoteFile remoteFile, boolean leaf, RemoteFSContext context)
           
RemoteFSNode(java.lang.String name, boolean link, boolean leaf, RemoteFSContext context)
           
RemoteFSNode(java.lang.String name, java.lang.String remoteName, RemoteFSContext context)
          Set remoteName to null to indicate a RemoteFSNode that still has no corresponding physical directory
 
Method Summary
 boolean areChildrenDefined()
           
 int getChildCount()
           
 int getPlainFileCount()
           
 java.lang.String getRemoteName()
           
 long getSize()
           
 void invalidate()
          Indicate that underlaying directory structure has changed and needs to be rebuilt Remember to call DefaultTreeModel.nodeStructureChanged afterwards
 void invalidateNodeOnly()
           
 boolean isAlbum()
           
static boolean isLateDiscovery()
           
 boolean isLeaf()
           
 boolean isLink()
           
 boolean isPasswordProtected()
           
 boolean isRealDirectory()
          Temporary nodes (just created ones) have no physical remote directory
 java.lang.String oldRemotePath()
           
static java.lang.String oldRemotePath(javax.swing.tree.TreePath tp, RemoteFSContext context)
          Returns full path to a directory as it was named prior to being renamed (support for rename)
 java.lang.String remotePath()
          convenience
static java.lang.String remotePath(javax.swing.tree.TreePath tp, RemoteFSContext context)
           
static void setLateDiscovery(boolean lateDiscovery)
           
 void setRemoteName(java.lang.String remoteName)
           
 void setUserObject(java.lang.Object userObject)
           
static javax.swing.tree.TreePath treePath(java.lang.String remotePath, javax.swing.tree.TreeModel model)
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteFSNode

public RemoteFSNode(java.lang.String name,
                    java.lang.String remoteName,
                    RemoteFSContext context)
Set remoteName to null to indicate a RemoteFSNode that still has no corresponding physical directory


RemoteFSNode

public RemoteFSNode(java.lang.String name,
                    boolean link,
                    boolean leaf,
                    RemoteFSContext context)

RemoteFSNode

public RemoteFSNode(RemoteFile remoteFile,
                    boolean leaf,
                    RemoteFSContext context)
Method Detail

isLateDiscovery

public static boolean isLateDiscovery()

setLateDiscovery

public static void setLateDiscovery(boolean lateDiscovery)

setUserObject

public void setUserObject(java.lang.Object userObject)
Specified by:
setUserObject in interface javax.swing.tree.MutableTreeNode
Overrides:
setUserObject in class javax.swing.tree.DefaultMutableTreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode

isLink

public boolean isLink()

getSize

public long getSize()

isPasswordProtected

public boolean isPasswordProtected()

isAlbum

public boolean isAlbum()

areChildrenDefined

public boolean areChildrenDefined()

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode
Overrides:
getChildCount in class javax.swing.tree.DefaultMutableTreeNode

getPlainFileCount

public int getPlainFileCount()

isRealDirectory

public boolean isRealDirectory()
Temporary nodes (just created ones) have no physical remote directory


getRemoteName

public java.lang.String getRemoteName()

setRemoteName

public void setRemoteName(java.lang.String remoteName)

invalidate

public void invalidate()
Indicate that underlaying directory structure has changed and needs to be rebuilt Remember to call DefaultTreeModel.nodeStructureChanged afterwards


invalidateNodeOnly

public void invalidateNodeOnly()

remotePath

public java.lang.String remotePath()
convenience


oldRemotePath

public java.lang.String oldRemotePath()

remotePath

public static java.lang.String remotePath(javax.swing.tree.TreePath tp,
                                          RemoteFSContext context)

oldRemotePath

public static java.lang.String oldRemotePath(javax.swing.tree.TreePath tp,
                                             RemoteFSContext context)
Returns full path to a directory as it was named prior to being renamed (support for rename)


treePath

public static javax.swing.tree.TreePath treePath(java.lang.String remotePath,
                                                 javax.swing.tree.TreeModel model)