jdraw.jdraw_ui
Class CommandMenu

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

public class CommandMenu
extends mvp.View

Class CommandMenu is the companion View class for the Commands Model. It is the system's Menu Bar and consists of the following menus: File, Edit, Structure, Text, Brush, Pattern, FGColor, BGColor, Align, and Options.


Field Summary
protected  AlignUI alignUI
          The pulldown Align menu.
protected  BrushPatternColorUI bpcUI
          The object which holds the Brush, pattern, color menus
protected  Commands commands
          The companion model class
protected  EditUI editUI
          The pulldown Edit menu
protected  FileUI fileUI
          The pulldown File menu
protected  JDrawKeyListener keyListener
          The JDrawKeyListener to be used on this.
protected  javax.swing.JMenuBar menuBar
          The top-level menubar
protected  OptionsUI optionsUI
          The pulldown Options menu
protected  StructureUI structureUI
          The pulldown Structure menu
protected  TextUI textUI
          The pulldown Text menu
 
Fields inherited from class mvp.View
editable, model, screen, shown, widget, window
 
Constructor Summary
CommandMenu(mvp.Screen screen, Commands commands, JDrawKeyListener keyListener)
          Construct this by calling the parent constructor and then calling the constructSubviews function to build the menus.
 
Method Summary
 java.awt.Component compose()
          Compose this by creating a new window with a Menu Bar
protected  void composeMenuBar()
          Compose this' menubar by adding each composed menu to it.
protected  void constructSubviews()
          Call the constructor for each of the component views.
 EditUI getEditUI()
          Return this.editUI.
 FileUI getFileUI()
           
 
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

menuBar

protected javax.swing.JMenuBar menuBar
The top-level menubar

fileUI

protected FileUI fileUI
The pulldown File menu

editUI

protected EditUI editUI
The pulldown Edit menu

structureUI

protected StructureUI structureUI
The pulldown Structure menu

textUI

protected TextUI textUI
The pulldown Text menu

optionsUI

protected OptionsUI optionsUI
The pulldown Options menu

alignUI

protected AlignUI alignUI
The pulldown Align menu.

bpcUI

protected BrushPatternColorUI bpcUI
The object which holds the Brush, pattern, color menus

commands

protected Commands commands
The companion model class

keyListener

protected JDrawKeyListener keyListener
The JDrawKeyListener to be used on this.
Constructor Detail

CommandMenu

public CommandMenu(mvp.Screen screen,
                   Commands commands,
                   JDrawKeyListener keyListener)
Construct this by calling the parent constructor and then calling the constructSubviews function to build the menus.
Parameters:
screen - - The Screen object to be passed to the parent constructor.
commands - - The Commands model object.
Method Detail

composeMenuBar

protected void composeMenuBar()
Compose this' menubar by adding each composed menu to it.

compose

public java.awt.Component compose()
Compose this by creating a new window with a Menu Bar
Overrides:
compose in class mvp.View

getEditUI

public EditUI getEditUI()
Return this.editUI.

getFileUI

public FileUI getFileUI()

constructSubviews

protected void constructSubviews()
Call the constructor for each of the component views. Pass each constructor its companion model.