|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citra.treetable.AbstractTreeTableModel
com.citra.treetable.MutableTreeTableModel
com.citra.treetable.dir.DirectoryTreeTableModel
public class DirectoryTreeTableModel
DirectoryTreeTableModel is the treetable model that can hold a directory structure.
Field Summary |
---|
Fields inherited from class com.citra.treetable.MutableTreeTableModel |
---|
classes, columns |
Fields inherited from class com.citra.treetable.AbstractTreeTableModel |
---|
listenerList, root |
Fields inherited from interface com.citra.treetable.TreeTableModel |
---|
CHANGE_COLUMN_SOURCE |
Constructor Summary | |
---|---|
DirectoryTreeTableModel()
Creates a DirectoryTreeTableModel. |
|
DirectoryTreeTableModel(File initialFile)
Creates a DirectoryTreeTableModel. |
|
DirectoryTreeTableModel(File[] initialFiles)
Creates a DirectoryTreeTableModel. |
Method Summary | |
---|---|
int |
getChildCount(Object parent)
Returns the number of children of parent .
Returns 0 if the node
is a leaf or if it has no children. parent must be a node
previously obtained from this data source. |
List |
getUncachedChildren(Object parent,
int from,
int to)
Retrieves the leaf rows from the treetable model by specifying a row interval. |
int |
getUncachedGroupCount(Object node)
Retrieves the children count for node. |
List |
getUncachedGroups(Object parent,
int from,
int to)
Retrieves the branch rows from the treetable model by specifying a row interval. |
Object |
getValueAt(Object node,
int column)
Returns the value to be displayed for node ,
at column index column . |
boolean |
isCountCached(Object node)
Determines whether the children count for node has been evaluated. |
boolean |
isLeaf(Object node)
Returns true if node is a leaf.
It is possible for this method to return false
even if node has no children.
A directory in a filesystem, for example,
may contain no files; the node representing
the directory is not a leaf, but it also has no children. |
boolean |
isRangedModel()
Determines whether the cache model can fetch data in ranges. |
boolean |
isValueCached(Object node,
int column)
Determines whether the value for node at index column has been evaluated. |
Methods inherited from class com.citra.treetable.MutableTreeTableModel |
---|
addColumn, addColumn, addReorderListener, clear, fireRowsMapped, fireRowsReordered, getChild, getColumnClass, getColumnCount, getColumnName, getIndexOfChild, getPathToRoot, getPathToRoot, insertNodeInto, isCellEditable, moveNode, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, removeNodeFromParent, removeReorderListener, setColumnClasses, setColumnNames, setValueAt, valueForPathChanged |
Methods inherited from class com.citra.treetable.AbstractTreeTableModel |
---|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeTableStructureChanged, fireTreeTableStructureChanged, getRoot, isAggregate, isFooter, isHeader, removeTreeModelListener, setRoot |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.citra.treetable.TreeTableModel |
---|
getColumnClass, getColumnCount, getColumnName, isAggregate, isCellEditable, isFooter, isHeader, setValueAt |
Methods inherited from interface javax.swing.tree.TreeModel |
---|
addTreeModelListener, getChild, getIndexOfChild, getRoot, removeTreeModelListener, valueForPathChanged |
Constructor Detail |
---|
public DirectoryTreeTableModel()
public DirectoryTreeTableModel(File[] initialFiles)
public DirectoryTreeTableModel(File initialFile)
Method Detail |
---|
public int getChildCount(Object parent)
parent
.
Returns 0 if the node
is a leaf or if it has no children. parent
must be a node
previously obtained from this data source.
getChildCount
in interface TreeModel
getChildCount
in class MutableTreeTableModel
parent
- a node in the tree, obtained from this data source
parent
public List getUncachedChildren(Object parent, int from, int to)
getUncachedChildren
in interface CacheableTreeTableModel
parent
- the parent nodefrom
- the starting rowto
- the ending row
public int getUncachedGroupCount(Object node)
getUncachedGroupCount
in interface CacheableTreeTableModel
node
- the node for which the children count we want to retrieve.
public List getUncachedGroups(Object parent, int from, int to)
getUncachedGroups
in interface CacheableTreeTableModel
parent
- the parent nodefrom
- the starting rowto
- the ending row
public Object getValueAt(Object node, int column)
node
,
at column index column
.
getValueAt
in interface TreeTableModel
node
- the node to querycolumn
- the column index
public boolean isCountCached(Object node)
isCountCached
in interface CacheableTreeTableModel
public boolean isLeaf(Object node)
true
if node
is a leaf.
It is possible for this method to return false
even if node
has no children.
A directory in a filesystem, for example,
may contain no files; the node representing
the directory is not a leaf, but it also has no children.
isLeaf
in interface TreeModel
isLeaf
in class MutableTreeTableModel
node
- a node in the tree, obtained from this data source
node
is a leafpublic boolean isRangedModel()
isRangedModel
in interface CacheableTreeTableModel
public boolean isValueCached(Object node, int column)
isValueCached
in interface CacheableTreeTableModel
node
- the node to considercolumn
- the cell's column index
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |