|
Diamond Control Suite 3.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
diamondedge.swing.grid.DelegateGridModel
public class DelegateGridModel
DelegateGridModel provides sorting and cell formatting for any TableModel. This is used internally to DsGrid.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Fields inherited from interface diamondedge.swing.grid.GridModel |
|---|
DELETE_CELL |
| Constructor Summary | |
|---|---|
DelegateGridModel()
|
|
DelegateGridModel(TableModel model)
|
|
| Method Summary | |
|---|---|
void |
addColumn(Object columnName)
Adds a column to the model. |
int |
convertRowIndexToModel(int row)
Maps the index of the row in the view to the index of the row in the embedded table model. |
Class |
getColumnClass(int column)
|
int |
getColumnCount()
|
String |
getColumnName(int column)
|
TableModel |
getModel()
|
int |
getRowCount()
|
Object |
getValueAt(int row,
int column)
Returns an attribute value for the cell at row and column. |
void |
insertRow(int row,
Vector rowData)
Inserts a row at row in the model. |
boolean |
isCellEditable(int row,
int column)
|
void |
removeRow(int row)
Removes the row at row from the model. |
void |
setColumnCount(int val)
Sets the number of columns in the model. |
void |
setModel(TableModel model)
|
void |
setRowCount(int rowCount)
Sets the number of rows in the model. |
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 |
void |
tableChanged(TableModelEvent e)
|
| 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 |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
addTableModelListener, removeTableModelListener |
| Constructor Detail |
|---|
public DelegateGridModel()
public DelegateGridModel(TableModel model)
| Method Detail |
|---|
public TableModel getModel()
public void setModel(TableModel model)
public int convertRowIndexToModel(int row)
public void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListenerpublic Class getColumnClass(int column)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic int getRowCount()
getRowCount in interface TableModel
public Object getValueAt(int row,
int column)
getValueAt in interface TableModel
public void setValueAt(Object value,
int row,
int col)
setValueAt in interface TableModelsetValueAt in class AbstractTableModel
public boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic void setRowCount(int rowCount)
GridModelrowCount and greater are discarded.
setRowCount in interface GridModel
public void insertRow(int row,
Vector rowData)
GridModelrow in the model. The new row
will contain null values unless rowData
is specified. Notification of the row being added will be generated.
insertRow in interface GridModelrow - the row index of the row to be insertedrowData - optional data of the row being addedpublic void removeRow(int row)
GridModelrow from the model. Notification
of the row being removed will be sent to all the listeners.
removeRow in interface GridModelrow - the row index of the row to be removedpublic void setColumnCount(int val)
GridModelnull cell values.
If the new size is less than the current size, all columns at index
columnCount and greater are discarded.
setColumnCount in interface GridModelval - the new number of columns in the modelGridModel.setColumnCount(int)public void addColumn(Object columnName)
GridModelcolumnName, which may be null. This method
will send a
tableChanged notification message to all the listeners.
This method is a cover for addColumn(Object, Vector) which
uses null as the data vector.
addColumn in interface GridModelcolumnName - the identifier of the column being added
public void sort(int column,
int sortOrder)
sort in interface GridModelcolumn - 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 | ||||||||