Package cnuphys.splot.plot
Class SplotMenus
java.lang.Object
cnuphys.splot.plot.SplotMenus
- All Implemented Interfaces:
ActionListener
,EventListener
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSplotMenus
(PlotCanvas canvas, JMenuBar menuBar, boolean addQuit) Create a set of menus and items for sPlotSplotMenus
(PlotCanvas canvas, JPopupMenu popup, boolean addQuit) Create a set of menus and items for sPlot -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected JCheckBoxMenuItem
addMenuCheckBox
(String label, JMenu menu, boolean selected) protected JMenuItem
addMenuItem
(String label, char accelChar, JMenu menu) Convenience routine for adding a menu item.Get the clear (canvas) itemGet the curve (editor) itemGet the edit menuGet the file menuGet the underlying plot canvasGet the preferences itemGet the quit item (might be null)protected void
makeEditMenu
(PlotCanvas canvas, Container container) protected void
makeFileMenu
(Container container, boolean addQuit)
-
Field Details
-
_fileMenu
-
_editMenu
-
_quitItem
-
_prefItem
-
_dataItem
-
_clearItem
-
_curveItem
-
_axesItem
-
_showExtraCB
-
-
Constructor Details
-
SplotMenus
Create a set of menus and items for sPlot- Parameters:
canvas
- the plot canvas being controlledmenuBar
- the menu baraddQuit
- iftrue
include a quit item
-
SplotMenus
Create a set of menus and items for sPlot- Parameters:
canvas
- the plot canvas being controlledpopup
- a popup to hold the menusaddQuit
- iftrue
include a quit item
-
-
Method Details
-
makeFileMenu
-
makeEditMenu
-
addMenuItem
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
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
getPlotCanvas
Get the underlying plot canvas- Returns:
- the plot canvas
-
getFileMenu
Get the file menu- Returns:
- the file menu
-
getEditMenu
Get the edit menu- Returns:
- the edit menu
-
getQuitItem
Get the quit item (might be null)- Returns:
- the quit item
-
getPreferencesItem
Get the preferences item- Returns:
- the preferences item
-
getClearItem
Get the clear (canvas) item- Returns:
- the clear item
-
getCurveItem
Get the curve (editor) item- Returns:
- the curve editor item
-