public class TreeTableModelSorted extends TreeTableModelAbstract
listenerList, root
Constructor and Description |
---|
TreeTableModelSorted(java.lang.String[] colName,
java.util.ArrayList rows)
This uses the mode where the selected column becomes the root of the tree.
|
TreeTableModelSorted(ThreadSorter threadSorter,
java.lang.String[] colName,
java.util.ArrayList rows)
This is the mode that adds a column for threads.
|
Modifier and Type | Method and Description |
---|---|
void |
addRowsToSetFromPath(javax.swing.JTree tree,
javax.swing.tree.TreePath path,
java.util.Set set) |
java.lang.Object |
getChild(java.lang.Object parent,
int index) |
int |
getChildCount(java.lang.Object parent) |
java.lang.Class |
getColumnClass(int column)
Returns the type for column number
column . |
int |
getColumnCount()
Returns the number ofs availible column.
|
java.lang.String |
getColumnName(int col)
Returns the name for column number
column . |
javax.swing.tree.TreePath |
getPath(TableRow row) |
boolean |
getReverse() |
TableRow |
getRow(int rowno) |
TableRow |
getRow(java.lang.Object node) |
TableRow |
getRow(javax.swing.tree.TreePath path) |
int |
getRowCount() |
java.util.ArrayList |
getRows() |
int |
getSortCol() |
java.lang.Object |
getValueAt(java.lang.Object node,
int col)
Returns the value to be displayed for node
node ,
at column number column . |
boolean |
isThreadsOn() |
boolean |
isTreeSort() |
void |
setReverse(boolean reverse) |
void |
setRows(java.util.ArrayList rows)
Set a new rowlist.
|
void |
setSortCol(int sortCol) |
void |
setSorter(RowSorter sorter) |
void |
setThreadsOn(boolean threadsOn) |
void |
sort()
sort using the current sortCol and reverse
|
boolean |
sort(int sortCol)
sort using the current sortCol; toggle reverse
|
void |
sort(int sortCol,
boolean reverse)
sort using the named sortCol and reverse
|
java.lang.String |
toString() |
boolean |
useThreads() |
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, isCellEditable, isLeaf, removeTreeModelListener, setValueAt, valueForPathChanged
public TreeTableModelSorted(java.lang.String[] colName, java.util.ArrayList rows)
colName
- list of column names, must have length > 0.rows
- array of rows that implement TableRow interface, may be empty but not null.public TreeTableModelSorted(ThreadSorter threadSorter, java.lang.String[] colName, java.util.ArrayList rows)
threadSorter
- if non-null, add thread column.colName
- list of column names, must have length > 0.rows
- array of rows that implement TableRow interface, may be empty but not null.
We make a copy of the Array, but these point to the original objects.public boolean isTreeSort()
public boolean useThreads()
public boolean isThreadsOn()
public void setThreadsOn(boolean threadsOn)
public boolean getReverse()
public void setReverse(boolean reverse)
public int getSortCol()
public void setSortCol(int sortCol)
public void setSorter(RowSorter sorter)
public java.util.ArrayList getRows()
public void setRows(java.util.ArrayList rows)
rows
- array of rows that implement TableRow interfacepublic int getRowCount()
public void sort()
public boolean sort(int sortCol)
public void sort(int sortCol, boolean reverse)
public int getChildCount(java.lang.Object parent)
public java.lang.Object getChild(java.lang.Object parent, int index)
public TableRow getRow(java.lang.Object node)
public int getColumnCount()
TreeTableModel
public java.lang.String getColumnName(int col)
TreeTableModel
column
.public java.lang.Object getValueAt(java.lang.Object node, int col)
TreeTableModel
node
,
at column number column
.public java.lang.Class getColumnClass(int column)
TreeTableModel
column
.getColumnClass
in interface TreeTableModel
getColumnClass
in class TreeTableModelAbstract
public TableRow getRow(int rowno)
public TableRow getRow(javax.swing.tree.TreePath path)
public void addRowsToSetFromPath(javax.swing.JTree tree, javax.swing.tree.TreePath path, java.util.Set set)
public javax.swing.tree.TreePath getPath(TableRow row)
public java.lang.String toString()
toString
in class java.lang.Object