org.grinvin.gui.components

Class GraphCellListComponent

Implemented Interfaces:
HasGraphList, HasSelectableGraphList, HasSelectableValues, MouseListener

public class GraphCellListComponent
extends CellList
implements HasSelectableGraphList, MouseListener

Constructor Summary

GraphCellListComponent(GraphListModel model, ListSelectionModel selectionModel, int cellWidth, int cellHeight, int numberOfColumns)
Creates a new instance of GraphCellListComponent
GraphCellListComponent(GraphListModel model, int cellWidth, int cellHeight, int numberOfColumns)
Creates a new instance which creates its own selection model.

Method Summary

@Override
JToolTip createToolTip()
void
deleteSelectedElements()
Delete currently selected elements.
GraphList
getGraphList()
Return the graph list model which is used by this component.
void
mouseClicked(MouseEvent e)
void
mouseEntered(MouseEvent e)
void
mouseExited(MouseEvent e)
void
mousePressed(MouseEvent e)
void
mouseReleased(MouseEvent e)
void
setPaintWatermark(boolean paintWatermark)
Configure whether to paint the watermark or not.
protected @Override
void paintComponent(Graphics g)
Adds a watermark to the list.

Constructor Details

GraphCellListComponent

public GraphCellListComponent(GraphListModel model,
                              ListSelectionModel selectionModel,
                              int cellWidth,
                              int cellHeight,
                              int numberOfColumns)
Creates a new instance of GraphCellListComponent

GraphCellListComponent

public GraphCellListComponent(GraphListModel model,
                              int cellWidth,
                              int cellHeight,
                              int numberOfColumns)
Creates a new instance which creates its own selection model.

Method Details

JToolTip createToolTip

public @Override JToolTip createToolTip()

deleteSelectedElements

public void deleteSelectedElements()
Delete currently selected elements.

getGraphList

public GraphList getGraphList()
Return the graph list model which is used by this component.
Specified by:
getGraphList in interface HasGraphList

mouseClicked

public void mouseClicked(MouseEvent e)

mouseEntered

public void mouseEntered(MouseEvent e)

mouseExited

public void mouseExited(MouseEvent e)

mousePressed

public void mousePressed(MouseEvent e)

mouseReleased

public void mouseReleased(MouseEvent e)

setPaintWatermark

public void setPaintWatermark(boolean paintWatermark)
Configure whether to paint the watermark or not. If no watermark is painted, the background is still filled.

void paintComponent

protected @Override void paintComponent(Graphics g)
Adds a watermark to the list.