|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.knime.base.node.io.tablecreator.table.SpreadsheetTableModel
class SpreadsheetTableModel
The table model of a spreadsheet.
| Nested Class Summary | |
|---|---|
(package private) static class |
SpreadsheetTableModel.IntPair
Class to encapsulate the row and column index of a cell in a table. |
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
SpreadsheetTableModel()
Create new instance. |
|
| Method Summary | |
|---|---|
void |
addColProperties(Map<Integer,ColProperty> map)
Adds {link ColProperty objects to this model. |
void |
addValues(Map<SpreadsheetTableModel.IntPair,Cell> tableValues)
Add values to the table. |
void |
deleteColumns(int[] cols)
Deletes the columns. |
void |
deleteRows(int[] rows)
Delete rows. |
Class<?> |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
(package private) int[] |
getColumnIndices()
see getValues(); |
String |
getColumnName(int columnIndex)
|
(package private) SortedMap<Integer,ColProperty> |
getColumnProperties()
Returns a mapping of column index to the {ColProperty} of the column. |
int |
getMaxColumn()
Returns the maximal column index of the filled area |
int |
getMaxRow()
Returns the maximal row index of the filled area |
int |
getRowCount()
|
(package private) int[] |
getRowIndices()
see getValues(); |
(package private) Map<SpreadsheetTableModel.IntPair,Cell> |
getTableValues()
Getter for the table values. |
Object |
getValueAt(int rowIndex,
int columnIndex)
|
(package private) String[] |
getValues()
Use in combination with getRowIndices and getColumnIndices. |
void |
insertColumns(int[] cols)
Add columns with default properties. |
void |
insertRows(int[] rows)
Insert empty rows. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
void |
setColProperty(int colIdx,
ColProperty colProperty)
|
void |
setData(Map<Integer,ColProperty> columnProperties,
int[] rowIndices,
int[] columnIndices,
String[] values)
Replace the data of the table model by the given settings. |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
|
| 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 SpreadsheetTableModel()
| Method Detail |
|---|
public void setData(Map<Integer,ColProperty> columnProperties,
int[] rowIndices,
int[] columnIndices,
String[] values)
columnProperties - the properties of columnrowIndices - the row indicescolumnIndices - the column indicesvalues - the values at the given row and column indicesSortedMap<Integer,ColProperty> getColumnProperties()
int[] getRowIndices()
int[] getColumnIndices()
String[] getValues()
public Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic int getColumnCount()
public void setColProperty(int colIdx,
ColProperty colProperty)
colIdx - colProperty - public void addColProperties(Map<Integer,ColProperty> map)
ColProperty objects to this model.
map - {link ColProperty objectspublic String getColumnName(int columnIndex)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic int getRowCount()
public Object getValueAt(int rowIndex,
int columnIndex)
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModel
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic void addValues(Map<SpreadsheetTableModel.IntPair,Cell> tableValues)
tableValues - the values and their positionpublic void deleteColumns(int[] cols)
cols - the indices of the columns to delete.public void insertColumns(int[] cols)
cols - the indices to insert columnspublic void deleteRows(int[] rows)
rows - the indices of the rows to delete.public void insertRows(int[] rows)
rows - the indices to insert empty rows.public int getMaxRow()
public int getMaxColumn()
Map<SpreadsheetTableModel.IntPair,Cell> getTableValues()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||