JHotDraw 7.6

org.jhotdraw.app
Class EmptyMenuBuilder

java.lang.Object
  extended by org.jhotdraw.app.EmptyMenuBuilder
All Implemented Interfaces:
MenuBuilder

public class EmptyMenuBuilder
extends java.lang.Object
implements MenuBuilder

EmptyMenuBuilder provides empty implementations of the MenuBuilder interface.

Version:
1.0 2010-11-14 Created.
Author:
Werner Randelshofer

Constructor Summary
EmptyMenuBuilder()
           
 
Method Summary
 void addAboutItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "About" items to a menu.
 void addClearFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Clear File" items to a menu.
 void addClipboardItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Clipboard" items to a menu.
 void addCloseFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Close File" items to a menu.
 void addExitItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Exit" items to a menu.
 void addExportFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Export File" items to a menu.
 void addFindItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Find" items to a menu.
 void addHelpItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Help" items to a menu.
 void addLoadFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Load file" items to a menu.
 void addNewFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "New File" items to a menu.
 void addNewWindowItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "New Window" items to a menu.
 void addOpenFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Open File" items to a menu.
 void addOtherEditItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more editing related items to a menu.
 void addOtherFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more file related items to a menu.
 void addOtherMenus(java.util.List<javax.swing.JMenu> m, Application app, View v)
          Optionally adds one or more additional menus to a menu bar or a pop up menu.
 void addOtherViewItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more view related items to a menu.
 void addOtherWindowItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more window related items to a menu.
 void addPreferencesItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Preferences" items to a menu.
 void addPrintFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Print File" items to a menu.
 void addSaveFileItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Save File" items to a menu.
 void addSelectionItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Selection" items to a menu.
 void addUndoItems(javax.swing.JMenu m, Application app, View v)
          Optionally adds one or more "Undo" items to a menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyMenuBuilder

public EmptyMenuBuilder()
Method Detail

addPreferencesItems

