org.grinvin.invariants.details
Class GradientBarChartPanel
JPanel
org.grinvin.invariants.details.GradientBarChartPanel
- ListDataListener, ListSelectionListener, MouseListener
public class GradientBarChartPanel
extends JPanel
implements ListSelectionListener, ListDataListener, MouseListener
Panel which displays a list of real numbers in a bar chart.
Data for the bar chart is taken from a list model of real numbers.
Selection information comes from a list selection model.
GradientBarChartPanel(TypedListModel dataModel) - Create a bar chart panel with given data model.
|
GradientBarChartPanel(TypedListModel dataModel, ListSelectionModel selectionModel) - Create a bar chart panel with given data model and selection model.
|
GradientBarChartPanel(TypedListModel dataModel, ListSelectionModel selectionModel, double referenceValue) - Create a bar chart panel with given data model, selection model and
reference value.
|
GradientBarChartPanel(TypedListModel dataModel, double referenceValue) - Create a bar chart panel with given data model and reference value.
|
GradientBarChartPanel
public GradientBarChartPanel(TypedListModel dataModel)
Create a bar chart panel with given data model.
Creates a new selection model and uses the currently largest absolute
value of the data model as reference value.
GradientBarChartPanel
public GradientBarChartPanel(TypedListModel dataModel,
ListSelectionModel selectionModel)
Create a bar chart panel with given data model and selection model.
Uses the currently largest absolute value of the data model as reference
value.
GradientBarChartPanel
public GradientBarChartPanel(TypedListModel dataModel,
ListSelectionModel selectionModel,
double referenceValue)
Create a bar chart panel with given data model, selection model and
reference value.
GradientBarChartPanel
public GradientBarChartPanel(TypedListModel dataModel,
double referenceValue)
Create a bar chart panel with given data model and reference value. Creates
a new selection model.
contentsChanged
public void contentsChanged(ListDataEvent e)
getReferenceValue
public double getReferenceValue()
Return the reference value which is used to determine
the height of the bars. This value corresponds to a
bar of full height.
getSelectionModel
public ListSelectionModel getSelectionModel()
Return selection model.
getToolTipText
public String getToolTipText(MouseEvent event)
intervalAdded
public void intervalAdded(ListDataEvent e)
intervalRemoved
public void intervalRemoved(ListDataEvent e)
Repaint when data model changes.
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)
paintComponent
protected void paintComponent(Graphics g)
setSelectionModel
public void setSelectionModel(ListSelectionModel selectionModel)
Change the reference value which is used to determine the
height of the bars.
valueChanged
public void valueChanged(ListSelectionEvent e)
Repaint when selection changes.