|
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.table.data.AbstractDataSource | +--com.klg.jclass.table.data.JCTableModelDataSource
The JCTableModelDataSource
class defines a wrapper for JTable
TableModel
objects.
Field Summary | |
protected TableModel |
model
|
Fields inherited from class com.klg.jclass.table.data.AbstractDataSource |
listeners |
Constructor Summary | |
JCTableModelDataSource(TableModel model)
Creates a new JCTableModelDataSource object containing a Swing
TableModel object. |
Method Summary | |
int |
getNumColumns()
Returns the number of columns of data that the data source contains. |
int |
getNumRows()
Returns the number of rows of data that the data source contains. |
Object |
getTableColumnLabel(int column)
Returns the value for the column label at the specified column. |
Object |
getTableDataItem(int row,
int column)
Returns the value for the cell at the specified location. |
TableModel |
getTableModel()
Returns the current TableModel instance assiciated with the class. |
Object |
getTableRowLabel(int row)
Returns the value for the row label at the specified row. |
boolean |
isCellEditable(int row,
int column)
Determines whether the cell can be edited. |
boolean |
isEnabled()
Determines whether the cell can be edited. |
boolean |
setTableDataItem(Object o,
int row,
int column)
Sets a value in the data source. |
void |
tableChanged(TableModelEvent e)
Maps TableModelEvents to TableDataEvents based on the information
about the exact range of cells, rows, or columns that changed. |
Methods inherited from class com.klg.jclass.table.data.AbstractDataSource |
addTableDataListener, dispose, fireColumnChanged, fireColumnLabelChanged, fireColumnsAdded, fireColumnsDeleted, fireColumnsMoved, fireDataReset, fireNumColumnsChanged, fireNumRowsChanged, fireRowChanged, fireRowDeleted, fireRowLabelChanged, fireRowsAdded, fireRowsMoved, fireTableDataEvent, fireValueChanged, hasListeners, removeTableDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.klg.jclass.table.TableDataModel |
addTableDataListener, removeTableDataListener |
Field Detail |
protected TableModel model
Constructor Detail |
public JCTableModelDataSource(TableModel model)
JCTableModelDataSource
object containing a Swing
TableModel
object.
model
- Method Detail |
public TableModel getTableModel()
TableModel
instance assiciated with the class.
TableModel
instance if it is available; null otherwisepublic int getNumRows()
getNumRows
in interface JCTableDataModel
public int getNumColumns()
getNumColumns
in interface JCTableDataModel
public Object getTableRowLabel(int row)
TableModel
does not
support row labels, return value is always an empty String.
getTableRowLabel
in interface JCTableDataModel
row
- the row number
public Object getTableColumnLabel(int column)
getTableColumnLabel
in interface JCTableDataModel
column
- the column number
public Object getTableDataItem(int row, int column)
getTableDataItem
in interface JCTableDataModel
row
- the row numbercolumn
- the column number
public boolean setTableDataItem(Object o, int row, int column)
setTableDataItem
in interface EditableTableDataModel
o
- the cell value in the data modelrow
- the row numbercolumn
- the column number
true
public boolean isEnabled()
true
if the data model is available; false
otherwisepublic boolean isCellEditable(int row, int column)
row
- the row numbercolumn
- the column number
true
if the cell can be edited; false
otherwisepublic void tableChanged(TableModelEvent e)
TableModelEvents
to TableDataEvents
based on the information
about the exact range of cells, rows, or columns that changed.
tableChanged
in interface TableModelListener
e
- the TableModelEvent
instance
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |