Class SplotEditMenu

All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, MenuElement, SwingConstants

public class SplotEditMenu extends JMenu implements ActionListener
This class creates and manages the plot editor for sPlot.
Author:
heddle
See Also:
  • Field Details

  • Constructor Details

    • SplotEditMenu

      public SplotEditMenu(PlotCanvas canvas)
      Create a set of menus and items for sPlot
      Parameters:
      canvas - the plot canvas being controlled
  • Method Details

    • addMenuItem

      protected JMenuItem addMenuItem(String label, char accelChar, JMenu menu)
      Convenience routine for adding a menu item.
      Parameters:
      label - the menu label.
      accelChar - the accelerator character.
      menu - the menu to add the item to.
    • addMenuCheckBox

      protected JCheckBoxMenuItem addMenuCheckBox(String label, JMenu menu, boolean selected)
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • getPlotCanvas

      public PlotCanvas getPlotCanvas()
      Get the underlying plot canvas
      Returns:
      the plot canvas
    • getPreferencesItem

      public JMenuItem getPreferencesItem()
      Get the preferences item
      Returns:
      the preferences item
    • getCurveItem

      public JMenuItem getCurveItem()
      Get the curve (editor) item
      Returns:
      the curve editor item