com.jgoodies.jdiskreport.model.node
Class FileTreeChartModel

java.lang.Object
  extended by com.jgoodies.chart.AbstractTreeChartModel<AbstractNode>
      extended by com.jgoodies.jdiskreport.model.node.FileTreeChartModel
All Implemented Interfaces:
TreeChartModel<AbstractNode>

public final class FileTreeChartModel
extends AbstractTreeChartModel<AbstractNode>

A TreeChartModel build from nodes of a file tree.

Version:
$Revision: 1.4 $
Author:
Karsten Lentzsch

Constructor Summary
FileTreeChartModel(DirectoryNode root, GUISettings.SortMode sortMode, GUISettings.SizeMode sizeMode, boolean showFiles)
           
 
Method Summary
 AbstractNode getChild(AbstractNode node, int index)
           
 int getChildCount(AbstractNode node)
          Returns the number of children of the given node.
 DirectoryNode getRoot()
          Returns this tree's root node.
 long getSize(AbstractNode node)
          Returns the mandatory size of the given node.
 boolean isLeaf(AbstractNode node)
          Used to determine how to color the node in a tree map.
 
Methods inherited from class com.jgoodies.chart.AbstractTreeChartModel
addChangeListener, fireStateChanged, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTreeChartModel

public FileTreeChartModel(DirectoryNode root,
                          GUISettings.SortMode sortMode,
                          GUISettings.SizeMode sizeMode,
                          boolean showFiles)
Method Detail

getRoot

public DirectoryNode getRoot()
Description copied from interface: TreeChartModel
Returns this tree's root node.

Returns:
the root node

getChildCount

public int getChildCount(AbstractNode node)
Returns the number of children of the given node.

Returns:
the number of chilren of the given node

getChild

public AbstractNode getChild(AbstractNode node,
                             int index)

getSize

public long getSize(AbstractNode node)
Returns the mandatory size of the given node.


isLeaf

public boolean isLeaf(AbstractNode node)
Description copied from interface: TreeChartModel
Used to determine how to color the node in a tree map.

Parameters:
node - the node to be checked
Returns:
true if leaf, false otherwise


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