Class SwingTableSelectionHandler
- java.lang.Object
-
- net.sf.jguiraffe.gui.platform.swing.builder.components.table.SwingTableSelectionHandler
-
- All Implemented Interfaces:
net.sf.jguiraffe.gui.builder.components.tags.table.TableSelectionHandler
public class SwingTableSelectionHandler extends Object implements net.sf.jguiraffe.gui.builder.components.tags.table.TableSelectionHandler
A Swing-specific default implementation of the
TableSelectionHandler
interface.This implementation expects that the component passed in to the
prepareComponent()
method is ajavax.swing.JComponent
. Depending on the selected or focused flags the color of this component will be set, and eventually a border will be drawn.- Version:
- $Id: SwingTableSelectionHandler.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description SwingTableSelectionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
prepareComponent(Object table, net.sf.jguiraffe.gui.builder.components.tags.table.TableTag tableTag, Object component, boolean selected, boolean hasFocus, int row, int col)
Prepares the renderer or editor component.
-
-
-
Method Detail
-
prepareComponent
public void prepareComponent(Object table, net.sf.jguiraffe.gui.builder.components.tags.table.TableTag tableTag, Object component, boolean selected, boolean hasFocus, int row, int col)
Prepares the renderer or editor component. This implementation will set the correct colors and a border for focused cells.- Specified by:
prepareComponent
in interfacenet.sf.jguiraffe.gui.builder.components.tags.table.TableSelectionHandler
- Parameters:
table
- the table componenttableTag
- the table tagcomponent
- the component to be preparedselected
- a flag whether this cell is selectedhasFocus
- a flag whether this cell has the focusrow
- the current row indexcol
- the current column index
-
-