Interface TableModel
-
- All Known Subinterfaces:
MutableTableModel
- All Known Implementing Classes:
AbstractTableModel,ContextAreaTableModel,DefaultTableModel,SectionTableModel,TaskTableModel
public interface TableModelATableModelis a view model to be used with view components which represent a list of items on table form.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTableModelListener(TableModelListener listener)Registerslistenerwith this table model if it is not already registered.voidfireEvent(java.lang.String eventName, java.lang.Object value)This method provides the means necessary to fire generic events which are received by any registeredTableModelListener.UIEditorgetCellEditor(int columnIndex, int rowIndex)Returns the editor associated with the cell at position (colIndex,rowIndex).CellRenderergetCellRenderer(int columnIndex)ColumnModelgetColumnComponentModel()Returns this table model's column model.ListComponentModelgetListComponentModel()Returns this table model's list model.CellRenderergetNewInlineItemRenderer(int columnIndex)Gets the new inline item renderer.java.lang.ObjectgetValueAt(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 Detail
-
getListComponentModel
ListComponentModel getListComponentModel()
Returns this table model's list model.- Returns:
- the list model of this table model
- See Also:
ListComponentModel
-
getColumnComponentModel
ColumnModel getColumnComponentModel()
Returns this table model's column model.- Returns:
- the column model of this table model
- See Also:
ColumnModel
-
getValueAt
java.lang.Object getValueAt(int colIndex, int rowIndex)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
UIEditor getCellEditor(int columnIndex, int rowIndex)
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:
UIEditor
-
getCellRenderer
CellRenderer getCellRenderer(int columnIndex)
-
getNewInlineItemRenderer
CellRenderer getNewInlineItemRenderer(int columnIndex)
Gets the new inline item renderer.- Parameters:
columnIndex- the column index- Returns:
- the new inline item render
-
addTableModelListener
void addTableModelListener(TableModelListener listener)
Registerslistenerwith this table model if it is not already registered.- Parameters:
listener- theTableModelListenerto register
-
removeTableModelListener
void removeTableModelListener(TableModelListener listener)
Unregisterslistenerwith this table model if it is registered.- Parameters:
listener- theTableModelListenerto unregister
-
fireEvent
void fireEvent(java.lang.String eventName, java.lang.Object value)This method provides the means necessary to fire generic events which are received by any registeredTableModelListener.- Parameters:
eventName- name of eventvalue- attached value
-
-