Interface TableModel
- All Known Subinterfaces:
MutableTableModel
- All Known Implementing Classes:
AbstractTableModel,ContextAreaTableModel,DefaultTableModel,SectionTableModel,TaskTableModel
public interface TableModel
A
TableModel is a view model to be used with view components which represent a list of items on table
form.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTableModelListener(TableModelListener listener) Registerslistenerwith this table model if it is not already registered.voidThis method provides the means necessary to fire generic events which are received by any registeredTableModelListener.getCellEditor(int columnIndex, int rowIndex) Returns the editor associated with the cell at position (colIndex,rowIndex).getCellRenderer(int columnIndex) Returns this table model's column model.Returns this table model's list model.getNewInlineItemRenderer(int columnIndex) Gets the new inline item renderer.getValueAt(int colIndex, int rowIndex) Returns the value of the cell at position (colIndex,rowIndex).booleanisCellEditable(int colIndex, int rowIndex) Returns whether the cell at position (colIndex,rowIndex) can be edited or not.booleanisCellSelectable(int colIndex, int rowIndex) Returns whether the cell at position (colIndex,rowIndex) can be selected or not.booleanisCellSelected(int colIndex, int rowIndex) Returns whether the cell at position (colIndex,rowIndex) is selected or not.voidremoveTableModelListener(TableModelListener listener) Unregisterslistenerwith this table model if it is registered.
-
Method Details
-
getListComponentModel
ListComponentModel getListComponentModel()Returns this table model's list model.- Returns:
- the list model of this table model
- See Also:
-
getColumnComponentModel
ColumnModel getColumnComponentModel()Returns this table model's column model.- Returns:
- the column model of this table model
- See Also:
-
getValueAt
Returns the value of the cell at position (colIndex,rowIndex).- Parameters:
colIndex- zero based column position indexrowIndex- zero based row position index- Returns:
- the cell's value
-
isCellSelected
boolean isCellSelected(int colIndex, int rowIndex) Returns whether the cell at position (colIndex,rowIndex) is selected or not.- Parameters:
colIndex- zero based column position indexrowIndex- zero based row position index- Returns:
trueif a cell exists at the specified position and is selected,falseotherwise
-
isCellEditable
boolean isCellEditable(int colIndex, int rowIndex) Returns whether the cell at position (colIndex,rowIndex) can be edited or not.- Parameters:
colIndex- zero based column position indexrowIndex- zero based row position index- Returns:
trueif a cell exists at the specified position and is editable,falseotherwise
-
isCellSelectable
boolean isCellSelectable(int colIndex, int rowIndex) Returns whether the cell at position (colIndex,rowIndex) can be selected or not.- Parameters:
colIndex- zero based column position indexrowIndex- zero based row position index- Returns:
trueif a cell exists at the specified position and is selectable,falseotherwise
-
getCellEditor
Returns the editor associated with the cell at position (colIndex,rowIndex).- Parameters:
columnIndex- zero based column position indexrowIndex- zero based row position index- Returns:
- the cell's editor
- See Also:
-
getCellRenderer
-
getNewInlineItemRenderer
Gets the new inline item renderer.- Parameters:
columnIndex- the column index- Returns:
- the new inline item render
-
addTableModelListener
Registerslistenerwith this table model if it is not already registered.- Parameters:
listener- theTableModelListenerto register
-
removeTableModelListener
Unregisterslistenerwith this table model if it is registered.- Parameters:
listener- theTableModelListenerto unregister
-
fireEvent
This method provides the means necessary to fire generic events which are received by any registeredTableModelListener.- Parameters:
eventName- name of eventvalue- attached value
-