caltool.view_ui
Class ViewMenu

java.lang.Object
  extended by mvp.View
      extended by caltool.view_ui.ViewMenu
All Implemented Interfaces:
java.io.Serializable, java.util.Observer

public class ViewMenu
extends mvp.View

Class ViewMenu is the pulldown menu view of the model class. The ViewMenu widget is a Java JMenu. Anonymous instances of JMenuItem are defined for each item in the menu.

See Also:
Serialized Form

Field Summary
protected  javax.swing.JMenu menu
          Pre-cast reference to this' widget, which is a menu
protected  javax.swing.JMenuItem showHideAppointmentsItem
          Show/Hide Appointments menu item.
protected  javax.swing.JMenuItem showHideEventsItem
          Show/Hide Events menu item.
protected  javax.swing.JMenuItem showHideMeetingsItem
          Show/Hide Meetings menu item.
protected  javax.swing.JMenuItem showHideTasksItem
          Show/Hide Tasks menu item.
protected  javax.swing.JMenu submenu
          Temp submenu vars, used in item-adding methods
protected  javax.swing.JMenu submenu2
          Temp submenu vars, used in item-adding methods
 
Fields inherited from class mvp.View
closeAdapter, editable, model, screen, shown, widget, window
 
Constructor Summary
ViewMenu(mvp.Screen screen, View view, ViewUI viewUI)
          Construct this with the given name as the pulldown label.
 
Method Summary
 void addCalendarsSubmenu()
          Add the 'Calendars' menu item.
 void addDayItem()
          Add the 'Day' menu item.
 void addFilterAppointmentsItem()
          Add the 'Filter->Show/Hide Appointments' menu item.
 void addFilterCustomSubmenu()
          Add the 'Filter->Custom' submenu.
 void addFilterEventsItem()
          Add the 'Filter->Show/Hide Events' menu item.
 void addFilterMeetingsItem()
          Add the 'Filter->Show/Hide Meetings' menu item.
 void addFilterSubmenu()
          Add the 'Filter' menu item, which is a cascading pullright containing 'Show/Hide Appointments', 'Show/Hide Meetings', 'Show/Hide Tasks', 'Show/Hide Events', and 'Custom' items.
 void addFilterTasksItem()
          Add the 'Filter->Show/Hide Tasks' menu item.
 void addGotoDateItem()
          Add the 'Goto Date ...' menu item.
 void addGroupItem()
          Add the 'Group ...' menu item.
 void addItemItem()
          Add the 'Item' menu item.
 void addListsAllItemsItem()
          Add the 'Lists->All Items' menu item.
 void addListsAppointmentsItem()
          Add the 'Lists->Appointments' menu item.
 void addListsCustomSubmenu()
          Add the 'Lists->Custom' submenu.
 void addListsEventsItem()
          Add the 'Lists->Events' menu item.
 void addListsMeetingsItem()
          Add the 'Lists->Meetings' menu item.
 void addListsSubmenu()
          Add the 'Lists' menu item, which is a cascading pullright containing 'Appointments', 'Meetings', 'Tasks', 'Events', 'All Items', and 'Custom' items.
 void addListsTasksItem()
          Add the 'Lists->Tasks' menu item.
 void addMonthItem()
           
 void addNextItem()
          Add the 'Next' menu item.
 void addOtherUserItem()
          Add the 'Other User ...' menu item.
 void addPreviousItem()
          Add the 'Previous' menu item.
 void addTodayItem()
          Add the 'Today' menu item.
 void addWeekSubmenu()
          Add the 'Week' menu item, which is a cascading pullright containing 'Table' and 'List' items.
 void addWindowsCloseItem()
          Add the 'Windows->Close' menu item.
 void addWindowsMagnetizeItem()
          Add the 'Windows->Magnetize' menu item.
 void addWindowsMultiWindowModeItem()
          Add the 'Windows->Windowing Mode->Multi-Window' menu item.
 void addWindowsPerLevelModeItem()
          Add the 'Windows->Windowing Mode->Per-Level' menu item.
 void addWindowsSubmenu()
          Add the 'Windows' menu item.
 void addWindowsTwoWindowModeItem()
          Add the 'Windows->Windowing Mode->Two-Window' menu item.
 void addWindowsWindowingModeSubmenu()
          Add the 'Windows->Windowing Mode' submenu.
 void addYearItem()
          Add the 'Year' menu item.
 java.awt.Component compose()
          Compose this by inserting each of its menu items into the pulldown menu.
 
Methods inherited from class mvp.View
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show, show, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

submenu

protected javax.swing.JMenu submenu
Temp submenu vars, used in item-adding methods


submenu2

protected javax.swing.JMenu submenu2
Temp submenu vars, used in item-adding methods


menu

protected javax.swing.JMenu menu
Pre-cast reference to this' widget, which is a menu


showHideAppointmentsItem

protected javax.swing.JMenuItem showHideAppointmentsItem
Show/Hide Appointments menu item. It's a persistent data field so it's text can change.


