|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.tivoli.twg.guilibs.UFTreeListViewObject
com.tivoli.twg.filetransfer.FSTObject
This is a class to represent file system objects in the tree and in the list of files. It is more versitle than the simple string representation.
Field Summary | |
---|---|
static int |
DIRECTORY
constant to indicate the type of FSTObject is a Directory |
static int |
DRIVE
constant to indicate the type of FSTObject is a Drive |
static int |
DRIVE_TYPE_CD_ROM
|
static int |
DRIVE_TYPE_FLOPPY
|
static int |
DRIVE_TYPE_HARDFILE
|
static int |
DRIVE_TYPE_NETWORK
|
static int |
DRIVE_TYPE_NOT_REPORTED
|
static int |
DRIVE_TYPE_RAMDRIVE
|
static int |
FILE
constant to indicate the type of FSTObject is a File |
Fields inherited from class com.tivoli.twg.guilibs.UFTreeListViewObject |
---|
DEFAULT_SORT_WEIGHT |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
FSTObject(java.lang.String name,
java.lang.String path)
Constructor for an FSTObject of type FILE. |
|
FSTObject(java.lang.String name,
java.lang.String path,
int type)
Constructor for an FSTObject of any type |
|
FSTObject(java.lang.String name,
java.lang.String path,
int type,
java.lang.String driveLabel,
int driveType)
Constructor for an FSTObject of any type |
Method Summary | |
---|---|
void |
add(javax.swing.tree.MutableTreeNode toAdd)
Add a child node to this parent node. |
java.lang.Object |
clone()
Overides clone so it "remembers" its children. |
static int |
compare(FSTObject o1,
FSTObject o2)
Compare two FSTObjects. |
boolean |
equals(java.lang.Object obj)
Checks to see if the passed in Object is an FSTObject and whether it has the same path and name as this one. |
java.lang.String |
getDriveLabel()
Returns the object's drive label. |
int |
getDriveType()
Returns the object's drive type. |
javax.swing.ImageIcon |
getExpandedImage()
Returns the image used to represent the node. |
FileAttrs |
getFileAttributes()
Get the file attributes belonging to this object. |
java.lang.String |
getFileSystemPath()
Returns a string representation of the objects location on the file system |
javax.swing.ImageIcon |
getImage()
Returns the image used to represent the node. |
java.lang.String |
getName()
Returns the object name. |
int |
getType()
Returns the object type, |
void |
insert(javax.swing.tree.MutableTreeNode newChild,
int childIndex)
Removes newChild from its present parent (if it has a
parent), sets the child's parent to this node, and then adds the child
to this node's child array at index childIndex . |
boolean |
isEmpty()
Test whether or not this directory is empty. |
void |
remove(int childIndex)
|
void |
remove(javax.swing.tree.MutableTreeNode aChild)
|
void |
removeAllChildren()
|
static java.lang.String |
removeDuplicateChars(java.lang.String str,
char c)
Replaces all double occurrences of c (eg. |
void |
setDirectoryEmpty(boolean b)
Sets the directory empty flag. |
void |
setDriveLabel(java.lang.String driveLabel)
Sets the object's drive label. |
void |
setDriveType(int driveType)
Sets the object's drive type. |
void |
setFileAttributes(FileAttrs attrs)
Set the file attributes belonging to this object. |
void |
setFileSystemPath(java.lang.String path)
Sets the file system path. |
void |
setName(java.lang.String name)
Sets the name of this object. |
void |
setType(int type)
Sets the object type, |
static java.lang.String |
toDisplay(FileSource source,
java.lang.String filename)
Always display paths separated by the local default path delimiter. |
static java.lang.String |
toDisplay(java.lang.String filename)
Always display paths separated by the local default path delimiter. |
static java.lang.String |
toSend(FileSource source,
java.lang.String filename)
Always send paths separated by backslashes. |
static java.lang.String |
toSend(java.lang.String filename)
Always send paths separated by backslashes. |
static java.lang.String |
toStore(FileSource source,
java.lang.String filename)
Always store paths separated by forward slashes. |
static java.lang.String |
toStore(java.lang.String filename)
Always store paths separated by forward slashes. |
java.lang.String |
toString()
Returns tha path plus the file name separated by forward slashes. |
Methods inherited from class com.tivoli.twg.guilibs.UFTreeListViewObject |
---|
compareCaption, getCaption, getCaptionBackgroundColor, getCaptionFont, getCaptionForegroundColor, getLargeExpandedImage, getLargeImage, getSortWeight, getStatusDefinitions, isASource, isATarget, isEnabled, isTargetable, resetViewProperties, setAsSource, setAsTarget, setAsTargetable, setCaption, setCaptionBackgroundColor, setCaptionFont, setCaptionForegroundColor, setEnabled, setExpandedImage, setImage, setLargeExpandedImage, setLargeImage, setSortWeight, setStatusDefinitions, useExpandImage |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
breadthFirstEnumeration, children, 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, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FILE
public static final int DIRECTORY
public static final int DRIVE
public static final int DRIVE_TYPE_NOT_REPORTED
public static final int DRIVE_TYPE_FLOPPY
public static final int DRIVE_TYPE_HARDFILE
public static final int DRIVE_TYPE_CD_ROM
public static final int DRIVE_TYPE_NETWORK
public static final int DRIVE_TYPE_RAMDRIVE
Constructor Detail |
public FSTObject(java.lang.String name, java.lang.String path)
public FSTObject(java.lang.String name, java.lang.String path, int type)
public FSTObject(java.lang.String name, java.lang.String path, int type, java.lang.String driveLabel, int driveType)
Method Detail |
public void insert(javax.swing.tree.MutableTreeNode newChild, int childIndex)
newChild
from its present parent (if it has a
parent), sets the child's parent to this node, and then adds the child
to this node's child array at index childIndex
.
newChild
must not be null and must not be an ancestor of
this node.
insert
in interface javax.swing.tree.MutableTreeNode
newChild
- the MutableTreeNode to insert under this nodechildIndex
- the index in this node's child array
where this node is to be inserted
java.lang.ArrayIndexOutOfBoundsException
- if
childIndex
is out of bounds
java.lang.IllegalArgumentException
- if
newChild
is null or is an
ancestor of this node
java.lang.IllegalStateException
- if this node does not allow
childrenDefaultMutableTreeNode.isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode)
public void add(javax.swing.tree.MutableTreeNode toAdd)
public void removeAllChildren()
public void remove(javax.swing.tree.MutableTreeNode aChild)
remove
in interface javax.swing.tree.MutableTreeNode
public void remove(int childIndex)
remove
in interface javax.swing.tree.MutableTreeNode
public static int compare(FSTObject o1, FSTObject o2)
public java.lang.Object clone()
public javax.swing.ImageIcon getImage()
public javax.swing.ImageIcon getExpandedImage()
public java.lang.String getName()
public void setName(java.lang.String name)
public int getType()
public void setType(int type)
public int getDriveType()
public void setDriveType(int driveType)
public java.lang.String getDriveLabel()
public void setDriveLabel(java.lang.String driveLabel)
public java.lang.String getFileSystemPath()
public void setFileSystemPath(java.lang.String path)
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
obj
- the FSTobject to compare against.public void setDirectoryEmpty(boolean b)
public boolean isEmpty()
public void setFileAttributes(FileAttrs attrs)
public FileAttrs getFileAttributes()
public static java.lang.String toDisplay(java.lang.String filename)
public static java.lang.String toStore(java.lang.String filename)
public static java.lang.String toSend(java.lang.String filename)
public static java.lang.String toDisplay(FileSource source, java.lang.String filename)
public static java.lang.String toStore(FileSource source, java.lang.String filename)
public static java.lang.String toSend(FileSource source, java.lang.String filename)
public static java.lang.String removeDuplicateChars(java.lang.String str, char c)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |