org.argouml.ui.cmd
Class GenericArgoMenuBar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JMenuBar
                  extended by org.argouml.ui.cmd.GenericArgoMenuBar
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.MenuElement, TargetListener
Direct Known Subclasses:
MenuBar14, MenuBar2

Deprecated. in 0.29.2 by Bob Tarling. This class will be moved and made private in future. Use MenuBarFactory.createApplicationMenuBar

public class GenericArgoMenuBar
extends javax.swing.JMenuBar
implements TargetListener

GenericArgoMenuBar defines the menu bar for all operating systems which do not explicitly ask for a different kind of menu bar, such as Mac OS X.

Menu's and the mnemonics of menu's and the menuitems are separated in the PropertyResourceBundle menu.properties.

menu items are separated in the PropertyResourceBundle action.properties.

The key's in menu.properties have the following structure:

   menu:                    [file].[name of menu]
    e.g:                    menu.file
 
   mnemonics of menu's:     [file].[name of menu].mnemonic
    e.g:                    menu.file.mnemonic
 
   mnemonics of menuitems:  [file].[flag for item].[name of menuitem].mnemonic
    e.g:                    menu.item.new.mnemonic
 
TODO: Add registration for new menu items.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JMenuBar
javax.swing.JMenuBar.AccessibleJMenuBar
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static double ZOOM_FACTOR
          Deprecated. The zoom factor - defaults to 90%/110%
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GenericArgoMenuBar()
          Deprecated. The constructor.
 
Method Summary
 void addFileSaved(java.lang.String filename)
          Deprecated. Adds the entry to the mru list.
 javax.swing.JMenu getCreateDiagramMenu()
          Deprecated. Get the create diagram menu.
 javax.swing.JToolBar getCreateDiagramToolbar()
          Deprecated. Get the create diagram toolbar.
 javax.swing.JToolBar getEditToolbar()
          Deprecated. Get the edit toolbar.
 javax.swing.JToolBar getFileToolbar()
          Deprecated. Getter for the file toolbar.
 javax.swing.JMenu getGeneration()
          Deprecated. Getter for the Generation menu.
 javax.swing.JMenu getTools()
          Deprecated. Getter for the Tools menu.
 javax.swing.JToolBar getViewToolbar()
          Deprecated. Getter for the view toolbar.
protected  void initMenuCreate()
          Deprecated. Build the menu "Create" and the toolbar for diagram creation.
protected  void initMenus()
          Deprecated. Construct the ordinary all purpose Argo Menu Bar.
 void macAbout()
          Deprecated. Internal use only.
 void macOpenFile(java.lang.String filename)
          Deprecated. Internal use only.
 void macPreferences()
          Deprecated. Internal use only.
 void macQuit()
          Deprecated. Internal use only.
protected static java.lang.String menuLocalize(java.lang.String key)
          Deprecated.  
static void registerCreateDiagramAction(javax.swing.Action action)
          Deprecated. Add a new Action to the Create Diagram toolbar.
static void registerMenuItem(javax.swing.JMenu menu)
          Deprecated. Add a new menu to the main toolbar.
protected static void setMnemonic(javax.swing.JMenuItem item, java.lang.String key)
          Deprecated. This should be a user specified option.
 void targetAdded(TargetEvent e)
          Deprecated. Fired when a target is added to the list of targets.
 void targetRemoved(TargetEvent e)
          Deprecated. Fired when a target is removed from the list of targets
 void targetSet(TargetEvent e)
          Deprecated. Fired when a total new set of targets is set
 
Methods inherited from class javax.swing.JMenuBar
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZOOM_FACTOR

public static final double ZOOM_FACTOR
Deprecated. 
The zoom factor - defaults to 90%/110%

See Also:
Constant Field Values
Constructor Detail

GenericArgoMenuBar

public GenericArgoMenuBar()
Deprecated. 
The constructor.

Method Detail

setMnemonic

protected static final void setMnemonic(javax.swing.JMenuItem item,
                                        java.lang.String key)
Deprecated. 
This should be a user specified option. New laws for handicapped people who cannot use the mouse require software developers in US to make all components of User interface accessible through keyboard

Parameters:
item - is the JMenuItem to do this for.
key - is the key that we do this for.

menuLocalize

protected static final java.lang.String menuLocalize(java.lang.String key)
Deprecated. 
Parameters:
key - the key to localize
Returns:
the localized string

initMenus

protected void initMenus()
Deprecated. 
Construct the ordinary all purpose Argo Menu Bar.


initMenuCreate

protected void initMenuCreate()
Deprecated. 
Build the menu "Create" and the toolbar for diagram creation. These are build together to guarantee that the same items are present in both, and in the same sequence.

The sequence of these items was determined by issue 1821.


getCreateDiagramToolbar

public javax.swing.JToolBar getCreateDiagramToolbar()
Deprecated. 
Get the create diagram toolbar.

Returns:
Value of property _createDiagramToolbar.

getCreateDiagramMenu

public javax.swing.JMenu getCreateDiagramMenu()
Deprecated. 
Get the create diagram menu. Provided to allow plugins to appeand their own actions to this menu.

Returns:
Value of property createDiagramMenu

getEditToolbar

public javax.swing.JToolBar getEditToolbar()
Deprecated. 
Get the edit toolbar.

Returns:
the edit toolbar.

getFileToolbar

public javax.swing.JToolBar getFileToolbar()
Deprecated. 
Getter for the file toolbar.

Returns:
the file toolbar.

getViewToolbar

public javax.swing.JToolBar getViewToolbar()
Deprecated. 
Getter for the view toolbar.

Returns:
the view toolbar.

addFileSaved

public void addFileSaved(java.lang.String filename)
Deprecated. 
Adds the entry to the mru list.

Parameters:
filename - of the project TODO: This should listen for file save events rather than being called directly - tfm.

getTools

public javax.swing.JMenu getTools()
Deprecated. 
Getter for the Tools menu.

Returns:
The Tools menu.

getGeneration

public javax.swing.JMenu getGeneration()
Deprecated. 
Getter for the Generation menu.

Returns:
The Generation menu.

targetAdded

public void targetAdded(TargetEvent e)
Deprecated. 
Description copied from interface: TargetListener
Fired when a target is added to the list of targets.

Specified by:
targetAdded in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_ADDED

targetRemoved

public void targetRemoved(TargetEvent e)
Deprecated. 
Description copied from interface: TargetListener
Fired when a target is removed from the list of targets

Specified by:
targetRemoved in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_REMOVED

targetSet

public void targetSet(TargetEvent e)
Deprecated. 
Description copied from interface: TargetListener
Fired when a total new set of targets is set

Specified by:
targetSet in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_SET

registerMenuItem

public static void registerMenuItem(javax.swing.JMenu menu)
Deprecated. 
Add a new menu to the main toolbar.

Parameters:
menu - the menu to be added

registerCreateDiagramAction

public static void registerCreateDiagramAction(javax.swing.Action action)
Deprecated. 
Add a new Action to the Create Diagram toolbar. This can be used to register create actions for new diagram types by plugin modules.

Parameters:
action - the create action to be registered.

macQuit

public void macQuit()
Deprecated. 
Internal use only. Do not use.


macAbout

public void macAbout()
Deprecated. 
Internal use only. Do not use.


macPreferences

public void macPreferences()
Deprecated. 
Internal use only. Do not use.


macOpenFile

public void macOpenFile(java.lang.String filename)
Deprecated. 
Internal use only. Do not use.

Parameters:
filename - name of file to be opened


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook