Class DefaultTableModel
java.lang.Object
de.hybris.platform.cockpit.model.listview.impl.AbstractTableModel
de.hybris.platform.cockpit.model.listview.impl.DefaultTableModel
- All Implemented Interfaces:
MutableTableModel,TableModel
- Direct Known Subclasses:
ContextAreaTableModel,SectionTableModel,TaskTableModel
The Class DefaultTableModel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MutableColumnModelThe column component model.protected MutableListModelThe list component model.protected UUIDunique id related with this DefaultTableModel, it is used to generate key which we use to put and get values from cache:TABLE_VALUE_REQUEST_CACHE (i.e.Fields inherited from class de.hybris.platform.cockpit.model.listview.impl.AbstractTableModel
listeners -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTableModel(MutableListModel listComponentModel, MutableColumnModel columnComponentModel) Instantiates a new default table model. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckUserEditPermission(int colIndex, int rowIndex) Check user edit permission.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.voidsetColumnComponentModel(MutableColumnModel columnModel) Sets the column component model.voidsetListComponentModel(MutableListModel listModel) Sets the list component model.voidsetSelectedCell(int colIndex, int rowIndex) Sets the selected cell.voidsetSelectedCells(List<Integer> colIndexes, List<Integer> rowIndexes) Sets the selected cells.voidsetValueAt(int colIndex, int rowIndex, Object data) Sets the value at.voidUpdate dynamic columns.Methods inherited from class de.hybris.platform.cockpit.model.listview.impl.AbstractTableModel
addTableModelListener, fireCellChanged, fireEvent, fireSelectionChanged, getUIAccessRightService, removeTableModelListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.cockpit.model.listview.TableModel
addTableModelListener, fireEvent, removeTableModelListener
-
Field Details
-
listComponentModel
The list component model. -
columnComponentModel
The column component model. -
uid
unique id related with this DefaultTableModel, it is used to generate key which we use to put and get values from cache:TABLE_VALUE_REQUEST_CACHE (i.e. when user has 2 tables on a screen we need to distinguish them)
-
-
Constructor Details
-
DefaultTableModel
public DefaultTableModel(MutableListModel listComponentModel, MutableColumnModel columnComponentModel) Instantiates a new default table model.- Parameters:
listComponentModel- the list component modelcolumnComponentModel- the column component model
-
-
Method Details
-
setValueAt
Description copied from interface:MutableTableModelSets the value at.- Specified by:
setValueAtin interfaceMutableTableModel- Parameters:
colIndex- the col indexrowIndex- the row indexdata- the data- Throws:
ValueHandlerException- the value handler exception
-
setSelectedCell
public void setSelectedCell(int colIndex, int rowIndex) Description copied from interface:MutableTableModelSets the selected cell.- Specified by:
setSelectedCellin interfaceMutableTableModel- Parameters:
colIndex- the col indexrowIndex- the row index
-
setSelectedCells
Description copied from interface:MutableTableModelSets the selected cells.- Specified by:
setSelectedCellsin interfaceMutableTableModel- Parameters:
colIndexes- the col indexesrowIndexes- the row indexes
-
getCellEditor
Description copied from interface:TableModelReturns the editor associated with the cell at position (colIndex,rowIndex).- Specified by:
getCellEditorin interfaceTableModel- Parameters:
columnIndex- zero based column position indexrowIndex- zero based row position index- Returns:
- the cell's editor
- See Also:
-
getColumnComponentModel
Description copied from interface:TableModelReturns this table model's column model.- Specified by:
getColumnComponentModelin interfaceMutableTableModel- Specified by:
getColumnComponentModelin interfaceTableModel- Returns:
- the column model of this table model
- See Also:
-
getListComponentModel
Description copied from interface:TableModelReturns this table model's list model.- Specified by:
getListComponentModelin interfaceMutableTableModel- Specified by:
getListComponentModelin interfaceTableModel- Returns:
- the list model of this table model
- See Also:
-
getValueAt
Description copied from interface:TableModelReturns the value of the cell at position (colIndex,rowIndex).- Specified by:
getValueAtin interfaceTableModel- Parameters:
colIndex- zero based column position indexrowIndex- zero based row position index- Returns:
- the cell's value
-
checkUserEditPermission
protected boolean checkUserEditPermission(int colIndex, int rowIndex) Check user edit permission.- Parameters:
colIndex- the col indexrowIndex- the row index- Returns:
- true, if successful
-
isCellEditable
public boolean isCellEditable(int colIndex, int rowIndex) Description copied from interface:TableModelReturns whether the cell at position (colIndex,rowIndex) can be edited or not.- Specified by:
isCellEditablein interfaceTableModel- 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
public boolean isCellSelectable(int colIndex, int rowIndex) Description copied from interface:TableModelReturns whether the cell at position (colIndex,rowIndex) can be selected or not.- Specified by:
isCellSelectablein interfaceTableModel- 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
-
isCellSelected
public boolean isCellSelected(int colIndex, int rowIndex) Description copied from interface:TableModelReturns whether the cell at position (colIndex,rowIndex) is selected or not.- Specified by:
isCellSelectedin interfaceTableModel- 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
-
getCellRenderer
- Specified by:
getCellRendererin interfaceTableModel
-
getNewInlineItemRenderer
Description copied from interface:TableModelGets the new inline item renderer.- Specified by:
getNewInlineItemRendererin interfaceTableModel- Parameters:
columnIndex- the column index- Returns:
- the new inline item render
-
setListComponentModel
Description copied from interface:MutableTableModelSets the list component model.- Specified by:
setListComponentModelin interfaceMutableTableModel- Parameters:
listModel- the new list component model
-
setColumnComponentModel
Description copied from interface:MutableTableModelSets the column component model.- Specified by:
setColumnComponentModelin interfaceMutableTableModel- Parameters:
columnModel- the new column component model
-
updateDynamicColumns
public void updateDynamicColumns()Description copied from interface:MutableTableModelUpdate dynamic columns.- Specified by:
updateDynamicColumnsin interfaceMutableTableModel
-