public class SampleSortableTreeTabelModelImpl extends AbstractSortableTreeTableModel
Modifier and Type | Class and Description |
---|---|
static class |
SampleSortableTreeTabelModelImpl.RootNode |
Modifier and Type | Field and Description |
---|---|
(package private) Class[] |
columnClasses |
(package private) String[] |
columnNames |
(package private) static SampleSortableTreeTabelModelImpl |
instance |
(package private) SampleSortableTreeTabelModelImpl.RootNode |
root_ |
listenerList
Modifier | Constructor and Description |
---|---|
private |
SampleSortableTreeTabelModelImpl() |
Modifier and Type | Method and Description |
---|---|
private static void |
e(String s) |
Class |
getColumnClass(int column)
Returns the most specific superclass for all the cell values in the
column.
|
int |
getColumnCount()
Returns the number of columns in the model.
|
String |
getColumnName(int column)
Returns the name of the column at
columnIndex . |
int |
getHierarchicalColumn()
Returns the column that is the "tree" column.
|
static SampleSortableTreeTabelModelImpl |
getInstance() |
Object |
getRoot() |
Object |
getValueAt(Object node,
int column)
Returns the value for the
node at columnIndex . |
private static void |
s(String s) |
void |
sortOrderChanged(SortEvent e) |
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getPathToRoot, getPathToRoot, getTreeModelListeners, isCellEditable, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, removeTreeModelListener, setValueAt, valueForPathChanged
String[] columnNames
Class[] columnClasses
static SampleSortableTreeTabelModelImpl instance
private SampleSortableTreeTabelModelImpl()
public void sortOrderChanged(SortEvent e)
sortOrderChanged
in interface ColumnSorter
sortOrderChanged
in class AbstractSortableTreeTableModel
public Class getColumnClass(int column)
TreeTableModel
JXTreeTable
to set up a default
renderer and editor for the column.getColumnClass
in interface TreeTableModel
getColumnClass
in class AbstractSortableTreeTableModel
column
- the index of the columnTableModel.getColumnClass(int)
public static SampleSortableTreeTabelModelImpl getInstance()
public int getColumnCount()
TreeTableModel
JXTreeTable
uses
this method to determine how many columns it should create and display by
default.getColumnCount
in interface TreeTableModel
getColumnCount
in class AbstractSortableTreeTableModel
TableModel.getColumnCount()
public String getColumnName(int column)
TreeTableModel
columnIndex
. This is used to
initialize the table's column header name. Note: this name does not need
to be unique; two columns in a table can have the same name.getColumnName
in interface TreeTableModel
getColumnName
in class AbstractSortableTreeTableModel
column
- the index of the columnTableModel.getColumnName(int)
public Object getValueAt(Object node, int column)
TreeTableModel
node
at columnIndex
. The
node
must be managed by this model. Unamanaged nodes should throw
an IllegalArgumentException
.getValueAt
in interface TreeTableModel
getValueAt
in class AbstractSortableTreeTableModel
node
- the node whose value is to be queriedcolumn
- the column whose value is to be queriedTreeTableModel.setValueAt(java.lang.Object, java.lang.Object, int)
,
TableModel.getValueAt(int, int)
public Object getRoot()
getRoot
in interface TreeModel
getRoot
in class AbstractSortableTreeTableModel
public int getHierarchicalColumn()
TreeTableModel
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses