org.grinvin.list

Class GraphListCellRenderer


public class GraphListCellRenderer
extends DefaultCellListCellRenderer

Cell renderer for cell lists with elements of type GraphListElement. Keeps a cache of the icons which it displays.

Constructor Summary

GraphListCellRenderer()
Create a graph list cell renderer that delegates to the given graph renderer.

Method Summary

@Override
String getToolTipText(CellList list, Object value, int index)
protected GraphIcon
getIcon(GraphBundleView bundle, int cellWidth, int cellHeight)
Retrieve the graph icon for the given graph bundle and size
protected @Override
void prepare(CellList list, Object value, int index, boolean isSelected, boolean cellHasFocus)

Constructor Details

GraphListCellRenderer

public GraphListCellRenderer()
Create a graph list cell renderer that delegates to the given graph renderer.

Method Details

String getToolTipText

public @Override String getToolTipText(CellList list,
                                       Object value,
                                       int index)

getIcon

protected GraphIcon getIcon(GraphBundleView bundle,
                            int cellWidth,
                            int cellHeight)
Retrieve the graph icon for the given graph bundle and size

void prepare

protected @Override void prepare(CellList list,
                                 Object value,
                                 int index,
                                 boolean isSelected,
                                 boolean cellHasFocus)