jdraw.drawing_options_ui
Class BrushMenu

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

public class BrushMenu
extends mvp.View

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


Field Summary
protected  BrushPatternColor bpc
          A local reference to the BrushPatternColor object
 
Fields inherited from class mvp.View
editable, model, screen, shown, widget, window
 
Constructor Summary
BrushMenu(mvp.Screen screen, BrushPatternColor bpc, BrushPatternColorUI bpcUI)
          Construct the menu with the given BrushPatternColor model.
 
Method Summary
protected  void addDashed()
          Add the 'Dashed' menu item.
protected  void addDotted()
          Add the 'Dotted' menu item.
protected  void addEdit()
          Add the 'Edit ...' menu item.
protected  void addLArrow()
          Add the 'LArrow' menu item.
protected  void addLRArrow()
          Add the 'LRArrow' menu item.
protected  void addRArrow()
          Add the 'RArrow' menu item.
protected  void addSolid()
          Add the 'Solid' menu item.
protected  void addThick()
          Add the 'Thick' 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

bpc

protected BrushPatternColor bpc
A local reference to the BrushPatternColor object
Constructor Detail

BrushMenu

public BrushMenu(mvp.Screen screen,
                 BrushPatternColor bpc,
                 BrushPatternColorUI bpcUI)
Construct the menu with the given BrushPatternColor model.
Parameters:
screen - - The Screen object to be passed to parent constructor.
bpc - - The BrushPatternColor object to be passed to parent constructor and set as this.bpc.
bpcUI - - The BrushPatternColorUI view object.
Method Detail

compose

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

addSolid

protected void addSolid()
Add the 'Solid' menu item. Invokes BrushPatternColor.selectBrush(1) method.

addLArrow

protected void addLArrow()
Add the 'LArrow' menu item. Invokes BrushPatternColor.selectBrush(2) method.

addRArrow

protected void addRArrow()
Add the 'RArrow' menu item. Invokes BrushPatternColor.selectBrush(3) method.

addLRArrow

protected void addLRArrow()
Add the 'LRArrow' menu item. Invokes BrushPatternColor.selectBrush(4) method.

addDashed

protected void addDashed()
Add the 'Dashed' menu item. Invokes BrushPatternColor.selectBrush(5) method.

addDotted

protected void addDotted()
Add the 'Dotted' menu item. Invokes BrushPatternColor.selectBrush(6) method.

addThick

protected void addThick()
Add the 'Thick' menu item. Invokes BrushPatternColor.selectBrush(7) method.

addEdit

protected void addEdit()
Add the 'Edit ...' menu item. Invokes the EditBrush Dialog