be.ugent.caagt.swirl.lists
Interface CellListCellRenderer

All Known Implementing Classes:
DefaultCellListCellRenderer

public interface CellListCellRenderer

Is responsible for painting a single element of a CellList. This class plays the same role as a ListCellRenderer does for a JList but with a different interface and contract.


Method Summary
 java.lang.String getToolTipText(CellList list, java.lang.Object value, int index)
          Return the tool tip text for the given element.
 void paintElement(java.awt.Graphics2D g2, CellList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
          Paint the given element at the 0,0-position on the given graphics context.
 

Method Detail

getToolTipText

java.lang.String getToolTipText(CellList list,
                                java.lang.Object value,
                                int index)
Return the tool tip text for the given element.

Parameters:
list - The cell list to which the element belongs
value - The corresponding value returned from the model
index - The index of the cell in the list
Returns:
the tool tip text for the cell, or null if no tool tip needs to be dipslayed

paintElement

void paintElement(java.awt.Graphics2D g2,
                  CellList list,
                  java.lang.Object value,
                  int index,
                  boolean isSelected,
                  boolean cellHasFocus)
Paint the given element at the 0,0-position on the given graphics context.

Parameters:
g2 - Graphics context onto which the cell must be painted
list - The cell list to which the element belongs
value - The corresponding value returned from the model
index - The index of the cell in the list
isSelected - True if the specified cell was selected.
cellHasFocus - True if the specified cell has the focus.