org.grinvin.gui.components

Class GraphTableComponent

Implemented Interfaces:
HasGraphList, HasRequestedCell, HasSelectableGraphList, HasSelectableValues, MouseListener

public class GraphTableComponent
extends EnhancedTable
implements HasSelectableGraphList, HasRequestedCell, MouseListener

Table component which displays a list of graphs as rows, invariants as columns and the corresponding values in the table cells.

A table of this type is drag-and-drop enabled:

Constructor Summary

GraphTableComponent(GraphListModel graphListModel, InvariantListModel invariantListModel, ListSelectionModel newSelectionModel)
Creates a new instance of GraphTableComponent

Method Summary

@Override
boolean getScrollableTracksViewportHeight()
void
deleteSelectedRows()
Delete currently selected rows.
GraphList
getGraphList()
Return the graph list model which is used by this component.
Object
getSelectedValue()
Object[]
getSelectedValues()
Returns an array of graph list elements for the selected rows of the table.
boolean
isRequestedCell(int row, int column)
void
mouseClicked(MouseEvent e)
void
mouseEntered(MouseEvent e)
void
mouseExited(MouseEvent e)
void
mousePressed(MouseEvent e)
void
mouseReleased(MouseEvent e)
void
rescaleColumns()
void
setRequestedCell(int row, int column)
@Override
void tableChanged(TableModelEvent e)

Constructor Details

GraphTableComponent

public GraphTableComponent(GraphListModel graphListModel,
                           InvariantListModel invariantListModel,
                           ListSelectionModel newSelectionModel)
Creates a new instance of GraphTableComponent

Method Details

boolean getScrollableTracksViewportHeight

public @Override boolean getScrollableTracksViewportHeight()

deleteSelectedRows

public void deleteSelectedRows()
Delete currently selected rows.

getGraphList

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

getSelectedValue

public Object getSelectedValue()

getSelectedValues

public Object[] getSelectedValues()
Returns an array of graph list elements for the selected rows of the table.
Specified by:
getSelectedValues in interface HasSelectableValues

isRequestedCell

public boolean isRequestedCell(int row,
                               int column)
Specified by:
isRequestedCell in interface HasRequestedCell

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)

rescaleColumns

public void rescaleColumns()

setRequestedCell

public void setRequestedCell(int row,
                             int column)
Specified by:
setRequestedCell in interface HasRequestedCell

void tableChanged

public @Override void tableChanged(TableModelEvent e)