public void addPreferencesItems(javax.swing.JMenu m,
                                Application app,
                                @Nullable
                                View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Preferences" items to a menu.

Most applications use this method for adding items to the last section of the "Edit" menu.

Note that OSXApplication does not invoke this method and instead retrieves an action with ID AbstractPreferencesAction.ID from the action map of the ApplicationModel and adds it to the "Application" menu.

Specified by:
addPreferencesItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addExitItems

public void addExitItems(javax.swing.JMenu m,
                         Application app,
                         @Nullable
                         View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Exit" items to a menu.

Most applications use this method for adding items to the last section of the "File" menu.

Note that OSXApplication does not invoke this method and instead retrieves an action with ID ExitAction.ID from the action map of the ApplicationModel and adds it to the "Application" menu.

Specified by:
addExitItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addClearFileItems

public void addClearFileItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Clear File" items to a menu.

Most applications use this method for adding items to the first section of the "File" menu.

Specified by:
addClearFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addNewWindowItems

public void addNewWindowItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "New Window" items to a menu.

Most applications use this method for adding items to the first section of the "File" menu.

Specified by:
addNewWindowItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addNewFileItems

public void addNewFileItems(javax.swing.JMenu m,
                            Application app,
                            @Nullable
                            View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "New File" items to a menu.

Most applications use this method for adding items to the first section of the "File" menu.

Specified by:
addNewFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addLoadFileItems

public void addLoadFileItems(javax.swing.JMenu m,
                             Application app,
                             @Nullable
                             View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Load file" items to a menu.

Most applications use this method for adding items to the first section of the "File" menu.

Specified by:
addLoadFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addOpenFileItems

public void addOpenFileItems(javax.swing.JMenu m,
                             Application app,
                             @Nullable
                             View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Open File" items to a menu.

Most applications use this method for adding items to the first section of the "File" menu.

Specified by:
addOpenFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addCloseFileItems

public void addCloseFileItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Close File" items to a menu.

Most applications use this method for adding items to the second section of the "File" menu.

Specified by:
addCloseFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addSaveFileItems

public void addSaveFileItems(javax.swing.JMenu m,
                             Application app,
                             @Nullable
                             View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Save File" items to a menu.

Most applications use this method for adding items to the second section of the "File" menu.

Specified by:
addSaveFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addExportFileItems

public void addExportFileItems(javax.swing.JMenu m,
                               Application app,
                               @Nullable
                               View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Export File" items to a menu.

Most applications use this method for adding items to the second section of the "File" menu.

Specified by:
addExportFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addPrintFileItems

public void addPrintFileItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Print File" items to a menu.

Most applications use this method for adding items to the third section of the "File" menu.

Specified by:
addPrintFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addOtherFileItems

public void addOtherFileItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more file related items to a menu.

Most applications use this method for adding items to the third section of the "File" menu.

Specified by:
addOtherFileItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addUndoItems

public void addUndoItems(javax.swing.JMenu m,
                         Application app,
                         @Nullable
                         View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Undo" items to a menu.

Most applications use this method for adding items to the first section of the "Edit" menu.

Specified by:
addUndoItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addClipboardItems

public void addClipboardItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Clipboard" items to a menu.

Most applications use this method for adding items to the second section of the "Edit" menu.

Specified by:
addClipboardItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addSelectionItems

public void addSelectionItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Selection" items to a menu.

Most applications use this method for adding items to the third section of the "Edit" menu.

Specified by:
addSelectionItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addFindItems

public void addFindItems(javax.swing.JMenu m,
                         Application app,
                         @Nullable
                         View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Find" items to a menu.

Most applications use this method for adding items to the fourth section of the "Edit" menu.

Specified by:
addFindItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addOtherEditItems

public void addOtherEditItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more editing related items to a menu.

Most applications use this method for adding items to the fifth section of the "Edit" menu.

Specified by:
addOtherEditItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addOtherViewItems

public void addOtherViewItems(javax.swing.JMenu m,
                              Application app,
                              @Nullable
                              View v)
Description copied from interface: MenuBuilder
Optionally adds one or more view related items to a menu.

Most applications use this method for adding items to the first section of the "View" menu.

Specified by:
addOtherViewItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addOtherMenus

public void addOtherMenus(java.util.List<javax.swing.JMenu> m,
                          Application app,
                          @Nullable
                          View v)
Description copied from interface: MenuBuilder
Optionally adds one or more additional menus to a menu bar or a pop up menu.

Most applications add additional menus between the "View" menu and the "Window" menu to the menu bar.

Specified by:
addOtherMenus in interface MenuBuilder
Parameters:
m - A (potentially non-empty) list of menus.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addOtherWindowItems

public void addOtherWindowItems(javax.swing.JMenu m,
                                Application app,
                                @Nullable
                                View v)
Description copied from interface: MenuBuilder
Optionally adds one or more window related items to a menu.

Most applications use this method for adding items to the second section of the "Window" menu. (The first section usually contains application specific items). Some applications, such as SDIApplication add these items to the "View" menu.

Specified by:
addOtherWindowItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addHelpItems

public void addHelpItems(javax.swing.JMenu m,
                         Application app,
                         @Nullable
                         View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "Help" items to a menu.

Most applications use this method for adding items to the first section of the "Help" menu.

Specified by:
addHelpItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

addAboutItems

public void addAboutItems(javax.swing.JMenu m,
                          Application app,
                          @Nullable
                          View v)
Description copied from interface: MenuBuilder
Optionally adds one or more "About" items to a menu.

Most applications use this method for adding items to the last section of the "Help" menu.

Note that OSXApplication does not invoke this method and instead retrieves an action with ID AboutAction.ID from the action map of the ApplicationModel and adds it to the "Application" menu.

Specified by:
addAboutItems in interface MenuBuilder
Parameters:
m - A (potentially non-empty) menu.
app - The Application for which the menu is built.
v - A view the menu is used exclusively for a specific view, null if the menu is shared by all views.

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.