com.eliad.model
Interface GridCellRenderer

All Known Implementing Classes:
DefaultGridCellRenderer, DefaultStyleModel.BooleanRenderer

public interface GridCellRenderer

This interface defines the method required from any object that would like to be a renderer for cells or spans in a Component that can provide a GridContext such as the JSmartGrid. The StyleModel is an interface that provides GridCellRenderer. A default implementation of the StyleModel is the DefaultStyleModel.

Version:
1.0
Author:
Stephan Szymkowicz
See Also:
StyleModel, GridContext, DefaultStyleModel

Method Summary
 java.awt.Component getComponent(java.lang.Object value, boolean hasFocus, boolean isSelected, boolean isEditable, int row, int column, GridContext gridContext)
          Returns the Component used for drawing the cell or span of the Value according to the GridContext.
 

Method Detail

getComponent

public java.awt.Component getComponent(java.lang.Object value,
                                       boolean hasFocus,
                                       boolean isSelected,
                                       boolean isEditable,
                                       int row,
                                       int column,
                                       GridContext gridContext)
Returns the Component used for drawing the cell or span of the Value according to the GridContext. This component will edit the cell defined by the row and column in the parameters. This method is used to appropriately configure the renderer before drawing.
Parameters:
value - the value of the cell defines as (row,column) to be rendered.
isSelected - if true the current cell or span defines in the GridContext is selected.
hasFocus - if true the current cell or span defines in the GridContext got the focus.
row - the row of the cell where the value attached.
column - the column of the cell where the value attached.
gridContext - the context of the cell or span to be rendered.
See Also:
GridContext, JSmartGrid