jdraw.structure_ui
Class StructureMenu

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

public class StructureMenu
extends mvp.View

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


Field Summary
protected  Structure structure
          local reference to the File model.
 
Fields inherited from class mvp.View
editable, model, screen, shown, widget, window
 
Constructor Summary
StructureMenu(mvp.Screen screen, Structure structure, StructureUI structureUI)
          Construct the menu with the given Structure model.
 
Method Summary
protected  void addBringToFront()
          Add the 'Bring to Front' menu item.
protected  void addGroup()
          Add the 'Group' menu item.
protected  void addNumberOfGraphics()
          Add the 'Number of Graphics' menu item.
protected  void addSendToBack()
          Add the 'Send to Back' menu item.
protected  void addUngroup()
          Add the 'Ungroup' 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

structure

protected Structure structure
local reference to the File model.
Constructor Detail

StructureMenu

public StructureMenu(mvp.Screen screen,
                     Structure structure,
                     StructureUI structureUI)
Construct the menu with the given Structure model.
Parameters:
screen - - The Screen object to be passed to parent constructor.
structure - - The Structure model object.
structureUI - - The StructureUI view object.
Method Detail

compose

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

addGroup

protected void addGroup()
Add the 'Group' menu item. Invokes Structure.group() method.

addUngroup

protected void addUngroup()
Add the 'Ungroup' menu item. Invokes Structure.ungroup() method.

addBringToFront

protected void addBringToFront()
Add the 'Bring to Front' menu item. Invokes Structure.bringToFront() method.

addSendToBack

protected void addSendToBack()
Add the 'Send to Back' menu item. Invokes Structure.sendToBack() method.

addNumberOfGraphics

protected void addNumberOfGraphics()
Add the 'Number of Graphics' menu item. Invokes Structure.numberOfGraphics() method.