jdraw.drawing_options_ui
Class PatternMenu

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

public class PatternMenu
extends mvp.View

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


Field Summary
protected  BrushPatternColor bpc
          An instance of the companion Model class.
 
Fields inherited from class mvp.View
editable, model, screen, shown, widget, window
 
Constructor Summary
PatternMenu(mvp.Screen screen, BrushPatternColor bpc, BrushPatternColorUI bpcUI)
          Construct the menu with the given BrushPatternColor model.
 
Method Summary
protected  void addEdit()
          Add the 'Edit ...' menu item.
protected  void addEmpty()
          Add the 'Empty' menu item.
protected  void addFull()
          Add the 'Full' menu item.
protected  void addMid()
          Add the 'Mid' menu item.
protected  void addMid2()
          Add the 'Mid2' menu item.
protected  void addMid3()
          Add the 'Mid3' menu item.
protected  void addMid4()
          Add the 'Mid4' menu item.
protected  void addNone()
          Add the 'None' 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
An instance of the companion Model class.
Constructor Detail

PatternMenu

public PatternMenu(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

addNone

protected void addNone()
Add the 'None' menu item. Invokes BrushPatternColor.selectFillPattern(0) method.

addEmpty

protected void addEmpty()
Add the 'Empty' menu item. Invokes BrushPatternColor.selectFillPattern(1) method.

addMid

protected void addMid()
Add the 'Mid' menu item. Invokes BrushPatternColor.selectFillPattern(2) method.

addMid2

protected void addMid2()
Add the 'Mid2' menu item. Invokes BrushPatternColor.selectFillPattern(3) method.

addMid3

protected void addMid3()
Add the 'Mid3' menu item. Invokes BrushPatternColor.selectFillPattern(4) method.

addMid4

protected void addMid4()
Add the 'Mid4' menu item. Invokes BrushPatternColor.selectFillPattern(5) method.

addFull

protected void addFull()
Add the 'Full' menu item. Invokes BrushPatternColor.selectFillPattern(3) method.

addEdit

protected void addEdit()
Add the 'Edit ...' menu item. Invokes a dialog ....