Interface TableSelectionHandler
-
public interface TableSelectionHandler
Definition of an interface that allows changing the way a selected or focused cell in the table is displayed.
If custom editors or renderers are installed for columns of a table the components used for this purpose must reflect the selected and/or focused state of the represented cell. The platform specific table implementations will provide defaults for doing this. If an application needs a very specific way of marking cells as selected or focused, it can create a specialized implementation of this interface.
- Version:
- $Id: TableSelectionHandler.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
prepareComponent(Object table, TableTag tableTag, Object component, boolean selected, boolean hasFocus, int row, int col)
Prepares the renderer or editor component before it is displayed.
-
-
-
Method Detail
-
prepareComponent
void prepareComponent(Object table, TableTag tableTag, Object component, boolean selected, boolean hasFocus, int row, int col)
Prepares the renderer or editor component before it is displayed. This method is called whenever a custom renderer or editor component is requested. An implementation can initialize this component in an arbitrary way based on the passed in parameters.- Parameters:
table
- the table componenttableTag
- the tag representing the affected tablecomponent
- the component that is used as custom renderer or editorselected
- a flag whether the cell is selectedhasFocus
- a flag whether the cell has the focusrow
- the index of the affected rowcol
- the index of the affected column
-
-