org.xnap.gui.table
Class DefaultColumnTreeTableModel
java.lang.Object
org.xnap.gui.table.AbstractTreeTableModel
org.xnap.gui.table.AbstractColumnTreeTableModel
org.xnap.gui.table.DefaultColumnTreeTableModel
- All Implemented Interfaces:
- javax.swing.tree.TreeModel, ColumnModel, SortableModel, TreeTableModel
- Direct Known Subclasses:
- OpenNapServerTableModel, PircBotServerTableModel, SearchTableModel, TransferTableModel
public class DefaultColumnTreeTableModel
- extends AbstractColumnTreeTableModel
- implements SortableModel
Methods inherited from class org.xnap.gui.table.AbstractTreeTableModel |
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, isCellEditable, removeTreeModelListener, setValueAt, valueForPathChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultColumnTreeTableModel
public DefaultColumnTreeTableModel()
add
public void add(TreeTableNode node)
getChild
public java.lang.Object getChild(java.lang.Object node,
int index)
- Specified by:
getChild
in interface javax.swing.tree.TreeModel
getChildCount
public int getChildCount(java.lang.Object node)
- Specified by:
getChildCount
in interface javax.swing.tree.TreeModel
indexOfByData
public int indexOfByData(java.lang.Object data)
- Returns the node that stores
data
.
- Returns:
- -1, if data could not be found
getValueAt
public java.lang.Object getValueAt(java.lang.Object node,
int column)
- Description copied from interface:
TreeTableModel
- Returns the value to be displayed for node
node
,
at column number column
.
- Specified by:
getValueAt
in interface TreeTableModel
iterator
public java.util.Iterator iterator()
remove
public void remove(TreeTableNode node)
remove
public void remove(int index)
getSortedColumn
public int getSortedColumn()
- Description copied from interface:
SortableModel
- Returns the index of the column that was sorted last.
- Specified by:
getSortedColumn
in interface SortableModel
isSortedAscending
public boolean isSortedAscending()
- Description copied from interface:
SortableModel
- Returns true, if the table is sorted in ascending order.
- Specified by:
isSortedAscending
in interface SortableModel
setMaintainSortOrder
public void setMaintainSortOrder(boolean newValue)
- Sets the maintain sort order flag.
- Specified by:
setMaintainSortOrder
in interface SortableModel
sortByColumn
public boolean sortByColumn(int column,
boolean ascending,
boolean revert)
- Sorts the table by
column
.
- Specified by:
sortByColumn
in interface SortableModel
- Parameters:
column
- the column to sortascending
- true, if table needs to be sorted in ascending order;
false, if in descending orderrevert
- automatically revert sort order
- Returns:
- true, if table was sorted ascending; false, if descending
Copyright © 2001-2005 XNap Team. All Rights Reserved.