jdraw.align_ui
Class AlignMenu

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

public class AlignMenu
extends mvp.View

Class AlignMenu is the pulldown menu for the Align model. The AliceMenu widget is a JMenu. Anonymous instances of JMenuItem are defined for each menu item.


Field Summary
protected  Align align
          local reference to the Align model.
 
Fields inherited from class mvp.View
editable, model, screen, shown, widget, window
 
Constructor Summary
AlignMenu(mvp.Screen screen, Align align, AlignUI alignUI)
          Construct the menu with the given Align model.
 
Method Summary
protected  void addAlignToGrid()
          Add the 'Align to Grid' menu item.
protected  void addBottoms()
          Add the 'Bottoms' menu item.
protected  void addBottomToTop()
          Add the 'Bottom to Top' menu item.
protected  void addCenters()
          Add the 'Centers' menu item.
protected  void addHorizontalCenters()
          Add the 'Horizontal Centers' menu item.
protected  void addLeftSides()
          Add the 'Left Sides' menu item.
protected  void addLeftToRight()
          Add the 'Left to Right' menu item.
protected  void addRightSides()
          Add the 'Right Sides' menu item.
protected  void addRightToLeft()
          Add the 'Right to Left' menu item.
protected  void addTops()
          Add the 'Tops' menu item.
protected  void addTopToBottom()
          Add the 'Top to Bottom' menu item.
protected  void addVerticalCenters()
          Add the 'Vertical Centers' 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

align

protected Align align
local reference to the Align model.
Constructor Detail

AlignMenu

public AlignMenu(mvp.Screen screen,
                 Align align,
                 AlignUI alignUI)
Construct the menu with the given Align model.
Parameters:
screen - - The Screen object to be passed to the parent constructor.
align - - The Align object to be passed to the parent constructor and set as this.align.
alignUI - - The AlignUI view object.
Method Detail

compose

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

addLeftSides

protected void addLeftSides()
Add the 'Left Sides' menu item. Invokes Align.alignLeftSides() method.

addRightSides

protected void addRightSides()
Add the 'Right Sides' menu item. Invokes Align.alignRightSides() method.

addBottoms

protected void addBottoms()
Add the 'Bottoms' menu item. Invokes Align.alignBottoms() method.

addTops

protected void addTops()
Add the 'Tops' menu item. Invokes Align.alignTops() method.

addVerticalCenters

protected void addVerticalCenters()
Add the 'Vertical Centers' menu item. Invokes Align.alignVerticalCenters() method.

addHorizontalCenters

protected void addHorizontalCenters()
Add the 'Horizontal Centers' menu item. Invokes Align.alignHorizontalCenters() method.

addCenters

protected void addCenters()
Add the 'Centers' menu item. Invokes Align.alignCenters() method.

addLeftToRight

protected void addLeftToRight()
Add the 'Left to Right' menu item. Invokes Align.alignLeftToRight() method.

addRightToLeft

protected void addRightToLeft()
Add the 'Right to Left' menu item. Invokes Align.alignRightToLeft() method.

addBottomToTop

protected void addBottomToTop()
Add the 'Bottom to Top' menu item. Invokes Align.alignBottomToTop() method.

addTopToBottom

protected void addTopToBottom()
Add the 'Top to Bottom' menu item. Invokes Align.alignTopToBottom() method.

addAlignToGrid

protected void addAlignToGrid()
Add the 'Align to Grid' menu item. Invokes Align.alignToGrid() method.