Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jpicedt.ui.internal
Class PEMenuBar

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JMenuBar
                      jpicedt.ui.internal.PEMenuBar

All Implemented Interfaces:
  Accessible, EventListener, ImageObserver, MenuContainer, MenuElement, PropertyChangeListener, Serializable

public class PEMenuBar
extends JMenuBar
implements PropertyChangeListener

The main menu bar. Several `updateXXX()` methods are provided, which make it easy to keep the GUI state synchronized with the current content of the desktop (in terms e.g. of saved/dirty boards, ...)

This menubar can listen to property-change events triggered e.g. from an activated PEDrawingBoard.

Since:
  PicEdt 1.0
Version:
  $Id: PEMenuBar.java,v 1.15.2.1 2007/09/02 11:56:30 reynal Exp $
Author:
  Sylvain Reynal
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JMenuBar
`JMenuBar.AccessibleJMenuBar`

Nested classes inherited from class javax.swing.JComponent
`JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy`

Field Summary

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
`PEMenuBar()` Creates the application main menu bar

Method Summary
`JMenuItem[]` | `getMenuItems()` Return an array containing all the menu-items components attached to this menubar
`void` | `propertyChange(PropertyChangeEvent e)` Implementation of PropertyChangeListener interface Allows this menu-bar to get notified of change from the target EditorKit, e.g.
`void` | `updateAccelerators()` Update JMenuItem's accelerators from the key/value pairs stored in JPicEdt's preferences
`void` | `updateFragmentsMenu()` Updates the "fragments" menu items
`void` | `updateMenuBar()` Update the content (i.e.
`void` | `updateRecentFilesSubmenu()` Updates the "recent files" sub-menu items after a frame was saved or opened.
`void` | `updateScriptsMenu()` Updates the "script" menu items
`void` | `updateUndoRedoMenus(String undoName, String redoName)` update "undo" and "redo" text
`void` | `updateWindowMenu()` Updates the Window menu as soon as an internal frame is opened or closed (this menu keeps tracks of every open internal frames so that the user can activate them quickly by use of a shortcut)

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, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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`

Constructor Detail

### PEMenuBar

    public PEMenuBar()
              throws MissingResourceException

  Creates the application main menu bar

Method Detail

### getMenuItems

    public JMenuItem[] getMenuItems()

  Return an array containing all the menu-items components attached to this menubar

### updateAccelerators

    public void updateAccelerators()

  Update JMenuItem's accelerators from the key/value pairs stored in JPicEdt's preferences

### updateMenuBar

    public void updateMenuBar()

  Update the content (i.e. PEMenu's) of the menu-bar depending on the current state of the MDIManager.

### updateRecentFilesSubmenu

    public void updateRecentFilesSubmenu()

  Updates the "recent files" sub-menu items after a frame was saved or opened.

  Since:
    PicEdt 1.1

### updateScriptsMenu

    public void updateScriptsMenu()

  Updates the "script" menu items

  Since:
    jpicedt 1.3.2

### updateFragmentsMenu

    public void updateFragmentsMenu()

  Updates the "fragments" menu items

  Since:
    jpicedt 1.3.2

### updateUndoRedoMenus

    public void updateUndoRedoMenus(String undoName,
                                    String redoName)

  update "undo" and "redo" text

  Since:
    jpicedt 1.3.2

### updateWindowMenu

    public void updateWindowMenu()
                          throws MissingResourceException

  Updates the Window menu as soon as an internal frame is opened or closed (this menu keeps tracks of every open internal frames so that the user can activate them quickly by use of a shortcut)

  Throws:
    `MissingResourceException`
  Since:
    PicEdt 1.1

### propertyChange

    public void propertyChange(PropertyChangeEvent e)

  Implementation of PropertyChangeListener interface Allows this menu-bar to get notified of change from the target EditorKit, e.g. when a right-click switches the current EditorKit's mousetool back to "select-tool", or when a new mousetool gets selected from the "Tools" palette or from a BSH script.

  This DockablePanel gets registered as a PropertyChangeListener (with events sourced from EditorKit's) from inside MDIManager whenever a new Board is added.

  Specified by:
    `propertyChange` in interface `PropertyChangeListener`
  Parameters:
    `e` - the PropertyChangeEvent ; only the "getNewValue()" method is used here.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug : syd@jpicedt.org