|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.treetable.TableFromTreeTable
Class to wrap a treetable model so that the data in it can be viewed as a table model. This is an internal class and not for public use.
Field Summary | |
protected int |
hashInt
|
protected ArrayList |
rowMap
|
protected Hashtable |
treeMap
|
protected com.klg.jclass.util.treetable.JCTreeTableModel |
treetable
|
Constructor Summary | |
TableFromTreeTable(com.klg.jclass.util.treetable.JCTreeTableModel treetable)
|
Method Summary | |
protected void |
addKids(TreePath parent_path,
Object parent)
Add the kids of the parent whose is currently at the end of the parent_path, to the row to treepath and treepath to row mappings. |
void |
addTableModelListener(TableModelListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
Class |
getColumnClass(int columnIndex)
Returns the lowest common denominator Class in the column. |
int |
getColumnCount()
Returns the number of columns managed by the data source object. |
String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex . |
int |
getRowCount()
Returns the number of records managed by the data source object. |
Object |
getValueAt(int rowIndex,
int columnIndex)
Returns an attribute value for the cell at columnIndex
and rowIndex . |
protected void |
initMappings()
Initialize the row to tree and tree to row mappings |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns true if the cell at rowIndex and columnIndex
is editable. |
void |
removeTableModelListener(TableModelListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
protected void |
resetMappings()
If the treetable has changed it needs to call this to reset the mappings |
protected Object |
rowToNode(int row)
Get the node for the given row |
protected TreePath |
rowToTreePath(int row)
Get the tree path for the given row |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
Sets an attribute value for the record in the cell at columnIndex and rowIndex . |
protected int |
treePathToRow(TreePath path)
Get the row for the given tree path |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.klg.jclass.util.treetable.JCTreeTableModel treetable
protected ArrayList rowMap
protected int hashInt
protected Hashtable treeMap
Constructor Detail |
public TableFromTreeTable(com.klg.jclass.util.treetable.JCTreeTableModel treetable)
Method Detail |
protected void addKids(TreePath parent_path, Object parent)
parent_path
- The path from the root up to and including the parentparent
- The parent whose kids we want to addprotected void initMappings()
protected void resetMappings()
protected Object rowToNode(int row)
row
- The row whose node we want
protected TreePath rowToTreePath(int row)
row
- The row whose path we want
protected int treePathToRow(TreePath path)
path
- The path whose row we want
public int getRowCount()
JTable
uses this method to determine how many rows it
should create and display. This method should be quick, as it
is called by JTable
quite frequently.
getRowCount
in interface TableModel
getColumnCount()
public int getColumnCount()
JTable<
uses this method to determine how many columns it
should create and display upon initialization.
getColumnCount
in interface TableModel
getRowCount()
public String getColumnName(int columnIndex)
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 TableModel
columnIndex
- the index of column
public Class getColumnClass(int columnIndex)
Class
in the column.
This is used by the table to set up a default renderer and editor for the
column.
getColumnClass
in interface TableModel
columnIndex
- the index of the column whose class has been requested
public boolean isCellEditable(int rowIndex, int columnIndex)
rowIndex
and columnIndex
is editable. Otherwise, setValueAt()
on the cell will not change
the value of that cell.
isCellEditable
in interface TableModel
rowIndex
- the row of the cell whose editable value is requestedcolumnIndex
- the column of the cell whose editable value is requested
setValueAt(java.lang.Object, int, int)
public Object getValueAt(int rowIndex, int columnIndex)
columnIndex
and rowIndex
.
getValueAt
in interface TableModel
rowIndex
- the row whose value is to be looked upcolumnIndex
- the column whose value is to be looked up
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
columnIndex
and rowIndex
. aValue
is
the new value.
setValueAt
in interface TableModel
aValue
- the new valuerowIndex
- the row whose value is to be changedcolumnIndex
- the column whose value is to be changedgetValueAt(int, int)
,
isCellEditable(int, int)
public void addTableModelListener(TableModelListener l)
addTableModelListener
in interface TableModel
l
- the TableModelListenerpublic void removeTableModelListener(TableModelListener l)
removeTableModelListener
in interface TableModel
l
- the TableModelListener
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |