com.quadrique.jbuildingblocks.gui
Class MenuBarBase
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JMenuBar
com.quadrique.jbuildingblocks.gui.MenuBarBase
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, MenuElement
public class MenuBarBase
- extends JMenuBar
A generic menu bar
- Author:
- Hervé Rivere
- See Also:
- Serialized Form
|
Method Summary |
JMenuItem |
addAction(JMenu zMenu,
ActionBase zAction)
|
void |
addHelpContentMenuItem(JMenu zMenu,
String zMenuItemText,
String zMenuItemToolTip,
int zMenuItemMnemonic,
KeyStroke zMenuItemAccelerator,
String zMenuItemIconFileName)
This method add a "Help Contents" item to the given menu. |
void |
addHelpWhatIsThisMenuItem(JMenu zMenu,
String zMenuItemText,
String zMenuItemToolTip,
int zMenuItemMnemonic,
KeyStroke zMenuItemAccelerator,
String zMenuItemIconFileName)
This method add a "Help What's This ?" item to the given menu. |
JMenu |
addMenu(String zText,
int zMnemonic)
|
JMenu |
addMenu(String zText,
int zMnemonic,
ActionBase[] zActions)
add a menu with a list of menu items
each menu item is associated to a given action |
JMenu |
addMenu(String zText,
int zMnemonic,
String zIconFileName)
|
| Methods inherited from class javax.swing.JMenuBar |
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, 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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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 |
MenuBarBase
public MenuBarBase()
throws Exception
- Constructor
- Throws:
Exception - if an error occurs
addMenu
public JMenu addMenu(String zText,
int zMnemonic)
throws Exception
- Parameters:
zText - the text to use for the tile of the menu (e.g. "File")zMnemonic - the menmonic to use for the menu title (e.g. KeyEvent.VK_F)
- Returns:
- the newly created JMenu
- Throws:
Exception - if an error occurs
addMenu
public JMenu addMenu(String zText,
int zMnemonic,
String zIconFileName)
throws Exception
- Parameters:
zText - the text to use for the tile of the menu (e.g. "File")zMnemonic - the menmonic to use for the menu title (e.g. KeyEvent.VK_F)zIconFileName - the file name for the icon
- Returns:
- the newly created JMenu
- Throws:
Exception - if an error occurs
addAction
public JMenuItem addAction(JMenu zMenu,
ActionBase zAction)
throws Exception
- Parameters:
zMenu - the menuzAction - the action to add to the menu
- Returns:
- the newly created menuitem associated to the action
- Throws:
Exception - if an error occurs
addHelpContentMenuItem
public void addHelpContentMenuItem(JMenu zMenu,
String zMenuItemText,
String zMenuItemToolTip,
int zMenuItemMnemonic,
KeyStroke zMenuItemAccelerator,
String zMenuItemIconFileName)
throws Exception
- This method add a "Help Contents" item to the given menu.
Upon activation, the online help window is displayed and the default global topic is displayed
- Parameters:
zMenu - the menuzMenuItemText - the text to use for the itemzMenuItemToolTip - the tooltip to use for the itemzMenuItemMnemonic - the menmonic to use (e.g. KeyEvent.VK_P for the letter 'P')zMenuItemAccelerator - the keystroke to use as an accelerator (KeyStroke.getKeyStroke(KeyEvent.VK_F1,InputEvent.CTRL_MASK) for Control-F1)zMenuItemIconFileName - the icon file name (use null if no icon is to be associated to the item)
- Throws:
Exception - if an error occurs
addHelpWhatIsThisMenuItem
public void addHelpWhatIsThisMenuItem(JMenu zMenu,
String zMenuItemText,
String zMenuItemToolTip,
int zMenuItemMnemonic,
KeyStroke zMenuItemAccelerator,
String zMenuItemIconFileName)
throws Exception
- This method add a "Help What's This ?" item to the given menu.
Upon activation, the cursor is modified and upon selection of a compoent,
the corresponding context sensitive online help is displayed
- Parameters:
zMenu - the menuzMenuItemText - the text to use for the itemzMenuItemToolTip - the tooltip to use for the itemzMenuItemMnemonic - the menmonic to use (e.g. KeyEvent.VK_P for the letter 'P')zMenuItemAccelerator - the keystroke to use as an accelerator (KeyStroke.getKeyStroke(KeyEvent.VK_F1,InputEvent.CTRL_MASK) for Control-F1)zMenuItemIconFileName - the icon file name (use null if no icon is to be associated to the item)
- Throws:
Exception - if an error occurs
addMenu
public JMenu addMenu(String zText,
int zMnemonic,
ActionBase[] zActions)
throws Exception
- add a menu with a list of menu items
each menu item is associated to a given action
- Parameters:
zText - the text of the menu title (e.g. "File")zMnemonic - the menmonic to use for the menu title (e.g. KeyEvent.VK_F)zActions - an array of action, one for each menu item. Use null in the arry to incoporate a separator.
- Returns:
- the newly created menu
- Throws:
Exception - if an error occurs
Copyright © 2001-2009 Quadrique Corporation. All Rights Reserved.