|
JAPI 0.9.0 Yet another Java API API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
net.sf.japi.swing.treetable.TreeTableModelTableModelAdapter
public class TreeTableModelTableModelAdapter
Wraps a TreeTableModel in a TableModel.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
TreeTableModelTableModelAdapter(TreeTableModel treeTableModel,
JTree tree)
Create a TreeTableModelAdapter. |
|
| Method Summary | |
|---|---|
Class<?> |
getColumnClass(int columnIndex)
Returns Object.class regardless of columnIndex. |
int |
getColumnCount()
Returns the number of columns in the model. |
String |
getColumnName(int column)
Returns a default name for the column using spreadsheet conventions: A, B, C, ... |
int |
getRowCount()
Returns the number of rows in the model. |
Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at columnIndex and
rowIndex. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns false. |
protected Object |
nodeForRow(int row)
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
This empty implementation is provided so users don't have to implement this method if their data model is not editable. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeTableModelTableModelAdapter(TreeTableModel treeTableModel,
JTree tree)
treeTableModel - TreeTableModel to adapttree - JTree to adapt| Method Detail |
|---|
public int getRowCount()
JTable uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering.
TableModel.getColumnCount()public int getColumnCount()
JTable uses this method to determine how many columns it
should create and display by default.
TableModel.getRowCount()
public Object getValueAt(int rowIndex,
int columnIndex)
columnIndex and
rowIndex.
rowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queried
public Class<?> getColumnClass(int columnIndex)
Object.class regardless of columnIndex.
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcolumnIndex - the column being queried
public String getColumnName(int column)
column cannot be found,
returns an empty string.
getColumnName in interface TableModelgetColumnName in class AbstractTableModelcolumn - the column being queried
column
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrowIndex - the row being queriedcolumnIndex - the column being queried
TableModel.setValueAt(java.lang.Object, int, int)protected Object nodeForRow(int row)
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelaValue - value to assign to cellrowIndex - row of cellcolumnIndex - column of cellTableModel.getValueAt(int, int),
TableModel.isCellEditable(int, int)
|
JAPI Yet another Java API API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||