|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel javax.swing.table.DefaultTableModel diamondedge.swing.grid.DefaultGridModel
public class DefaultGridModel
Field Summary |
---|
Fields inherited from class javax.swing.table.DefaultTableModel |
---|
columnIdentifiers, dataVector |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Fields inherited from interface diamondedge.swing.grid.GridModel |
---|
DELETE_CELL |
Constructor Summary | |
---|---|
DefaultGridModel()
Constructs a default DefaultGridModel
which is a table of zero columns and zero rows. |
|
DefaultGridModel(int rowCount,
int columnCount)
Constructs a DefaultGridModel with
rowCount and columnCount of
null object values. |
|
DefaultGridModel(Object[][] data,
Object[] columnNames)
Constructs a DefaultGridModel and initializes the table
by passing data and columnNames
to the setDataVector
method. |
|
DefaultGridModel(Object[] columnNames,
int rowCount)
Constructs a DefaultGridModel with as many
columns as there are elements in columnNames
and rowCount of null
object values. |
|
DefaultGridModel(Vector columnNames,
int rowCount)
Constructs a DefaultGridModel with as many columns
as there are elements in columnNames
and rowCount of null
object values. |
|
DefaultGridModel(Vector data,
Vector columnNames)
Constructs a DefaultGridModel and initializes the table
by passing data and columnNames
to the setDataVector method. |
Method Summary | |
---|---|
String |
getColumnName(int column)
Overriden to always return null. |
Object |
getValueAt(int row,
int column)
Returns an attribute value for the cell at row and column. |
boolean |
isCellEditable(int row,
int column)
Returns whether the cell can be edited by the user at run-time. |
void |
setValueAt(Object value,
int row,
int col)
Sets the object value for the cell at column and row. |
void |
sort(int column,
int sortOrder)
Sorts the model by comparing values in the given column |
Methods inherited from class javax.swing.table.DefaultTableModel |
---|
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getDataVector, getRowCount, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface diamondedge.swing.grid.GridModel |
---|
addColumn, insertRow, removeRow, setColumnCount, setRowCount |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getColumnClass, getColumnCount, getRowCount, removeTableModelListener |
Constructor Detail |
---|
public DefaultGridModel()
DefaultGridModel
which is a table of zero columns and zero rows.
public DefaultGridModel(int rowCount, int columnCount)
DefaultGridModel
with
rowCount
and columnCount
of
null
object values.
rowCount
- the number of rows the table holdscolumnCount
- the number of columns the table holdssetValueAt(java.lang.Object, int, int)
public DefaultGridModel(Vector columnNames, int rowCount)
DefaultGridModel
with as many columns
as there are elements in columnNames
and rowCount
of null
object values. Each column's name will be taken from
the columnNames
vector.
columnNames
- vector
containing the names
of the new columns; if this is
null
then the model has no columnsrowCount
- the number of rows the table holdspublic DefaultGridModel(Object[] columnNames, int rowCount)
DefaultGridModel
with as many
columns as there are elements in columnNames
and rowCount
of null
object values. Each column's name will be taken from
the columnNames
array.
columnNames
- array
containing the names
of the new columns; if this is
null
then the model has no columnsrowCount
- the number of rows the table holdspublic DefaultGridModel(Vector data, Vector columnNames)
DefaultGridModel
and initializes the table
by passing data
and columnNames
to the setDataVector
method.
data
- the data of the tablecolumnNames
- vector
containing the names
of the new columnspublic DefaultGridModel(Object[][] data, Object[] columnNames)
DefaultGridModel
and initializes the table
by passing data
and columnNames
to the setDataVector
method. The first index in the Object[][]
array is
the row index and the second is the column index.
data
- the data of the tablecolumnNames
- the names of the columnsMethod Detail |
---|
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class DefaultTableModel
public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class DefaultTableModel
row
- the row whose value is to be queriedcolumn
- the column whose value is to be queried
setValueAt(java.lang.Object, int, int)
public Object getValueAt(int row, int column)
getValueAt
in interface TableModel
getValueAt
in class DefaultTableModel
public void setValueAt(Object value, int row, int col)
setValueAt
in interface TableModel
setValueAt
in class DefaultTableModel
public void sort(int column, int sortOrder)
sort
in interface GridModel
column
- column to be sortedsortOrder
- One of: DsGrid.ASCENDING, DsGrid.DESCENDING, DsGrid.ASCENDING_CASE, DsGrid.DESCENDING_CASE
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |