Class ClassesPanel.ClassTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
jsimwiz.panels.ClassesPanel.ClassTableModel
- All Implemented Interfaces:
Serializable, TableModel
- Direct Known Subclasses:
JModelClassesPanel.JModelClassTableModel
- Enclosing class:
ClassesPanel
- See Also:
-
Field Summary
FieldsFields inherited from class AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> 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
-
ClassTableModel
protected ClassTableModel()
-
-
Method Details
-
getRowCount
public int getRowCount()returns number of rows to be displayed in the table. In this case, global number of classes -
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
-