Class BalkingStrategyEditor.LDStrategyTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
common.editors.BalkingStrategyEditor.LDStrategyTableModel
- All Implemented Interfaces:
Serializable, TableModel
- Enclosing class:
BalkingStrategyEditor
Table data model to implement customized data editing
- Author:
- Bertoli Marco Date: 13-ott-2005 Time: 11.49.53
- See Also:
-
Field Summary
FieldsFields inherited from class AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringformatNumber(double d) Helper method used to formats given number into string according to default rules.Class<?> getColumnClass(int columnIndex) Returns class describing data contained in specific column.intReturns total number of columnsgetColumnName(int columnIndex) Returns name for each column (given its index) to be displayed inside table headerintreturns number of rows to be displayed in the table.getValueAt(int rowIndex, int columnIndex) retrieves value to be displayed in table cell from the underlying model data structure implementation.booleanisCellEditable(int rowIndex, int columnIndex) Tells whether data contained in a specific cell(given row and column index) is editable or not.voidsetValueAt(Object aValue, int rowIndex, int columnIndex) Puts edited values to the underlying data structure for model implementationMethods inherited from class AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
columnNames
-
colClasses
-
-
Constructor Details
-
LDStrategyTableModel
public LDStrategyTableModel()Creates a new instance of class table model
-
-
Method Details
-
getRowCount
public int getRowCount()returns number of rows to be displayed in the table. In this case, global number of ranges -
getColumnCount
public int getColumnCount()Returns total number of columns -
getColumnName
Returns name for each column (given its index) to be displayed inside table header- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
Returns class describing data contained in specific column.- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) Tells whether data contained in a specific cell(given row and column index) is editable or not. In this case distribution column is not editable, as editing functionality is implemented via edit button- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
retrieves value to be displayed in table cell from the underlying model data structure implementation. -
setValueAt
Puts edited values to the underlying data structure for model implementation- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
formatNumber
Helper method used to formats given number into string according to default rules.- Parameters:
d- double to be converted- Returns:
- string representation of given number
-