showHideMeetingsItem

protected javax.swing.JMenuItem showHideMeetingsItem
Show/Hide Meetings menu item. It's a persistent data field so it's text can change.


showHideTasksItem

protected javax.swing.JMenuItem showHideTasksItem
Show/Hide Tasks menu item. It's a persistent data field so it's text can change.


showHideEventsItem

protected javax.swing.JMenuItem showHideEventsItem
Show/Hide Events menu item. It's a persistent data field so it's text can change.

Constructor Detail

ViewMenu

public ViewMenu(mvp.Screen screen,
                View view,
                ViewUI viewUI)
Construct this with the given name as the pulldown label. The given View is the companion model. Also construct the state-changing menu items, that must be persistent so they're text can change.

Method Detail

compose

public java.awt.Component compose()
Compose this by inserting each of its menu items into the pulldown menu. The items are: Item, Day, Week, Month, Year, Next, Previous, Today, Goto Date, Lists, Filter, Other User, Group, Windows, and Calendars. Separators are placed after the Year, Goto Date, Filter, and Group items. A menu item is created with the following general code pattern:
     JMenu.add(new JMenuItem("Item name").addActionListener(
         new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                 model.method()
                                                              

Overrides:
compose in class mvp.View

addItemItem

public void addItemItem()
Add the 'Item' menu item.


addDayItem

public void addDayItem()
Add the 'Day' menu item.


addWeekSubmenu

public void addWeekSubmenu()
Add the 'Week' menu item, which is a cascading pullright containing 'Table' and 'List' items.


addMonthItem

public void addMonthItem()

addYearItem

public void addYearItem()
Add the 'Year' menu item.


addNextItem

public void addNextItem()
Add the 'Next' menu item.


addPreviousItem

public void addPreviousItem()
Add the 'Previous' menu item.


addTodayItem

public void addTodayItem()
Add the 'Today' menu item.


addGotoDateItem

public void addGotoDateItem()
Add the 'Goto Date ...' menu item.


addListsSubmenu

public void addListsSubmenu()
Add the 'Lists' menu item, which is a cascading pullright containing 'Appointments', 'Meetings', 'Tasks', 'Events', 'All Items', and 'Custom' items.


addListsAppointmentsItem

public void addListsAppointmentsItem()
Add the 'Lists->Appointments' menu item.


addListsMeetingsItem

public void addListsMeetingsItem()
Add the 'Lists->Meetings' menu item.


addListsTasksItem

public void addListsTasksItem()
Add the 'Lists->Tasks' menu item.


addListsEventsItem

public void addListsEventsItem()
Add the 'Lists->Events' menu item.


addListsAllItemsItem

public void addListsAllItemsItem()
Add the 'Lists->All Items' menu item.


addListsCustomSubmenu

public void addListsCustomSubmenu()
Add the 'Lists->Custom' submenu.


addFilterSubmenu

public void addFilterSubmenu()
Add the 'Filter' menu item, which is a cascading pullright containing 'Show/Hide Appointments', 'Show/Hide Meetings', 'Show/Hide Tasks', 'Show/Hide Events', and 'Custom' items.


addFilterAppointmentsItem

public void addFilterAppointmentsItem()
Add the 'Filter->Show/Hide Appointments' menu item.


addFilterMeetingsItem

public void addFilterMeetingsItem()
Add the 'Filter->Show/Hide Meetings' menu item.


addFilterTasksItem

public void addFilterTasksItem()
Add the 'Filter->Show/Hide Tasks' menu item.


addFilterEventsItem

public void addFilterEventsItem()
Add the 'Filter->Show/Hide Events' menu item.


addFilterCustomSubmenu

public void addFilterCustomSubmenu()
Add the 'Filter->Custom' submenu.


addOtherUserItem

public void addOtherUserItem()
Add the 'Other User ...' menu item.


addGroupItem

public void addGroupItem()
Add the 'Group ...' menu item.


addWindowsSubmenu

public void addWindowsSubmenu()
Add the 'Windows' menu item.


addWindowsCloseItem

public void addWindowsCloseItem()
Add the 'Windows->Close' menu item.


addWindowsWindowingModeSubmenu

public void addWindowsWindowingModeSubmenu()
Add the 'Windows->Windowing Mode' submenu.


addWindowsTwoWindowModeItem

public void addWindowsTwoWindowModeItem()
Add the 'Windows->Windowing Mode->Two-Window' menu item.


addWindowsPerLevelModeItem

public void addWindowsPerLevelModeItem()
Add the 'Windows->Windowing Mode->Per-Level' menu item.


addWindowsMultiWindowModeItem

public void addWindowsMultiWindowModeItem()
Add the 'Windows->Windowing Mode->Multi-Window' menu item.


addWindowsMagnetizeItem

public void addWindowsMagnetizeItem()
Add the 'Windows->Magnetize' menu item.


addCalendarsSubmenu

public void addCalendarsSubmenu()
Add the 'Calendars' menu item.