|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
csheets.ui.sheet.SpreadsheetTableModel
public class SpreadsheetTableModel
An table model that provides a table with data from a spreadsheet.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
SpreadsheetTableModel(Spreadsheet spreadsheet,
UIController uiController)
Creates a spreadsheet table model. |
|
| Method Summary | |
|---|---|
Class<?> |
getColumnClass(int column)
Returns Cell.class for all columns. |
int |
getColumnCount()
|
int |
getRowCount()
|
Spreadsheet |
getSpreadsheet()
Returns the spreadsheet that provides the data. |
Object |
getValueAt(int row,
int column)
Returns the cell at the given row and column in the spreadsheet. |
boolean |
isCellEditable(int row,
int column)
Overridden to allow editing of the table. |
void |
setValueAt(Object value,
int row,
int column)
Implemented as a no-op, since the table's CellEditor
instance updates the content of cells. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpreadsheetTableModel(Spreadsheet spreadsheet,
UIController uiController)
spreadsheet - the spreadsheet that provides the datauiController - the user interface controller| Method Detail |
|---|
public Class<?> getColumnClass(int column)
Cell.class for all columns.
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcolumn - the column whose data type is requested
Cell.classpublic int getRowCount()
public int getColumnCount()
public Spreadsheet getSpreadsheet()
public Object getValueAt(int row,
int column)
row - the row index of the cell being requestedcolumn - the column index of the cell being requested
Spreadsheet.getCell(Address)
public void setValueAt(Object value,
int row,
int column)
CellEditor
instance updates the content of cells.
setValueAt in interface TableModelsetValueAt in class AbstractTableModelvalue - the value to setrow - the row index of the cell to changecolumn - the column index of the cell to changeCell.setContent(String)
public boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrow - the row whose value is to be queriedcolumn - the column whose value is to be queried
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||