org.grinvin.graphbrowser

Class GraphTableComponent

Implemented Interfaces:
HasGraphList, HasSelectableGraphList, MouseListener

public class GraphTableComponent
extends EnhancedTable
implements HasSelectableGraphList, 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(GraphInvariantListModel model, ListSelectionModel newSelectionModel)
Creates a new instance of GraphTableComponent

Method Summary

void
deleteSelectedRows()
Delete currently selected rows.
GraphList
getGraphList()
Return the graph list model which is used by this component.
boolean
getScrollableTracksViewportHeight()
Object
getSelectedValue()
Returns the first selected value, or null when the selection is empty.
Object[]
getSelectedValues()
Returns an array of graph list elements for the selected rows of the table.
void
mouseClicked(MouseEvent e)
void
mouseEntered(MouseEvent e)
void
mouseExited(MouseEvent e)
void
mousePressed(MouseEvent e)
void
mouseReleased(MouseEvent e)
void
rescaleColumns()
void
tableChanged(TableModelEvent e)

Constructor Details

GraphTableComponent

public GraphTableComponent(GraphInvariantListModel model,
                           ListSelectionModel newSelectionModel)
Creates a new instance of GraphTableComponent

Method Details

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

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()

getSelectedValue

public Object getSelectedValue()
Returns the first selected value, or null when the selection is empty.
Specified by:
getSelectedValue in interface HasSelectableGraphList

getSelectedValues

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

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()

tableChanged

public void tableChanged(TableModelEvent e)