com.jgoodies.jdiskreport.model.node
Class DirectoryNode

java.lang.Object
  extended by com.jgoodies.jdiskreport.model.node.AbstractNode
      extended by com.jgoodies.jdiskreport.model.node.DirectoryNode
Direct Known Subclasses:
RootNode

public class DirectoryNode
extends AbstractNode

Describes directories.

Version:
$Revision: 1.18 $
Author:
Karsten Lentzsch

Nested Class Summary
static class DirectoryNode.FileTreeModel
           
 
Constructor Summary
protected DirectoryNode(Directory directory, long size, long directoryCount, long fileCount, DirectoryNode[] childDirectories, FileNode[] childFiles)
          Constructs a DirectoryNode for the given name, size, file count, child directories and files.
 
Method Summary
 void clearCachedFiles()
           
protected  void computeAndSetStatistics(int level)
           
 DirectoryNode[] getChildDirectories()
           
 FileNode[] getChildFiles()
           
protected  Directory getDirectory()
           
 long getDirectoryCount()
           
 long getFileCount()
           
 FileNode getLargestFile()
           
 String getName()
           
 FileNode getNewestFile()
           
 String getNodeName()
          Returns the name displayed by directory tree nodes.
 FileNode getOldestFile()
           
 String getPath()
           
 long getSize()
           
 Statistics getStatistics()
           
 TableModel getTableModel(GUISettings.SortMode sortMode, GUISettings.SizeMode sizeMode, boolean showFiles)
           
 TreeChartModel<AbstractNode> getTreeChartModel(GUISettings.SortMode sortMode, GUISettings.SizeMode sizeMode, boolean showFiles)
           
 boolean isFileLeaf()
           
 
Methods inherited from class com.jgoodies.jdiskreport.model.node.AbstractNode
getAbsoluteSize, getFile, getIcon, getParent, getRelativeSize, getRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryNode

protected DirectoryNode(Directory directory,
                        long size,
                        long directoryCount,
                        long fileCount,
                        DirectoryNode[] childDirectories,
                        FileNode[] childFiles)
Constructs a DirectoryNode for the given name, size, file count, child directories and files. Sets this node as parent for all its children.

Method Detail

getName

public String getName()
Specified by:
getName in class AbstractNode

isFileLeaf

public boolean isFileLeaf()
Specified by:
isFileLeaf in class AbstractNode

getNodeName

public String getNodeName()
Returns the name displayed by directory tree nodes.

Returns:
the file name for directories, the path for root nodes

getPath

public String getPath()

getSize

public long getSize()
Specified by:
getSize in class AbstractNode

getDirectoryCount

public long getDirectoryCount()

getFileCount

public long getFileCount()
Specified by:
getFileCount in class AbstractNode

getChildDirectories

public DirectoryNode[] getChildDirectories()

getChildFiles

public FileNode[] getChildFiles()

getStatistics

public Statistics getStatistics()

getLargestFile

public FileNode getLargestFile()

getOldestFile

public FileNode getOldestFile()

getNewestFile

public FileNode getNewestFile()

computeAndSetStatistics

protected void computeAndSetStatistics(int level)

clearCachedFiles

public void clearCachedFiles()
Overrides:
clearCachedFiles in class AbstractNode

getTableModel

public final TableModel getTableModel(GUISettings.SortMode sortMode,
                                      GUISettings.SizeMode sizeMode,
                                      boolean showFiles)

getTreeChartModel

public final TreeChartModel<AbstractNode> getTreeChartModel(GUISettings.SortMode sortMode,
                                                            GUISettings.SizeMode sizeMode,
                                                            boolean showFiles)

getDirectory

protected Directory getDirectory()


Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.