|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
com.jstatcom.table.JSCAbstractTableModel
public abstract class JSCAbstractTableModel
A table model to be used with JSCAbstractDataTable instances.
It implements a listener to the underlying symbol that translates symbol
events to table model events. Subclasses can reference the current symbol via
getCurrentSymbol. Implementations of the methods
getRowCount, getColumnCount and
getValueAt should take the transposed property
into account to provide a transposed view to the underlying data without
changin it.
| Constructor Summary | |
|---|---|
JSCAbstractTableModel(Symbol symbol)
Creates a table model for a symbol. |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.Integer,java.lang.Boolean> |
getColIndexEditableMap()
Gets the current mapping from column indices to editable properties. |
JSCData |
getJSCData()
Gets the JSCData object represented by this model. |
java.util.Map<java.lang.Integer,java.lang.Boolean> |
getRowIndexEditableMap()
Gets the current mapping from row indices to editable properties. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Overwrites default implementation to return isEditable for
all cells. |
boolean |
isEditable()
Gets whether all cells are editable. |
void |
setColEditableMap(java.util.Map<java.lang.Integer,java.lang.Boolean> colIndexEditableMap)
Sets the editable properties for each column. |
void |
setEditable(boolean isEditable)
Sets whether all cells are editable. |
void |
setRowEditableMap(java.util.Map<java.lang.Integer,java.lang.Boolean> rowIndexEditableMap)
Sets the editable properties for each row. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
getColumnCount, getRowCount, getValueAt |
| Constructor Detail |
|---|
public JSCAbstractTableModel(Symbol symbol)
if symbol != null that translates symbol events into table
model events.
Subclasses should provide a type check for the symbol.
symbol - the symbol to represent data for the model| Method Detail |
|---|
public final JSCData getJSCData()
JSCData object represented by this model. The
type of the data depends on the implementation.
Usage note:
The returned data is a reference to the underlying JSCData
object only until a new data object has been set. It should be used read
only. Changes that should not affect this model must be made on a copy of
the returned object.
JSCData represented by this modelpublic final boolean isEditable()
true.
true if editablepublic final void setEditable(boolean isEditable)
isEditable - true if editablepublic void setColEditableMap(java.util.Map<java.lang.Integer,java.lang.Boolean> colIndexEditableMap)
colIndexEditableMap - public void setRowEditableMap(java.util.Map<java.lang.Integer,java.lang.Boolean> rowIndexEditableMap)
rowIndexEditableMap - public java.util.Map<java.lang.Integer,java.lang.Boolean> getColIndexEditableMap()
public java.util.Map<java.lang.Integer,java.lang.Boolean> getRowIndexEditableMap()
public boolean isCellEditable(int rowIndex,
int columnIndex)
isEditable for
all cells. The row index map overwrites all other settings for all
row indices with non-null elements.
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelrowIndex - used if (getRowIndexEditableMap() != null),
row settings overwrite overall editable property, null
elements fall back to global editable propertycolumnIndex - used if (getColIndexEditableMap() != null),
column settings overwrite overall editable property, null
elements fall back to global editable property
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||