Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## devisor2.grid.GUI.framework
Class MainMenu

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JMenuBar
                      devisor2.grid.GUI.framework.MainMenu

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.MenuElement, java.io.Serializable

public class MainMenu
extends javax.swing.JMenuBar

Defines the main menu of the MainFrame
It is connected to the application via the MainFrame reference, and functionality is available via the ActionCommands declared in the MainActionListener class.
Note: The accelerators can be changed by the user (without re-compiling) in the OptionsDialog class, therefore, if more functionality is subsequently added to the application, more accelerators have to be registered with the Options class and the corresponding Action Listener of the dialog mentioned above. Note that only accelerators are accepted by the mentioned dialog whose keys start with the prefix accelerator_. These keys are declared in the Options class.
The mnemonics are part of the locale support class, therefore, the Locale_xx_yy class has to be edited and recompiled if mnemonics are going to be altered.
Summary: To add one new menu item, do the following:
(1) create two new entries in the Locale class, one for the caption and one for the mnemonic
(2) create a new ActionCommand constant for the item in the MainActionListener class
(3) add one if - block with the new ActionCommand to the MainActionListener's actionPerformed method
(4) create a new accelerator constant in the Options class, remember it has to start with the prefix accelelator_
(5) add a default value for this in the Options class' initDefaults method
(6) add an entry for it in the Options class' isAlreadyAccelerator method
(7) use all these constants to create the new item, see below how this is accomplished (basic swing menu creation)
(8) add your entry to the setAccelerators method (in this class)

See Also:
  Serialized Form

Nested Class Summary

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

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

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

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.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
`MainMenu(MainFrame parent)` sets up a new instance of the MainMenu including all submenus

Method Summary
`javax.swing.JCheckBoxMenuItem` | `getCopymodeItem()`
`javax.swing.JCheckBoxMenuItem` | `getDirectInputItem()`
`javax.swing.JCheckBoxMenuItem` | `getEdgeStatusItem()`
`javax.swing.JCheckBoxMenuItem` | `getMirrorItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewCircleMItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewCirclePItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewLineItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewMacroItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewMultiLineItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewNodeItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewQuadItem()`
`javax.swing.JCheckBoxMenuItem` | `getNewTriItem()`
`javax.swing.JCheckBoxMenuItem` | `getParallelBlockItem()`
`javax.swing.JCheckBoxMenuItem` | `getPasteItem()`
`javax.swing.JCheckBoxMenuItem` | `getRectifyElementItem()`
`javax.swing.JCheckBoxMenuItem` | `getRefineItem()`
`javax.swing.JCheckBoxMenuItem` | `getSelectEdgesItem()`
`javax.swing.JCheckBoxMenuItem` | `getSelectElementsItem()`
`javax.swing.JCheckBoxMenuItem` | `getSelectNodesItem()`
`javax.swing.JCheckBoxMenuItem` | `getSelectSegmentsItem()`
`javax.swing.JCheckBoxMenuItem` | `getSetZoomItem()`
`javax.swing.JCheckBoxMenuItem` | `getViewPropertiesItem()`
`javax.swing.JCheckBoxMenuItem` | `getZoomPlusItem()`
`void` | `setAccelerators()` sets corresponding accelerators of all menu entries to the value stored in the global current Options instance

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

### MainMenu

    public MainMenu(MainFrame parent)

  sets up a new instance of the MainMenu including all submenus

Method Detail

### setAccelerators

    public void setAccelerators()

  sets corresponding accelerators of all menu entries to the value stored in the global current Options instance

### getPasteItem

    public javax.swing.JCheckBoxMenuItem getPasteItem()

### getCopymodeItem

    public javax.swing.JCheckBoxMenuItem getCopymodeItem()

### getSetZoomItem

    public javax.swing.JCheckBoxMenuItem getSetZoomItem()

### getZoomPlusItem

    public javax.swing.JCheckBoxMenuItem getZoomPlusItem()

### getSelectNodesItem

    public javax.swing.JCheckBoxMenuItem getSelectNodesItem()

### getSelectElementsItem

    public javax.swing.JCheckBoxMenuItem getSelectElementsItem()

### getSelectSegmentsItem

    public javax.swing.JCheckBoxMenuItem getSelectSegmentsItem()

### getSelectEdgesItem

    public javax.swing.JCheckBoxMenuItem getSelectEdgesItem()

### getViewPropertiesItem

    public javax.swing.JCheckBoxMenuItem getViewPropertiesItem()

### getDirectInputItem

    public javax.swing.JCheckBoxMenuItem getDirectInputItem()

### getNewLineItem

    public javax.swing.JCheckBoxMenuItem getNewLineItem()

### getNewMultiLineItem

    public javax.swing.JCheckBoxMenuItem getNewMultiLineItem()

### getNewCirclePItem

    public javax.swing.JCheckBoxMenuItem getNewCirclePItem()

### getNewCircleMItem

    public javax.swing.JCheckBoxMenuItem getNewCircleMItem()

### getNewTriItem

    public javax.swing.JCheckBoxMenuItem getNewTriItem()

### getNewQuadItem

    public javax.swing.JCheckBoxMenuItem getNewQuadItem()

### getNewMacroItem

    public javax.swing.JCheckBoxMenuItem getNewMacroItem()

### getNewNodeItem

    public javax.swing.JCheckBoxMenuItem getNewNodeItem()

### getEdgeStatusItem

    public javax.swing.JCheckBoxMenuItem getEdgeStatusItem()

### getParallelBlockItem

    public javax.swing.JCheckBoxMenuItem getParallelBlockItem()

### getRectifyElementItem

    public javax.swing.JCheckBoxMenuItem getRectifyElementItem()

### getRefineItem

    public javax.swing.JCheckBoxMenuItem getRefineItem()

### getMirrorItem

    public javax.swing.JCheckBoxMenuItem getMirrorItem()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD