org.knowm.xchart.internal.chartpart
Class ChartButton
- java.lang.Object
-
- java.awt.event.MouseAdapter
-
- org.knowm.xchart.internal.chartpart.ChartButton
-
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, ChartPart
public class ChartButton extends java.awt.event.MouseAdapter implements ChartPart
A button that can be used on the chart for whatever function. For example the ChartZoom class uses this to reset the zoom function. When it is clicked it fires its actionPerformed action and whoever is listening to it can react to it.
-
-
Field Summary
-
Fields inherited from interface org.knowm.xchart.internal.chartpart.ChartPart
SOLID_STROKE
-
-
Constructor Summary
Constructors Constructor and Description ChartButton(XYChart xyChart, XChartPanel<XYChart> xChartPanel, java.lang.String text)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddActionListener(java.awt.event.ActionListener l)java.awt.geom.Rectangle2DgetBounds()voidmouseClicked(java.awt.event.MouseEvent e)voidpaint(java.awt.Graphics2D g)voidremoveActionListener(java.awt.event.ActionListener l)
-
-
-
Constructor Detail
-
ChartButton
public ChartButton(XYChart xyChart, XChartPanel<XYChart> xChartPanel, java.lang.String text)
Constructor- Parameters:
xyChart-xChartPanel-text-
-
-
Method Detail
-
addActionListener
public void addActionListener(java.awt.event.ActionListener l)
-
removeActionListener
public void removeActionListener(java.awt.event.ActionListener l)
-
getBounds
public java.awt.geom.Rectangle2D getBounds()
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener- Overrides:
mouseClickedin classjava.awt.event.MouseAdapter
-
-
DataMelt 3.0 © DataMelt by jWork.ORG