Class ChartButton

java.lang.Object
java.awt.event.MouseAdapter
org.knowm.xchart.internal.chartpart.ChartButton
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener, ChartPart

public class ChartButton extends 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 Details

    • chart

      private final Chart chart
    • styler

      private final Styler styler
    • bounds

      private Rectangle bounds
    • text

      protected String text
    • visible

      boolean visible
    • action

      private ActionEvent action
    • listenerList

      private final EventListenerList listenerList
    • xOffset

      protected double xOffset
    • yOffset

      protected double yOffset
    • buttonRect

      private Shape buttonRect
  • Constructor Details

    • ChartButton

      public ChartButton(XYChart xyChart, XChartPanel<XYChart> xChartPanel, String text)
      Constructor
      Parameters:
      xyChart -
      xChartPanel -
      text -
  • Method Details