org.grinvin.invariants.details
Class BarChartPanel
JPanel
org.grinvin.invariants.details.BarChartPanel
- ListDataListener, ListSelectionListener, MouseListener
public class BarChartPanel
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.
BarChartPanel(Number> dataModel) - Create a bar chart panel with given data model.
|
BarChartPanel(Number> dataModel, ListSelectionModel selectionModel) - Create a bar chart panel with given data model and selection model.
|
BarChartPanel(Number> dataModel, ListSelectionModel selectionModel, Number referenceValue) - Create a bar chart panel with given data model, selection model and
reference value.
|
BarChartPanel(Number> dataModel, Number referenceValue) - Create a bar chart panel with given data model and reference value.
|
BarChartPanel
public BarChartPanel(Number> 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.
BarChartPanel
public BarChartPanel(Number> 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.
BarChartPanel
public BarChartPanel(Number> dataModel,
ListSelectionModel selectionModel,
Number referenceValue)
Create a bar chart panel with given data model, selection model and
reference value.
BarChartPanel
public BarChartPanel(Number> dataModel,
Number 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 Number 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.