Package de.pco.example
Class MetadataTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
de.pco.example.MetadataTableModel
- All Implemented Interfaces:
Serializable,TableModel
public class MetadataTableModel extends AbstractTableModel
Represents the data layer of the table
- Author:
- PCO
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors Constructor Description MetadataTableModel() -
Method Summary
Modifier and Type Method Description intgetColumnCount()Returns the count of the columnsStringgetColumnName(int column)Returns the name of the colorintgetRowCount()Returns the count of the table rowObjectgetValueAt(int rowIndex, int columnIndex)Returns the cell value at particular coordinatesbooleanisCellEditable(int rowIndex, int columnIndex)Returns if the cell is editablevoidsetLoaded(boolean loaded)Sets that the table was loadedvoidsetMetadataBean(BildStruct metadata)Sets the backing MetadataBean objectvoidsetValueAt(Object aValue, int rowIndex, int columnIndex)Sets the value in the given cellMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
MetadataTableModel
public MetadataTableModel()
-
-
Method Details
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)Returns if the cell is editable- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
Returns the cell value at particular coordinates -
getRowCount
public int getRowCount()Returns the count of the table row -
getColumnCount
public int getColumnCount()Returns the count of the columns -
setMetadataBean
Sets the backing MetadataBean object- Parameters:
metadata-
-
setLoaded
public void setLoaded(boolean loaded)Sets that the table was loaded- Parameters:
loaded-
-
setValueAt
Sets the value in the given cell- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
getColumnName
Returns the name of the color- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-