Class SimpleChartDialog

All Implemented Interfaces:
MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, SwingConstants, WindowConstants

public class SimpleChartDialog extends JDialog implements MouseListener, SwingConstants
Dialog box that can be attached to a chart to make common settings available to the user. If you want the dialog to show when the popup menu item event occurs, you must add this as a MouseListener of the desired target view.
Author:
tap
See Also:
  • Field Details

  • Constructor Details

    • SimpleChartDialog

      public SimpleChartDialog(Component parent, ChartPopupAdaptor aChartAdaptor)
      Creates new form SimpleChartDialog
      Parameters:
      parent - the parent view near which to display this dialog
      aChartAdaptor - the chart popup adaptor to use
    • SimpleChartDialog

      public SimpleChartDialog(Frame owner, Component parent, ChartPopupAdaptor aChartAdaptor)
      Creates new form SimpleChartDialog
      Parameters:
      owner - the window which owns this dialog
      parent - the parent view near which to display this dialog
      aChartAdaptor - the chart popup adaptor to use
    • SimpleChartDialog

      public SimpleChartDialog(Dialog owner, Component parent, ChartPopupAdaptor aChartAdaptor)
      Creates new form SimpleChartDialog
      Parameters:
      owner - the window which owns this dialog
      parent - the parent view near which to display this dialog
      aChartAdaptor - the chart popup adaptor to use
  • Method Details

    • setup

      protected void setup(Component parent, ChartPopupAdaptor aChartAdaptor)
      Setup the dialog
      Parameters:
      parent - the parent view near which to display this dialog
      aChartAdaptor - the chart popup adaptor to use
    • showDialog

      public void showDialog()
      display this dialog
    • setFieldValue

      public static void setFieldValue(JTextField field, int value)
      convenience method for setting an int field
    • setFieldValue

      public static void setFieldValue(JTextField field, double value)
      convenience method for setting a double field
    • revertSettings

      protected void revertSettings()
      Set the values in the panel to reflect the setting in the chart
    • applySettings

      protected void applySettings()
      Apply the values entered in the panel to the chart
    • applyXAxisMinValue

      protected void applyXAxisMinValue()
      Apply the Minimum x-axis value
    • applyXAxisMaxValue

      protected void applyXAxisMaxValue()
      Apply the Maximum x-axis value
    • applyXAxisMinorTicks

      protected void applyXAxisMinorTicks()
      Apply the X-Axis tick spacing
    • applyXAxisMajorTicks

      protected void applyXAxisMajorTicks()
      Apply the X-Axis tick spacing
    • applyXAxisGridSetting

      protected void applyXAxisGridSetting()
      Set whether to show the x-axis grid
    • applyYAxisMinValue

      protected void applyYAxisMinValue()
      Apply the Minimum y-axis value
    • applyYAxisMaxValue

      protected void applyYAxisMaxValue()
      Apply the Maximum y-axis value
    • applyYAxisMinorTicks

      protected void applyYAxisMinorTicks()
      Apply the Y-Axis tick spacing
    • applyYAxisMajorTicks

      protected void applyYAxisMajorTicks()
      Apply the Y-Axis tick spacing
    • applyYAxisGridSetting

      protected void applyYAxisGridSetting()
      Set whether to show the y-axis grid
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      implement MouseListener interface
      Specified by:
      mouseClicked in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent event)
      implement MouseListener interface
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent event)
      implement MouseListener interface
      Specified by:
      mouseExited in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent event)
      implement MouseListener interface
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      implement MouseListener interface
      Specified by:
      mouseReleased in interface MouseListener