org.emboss.jemboss.gui.filetree
Class RemoteFileNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byorg.emboss.jemboss.gui.filetree.RemoteFileNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, java.awt.datatransfer.Transferable, javax.swing.tree.TreeNode

public class RemoteFileNode
extends javax.swing.tree.DefaultMutableTreeNode
implements java.awt.datatransfer.Transferable, java.io.Serializable

File node for remote file tree manager

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
private  boolean explored
          true if node is explored
private  FileRoots froots
          remote server file roots
private  java.lang.String fs
          file separator for server files
private  java.lang.String fullname
          full name of node
private  boolean isDir
          true if node is a directory
private  JembossParams mysettings
          jemboss properties
private  FileList parentList
          parent directory listing
static java.awt.datatransfer.DataFlavor REMOTEFILENODE
           
(package private) static java.awt.datatransfer.DataFlavor[] remoteFlavors
           
private  java.lang.String rootdir
          root directory
private  java.lang.String serverPathToFile
          path to the file on the server
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
RemoteFileNode(JembossParams mysettings, FileRoots froots, java.lang.String file, FileList parentList, java.lang.String parent)
           
RemoteFileNode(JembossParams mysettings, FileRoots froots, java.lang.String file, FileList parentList, java.lang.String parent, boolean ldir)
           
 
Method Summary
 void explore()
          Explore the node and add new child nodes
 boolean getAllowsChildren()
           
 java.lang.String getFile()
           
 java.lang.String getFullName()
           
 java.lang.String getPathName()
           
 java.lang.String getRootDir()
           
 java.lang.String getServerName()
          Get the server name
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor d)
           
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
           
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor f)
           
 boolean isDirectory()
           
 boolean isExplored()
           
 boolean isLeaf()
           
private  void readObject(java.io.ObjectInputStream in)
           
private  void writeObject(java.io.ObjectOutputStream out)
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, 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, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

explored

private boolean explored
true if node is explored


isDir

private boolean isDir
true if node is a directory


fullname

private java.lang.String fullname
full name of node


serverPathToFile

private java.lang.String serverPathToFile
path to the file on the server


rootdir

private java.lang.String rootdir
root directory


parentList

private transient FileList parentList
parent directory listing


mysettings

private transient JembossParams mysettings
jemboss properties


froots

private transient FileRoots froots
remote server file roots


fs

private java.lang.String fs
file separator for server files


REMOTEFILENODE

public static final java.awt.datatransfer.DataFlavor REMOTEFILENODE

remoteFlavors

static java.awt.datatransfer.DataFlavor[] remoteFlavors
Constructor Detail

RemoteFileNode

public RemoteFileNode(JembossParams mysettings,
                      FileRoots froots,
                      java.lang.String file,
                      FileList parentList,
                      java.lang.String parent)
Parameters:
mysettings - jemboss properties
froots - remote server file roots
file - file for this node
parentList - parent directory listing
parent - parent to this node

RemoteFileNode

public RemoteFileNode(JembossParams mysettings,
                      FileRoots froots,
                      java.lang.String file,
                      FileList parentList,
                      java.lang.String parent,
                      boolean ldir)
Parameters:
mysettings - jemboss properties
froots - remote server file roots
file - file for this node
parentList - parent directory listing
parent - parent to this node
ldir - true if the node is a directory
Method Detail

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
Returns:
true if node is a directory

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Returns:
true if node is a file

isDirectory

public boolean isDirectory()
Returns:
true if node is a directory

getFile

public java.lang.String getFile()
Returns:
the node name

getRootDir

public java.lang.String getRootDir()
Returns:
root directory

getFullName

public java.lang.String getFullName()
Returns:
full name of the node

getPathName

public java.lang.String getPathName()
Returns:
path on server

isExplored

public boolean isExplored()
Returns:
true if explored

getServerName

public java.lang.String getServerName()
Get the server name

Returns:
server name

explore

public void explore()
Explore the node and add new child nodes


getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor f)
Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor d)
                                 throws java.awt.datatransfer.UnsupportedFlavorException,
                                        java.io.IOException
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Throws:
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException

writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException
Throws:
java.io.IOException

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException