jdraw.options_ui
Class OptionsMenu

java.lang.Object
  |
  +--mvp.View
        |
        +--jdraw.options_ui.OptionsMenu
All Implemented Interfaces:
java.util.Observer

public class OptionsMenu
extends mvp.View

Class OptiosMenu is the pulldown menu for the Options model. The OptionsMenu widget is a JMenu. Anonymous instances of JMenuItem are defined for each menu item.


Field Summary
protected  Options options
          local reference to the Options model.
 
Fields inherited from class mvp.View
editable, model, screen, shown, widget, window
 
Constructor Summary
OptionsMenu(mvp.Screen screen, Options options, OptionsUI optionsUI)
          Construct the menu with the given Options model.
 
Method Summary
protected  void addEnlarge()
          Add the 'Enlarge' menu item.
protected  void addGriddingOnOff()
          Add the 'Gridding On/Off' menu item.
protected  void addGriddingVisibleInvisible()
          Add the 'Gridding Vis/Invis' menu item.
protected  void addGridSpacing()
          Add the 'Grid Spacing' menu item.
protected  void addHome()
          Add the 'Home' menu item.
protected  void addNormalSize()
          Add the 'Normal Size' menu item.
protected  void addOrientation()
          Add the 'Orientation' menu item.
protected  void addReduce()
          Add the 'Reduce' menu item.
 java.awt.Component compose()
          Compose the menu items into the pulldown.
 
Methods inherited from class mvp.View
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setModel, show, show, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected Options options
local reference to the Options model.
Constructor Detail

OptionsMenu

public OptionsMenu(mvp.Screen screen,
                   Options options,
                   OptionsUI optionsUI)
Construct the menu with the given Options model.
Parameters:
screen - - The Screen object to be passed to parent constructor.
options - - The Options objec to be passed to parent constructor and set as this.options.
optionsUI - - The OptionsUI view object.
Method Detail

compose

public java.awt.Component compose()
Compose the menu items into the pulldown.
Overrides:
compose in class mvp.View

addReduce

protected void addReduce()
Add the 'Reduce' menu item. Invokes Options.reduce() method.

addEnlarge

protected void addEnlarge()
Add the 'Enlarge' menu item. Invokes Options.enlarge() method.

addNormalSize

protected void addNormalSize()
Add the 'Normal Size' menu item. Invokes Options.normalSize() method.

addHome

protected void addHome()
Add the 'Home' menu item. Invokes Options.returnHome() method.

addGriddingOnOff

protected void addGriddingOnOff()
Add the 'Gridding On/Off' menu item. Invokes Options.griddingOnOff() method.

addGriddingVisibleInvisible

protected void addGriddingVisibleInvisible()
Add the 'Gridding Vis/Invis' menu item. Invokes Options.griddingVisibleInvisible() method.

addGridSpacing

protected void addGridSpacing()
Add the 'Grid Spacing' menu item. Invokes Options.gridSpacing() method.

addOrientation

protected void addOrientation()
Add the 'Orientation' menu item. Invokes Options.orientation() method.