org.openpermis.editor.policy.gui
Class MenuBarFactory

java.lang.Object
  extended by org.openpermis.editor.policy.gui.AbstractComponentFactory
      extended by org.openpermis.editor.policy.gui.MenuBarFactory

public class MenuBarFactory
extends AbstractComponentFactory

Factory for menu bars.

Since:
0.1.0

Nested Class Summary
 class MenuBarFactory.Customizer
          Menu customizer passed to the callback.
static interface MenuBarFactory.Resolver
          Resolver for menu placeholder keys.
 
Constructor Summary
MenuBarFactory(ActionMap actionMap, org.jdesktop.application.ResourceMap resourceMap)
          Creates a menu bar factory that operates on the specified action and resource map.
 
Method Summary
protected  JMenu createMenu(MenuBarFactory.Resolver resolver, String menuBarName, String name, boolean addIcon)
          Creates a single menu of a menu bar.
static JMenuBar createMenuBar(ActionMap actionMap, org.jdesktop.application.ResourceMap resourceMap, String key)
          Creates a menu bar from a resource map and a resource key.
static JMenuBar createMenuBar(ActionMap actionMap, org.jdesktop.application.ResourceMap resourceMap, String key, MenuBarFactory.Resolver resolver)
          Creates a menu bar from a resource map and a resource key.
 JMenuBar createMenuBar(String key)
          Creates a menubar with the specified resource key name.
 JMenuBar createMenuBar(String key, MenuBarFactory.Resolver resolver)
          Creates a menubar with the specified resource key name.
protected  JMenuItem createMenuItem(Action action, String key)
          Creates a menu item for the specified resource key name.
 
Methods inherited from class org.openpermis.editor.policy.gui.AbstractComponentFactory
getAction, getAction, getActionMap, getEntries, getResourceMap, isComposite, isGlue, isPlaceholder, isSeparator, unmaskComposite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuBarFactory

public MenuBarFactory(ActionMap actionMap,
                      org.jdesktop.application.ResourceMap resourceMap)
Creates a menu bar factory that operates on the specified action and resource map.

Parameters:
actionMap - the action map this factory operates on.
resourceMap - the resource map this factory operates on.
Since:
0.1.0
Method Detail

createMenuBar

public static JMenuBar createMenuBar(ActionMap actionMap,
                                     org.jdesktop.application.ResourceMap resourceMap,
                                     String key)
Creates a menu bar from a resource map and a resource key.

Parameters:
actionMap - the action map this factory operates on.
resourceMap - the resource map this factory operates on.
key - the name of the menu bar configuration in the resource map.
Returns:
the menu bar requested.
Since:
0.1.0

createMenuBar

public static JMenuBar createMenuBar(ActionMap actionMap,
                                     org.jdesktop.application.ResourceMap resourceMap,
                                     String key,
                                     MenuBarFactory.Resolver resolver)
Creates a menu bar from a resource map and a resource key.

Parameters:
actionMap - the action map this factory operates on.
resourceMap - the resource map this factory operates on.
key - the name of the menu bar configuration in the resource map.
resolver - the resolver for placeholder entries.
Returns:
the menu bar requested.
Since:
0.9.0

createMenuItem

protected JMenuItem createMenuItem(Action action,
                                   String key)
Creates a menu item for the specified resource key name.

Parameters:
key - the name of the menu item configuration in the resource map.
Returns:
the menu item requested.
Since:
0.9.0

createMenu

protected JMenu createMenu(MenuBarFactory.Resolver resolver,
                           String menuBarName,
                           String name,
                           boolean addIcon)
Creates a single menu of a menu bar.

Parameters:
resolver - the resolver for placeholder entries.
menuBarName - the resource key of the menu bar.
name - the resource key of the menu entry to create.
addIcon - indicates if an icon is added to the menu.
Returns:
the menu requested.
Since:
0.1.0

createMenuBar

public JMenuBar createMenuBar(String key)
Creates a menubar with the specified resource key name.

Parameters:
key - the name of the menu bar configuration in the resource map.
Returns:
the menu bar requested.
Since:
0.1.0

createMenuBar

public JMenuBar createMenuBar(String key,
                              MenuBarFactory.Resolver resolver)
Creates a menubar with the specified resource key name.

Parameters:
key - the name of the menu bar configuration in the resource map.
resolver - the resolver for placeholder entries.
Returns:
the menu bar requested.
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG