|
TreeMap Java Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttreemap.demo.TMFileNode
public class TMFileNode
The TMFileNode implements an example of TMNode encapsulating a File.
| Field Summary | |
|---|---|
protected java.util.Hashtable |
children
|
protected long |
date
|
protected int |
delay
|
protected java.io.File |
file
|
protected java.lang.String |
name
|
protected TMFileNode |
parent
|
protected long |
size
|
protected TMUpdater |
updater
|
| Constructor Summary | |
|---|---|
|
TMFileNode(java.io.File file)
Constructor. |
protected |
TMFileNode(java.io.File file,
TMFileNode parent,
treemap.demo.TMFileNode.ProgressStatus status)
Constructor. |
| Method Summary | |
|---|---|
protected void |
addChild(TMFileNode child)
Add child to the node. |
protected void |
buildTree(treemap.demo.TMFileNode.ProgressStatus status)
Builds the tree hierarchie of a TMFileNode. |
java.util.Enumeration |
children()
Returns the children of this node in an Enumeration. |
long |
getDate()
Returns the last modification date. |
java.lang.String |
getFullName()
Returns the full name of the file. |
java.lang.String |
getName()
Returns the name of the file. |
long |
getSize()
Returns the size of the node. |
protected boolean |
hasChanged()
Checks if something has changed. |
boolean |
isLeaf()
Returns true if this node is not a directory. |
protected void |
removeChild(TMFileNode child)
Removes a child from the node. |
void |
setUpdater(TMUpdater updater)
Sets the updater for this node. |
java.lang.String |
toString()
Returns the node in a String form : return the name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final int delay
protected java.io.File file
protected TMFileNode parent
protected java.util.Hashtable children
protected TMUpdater updater
protected long size
protected long date
protected java.lang.String name
| Constructor Detail |
|---|
public TMFileNode(java.io.File file)
file - the File encapsulated in this node
protected TMFileNode(java.io.File file,
TMFileNode parent,
treemap.demo.TMFileNode.ProgressStatus status)
file - the File encapsulated in this nodeparent - the parent of this nodestatus - the progress status to update| Method Detail |
|---|
protected void buildTree(treemap.demo.TMFileNode.ProgressStatus status)
node - the TMFileNode root of the treestatus - the progress status to updateprotected void addChild(TMFileNode child)
child - the TMFileNode to add as a childprotected void removeChild(TMFileNode child)
child - the TMFileChild to remove.public java.lang.String getFullName()
public java.lang.String getName()
public long getSize()
public long getDate()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Enumeration children()
children in interface TMNodepublic boolean isLeaf()
isLeaf in interface TMNodefalse if this node is a directory;
true otherwisepublic void setUpdater(TMUpdater updater)
setUpdater in interface TMNodeupdater - the updater for this nodeprotected boolean hasChanged()
true if something has changed;
false otherwise
|
TreeMap Java Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||