jv.viewer

## Class PvControlMenu

- java.lang.Object
- - java.awt.MenuComponent
  - - java.awt.MenuBar
    - - jv.viewer.PvControlMenu

- All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

      public class PvControlMenu
      extends java.awt.MenuBar
      implements java.awt.event.ActionListener

  Menu bar of control window, created from inside PvControl. Number and state of menu items depends on whether run as application or applet.

  Use method `setEnabledMenu(int, boolean)` to switch state of single menu items. Identifiers of menu items are specified in `jv.object.PsViewerIf`.

  See Also:
    `PvControl`, `PvViewer`, `PsViewerIf`, Serialized Form
  Author:
    Konrad Polthier
  Version:
    08.10.12, 3.72 revised (kp) Some languages without existing language file disabled.
    19.09.06, 3.71 revised (kp) PDF and U3D enabled in develop version.
    11.07.06, 3.70 revised (ur) New entry PDF added.
    11.06.06, 3.60 revised (kp) Existing frames appear as menu items in the menu Window.
    30.04.06, 3.50 revised (kp) New entry U3D added.
    24.02.05, 3.40 revised (kp) New menu item to clear scene.
    26.06.03, 3.30 revised (kp) Menu for license added.
    11.03.01, 3.20 revised (kp) Menu item JVX_SMALL removed.
    12.07.02, 3.10 revised (kp) Menu for vector fields of geometry added.
    05.06.02, 3.00 revised (kp) Constructor changed, class now public.
    09.02.02, 2.70 revised (kp) Enable STL export menu.
    13.03.01, 2.60 revised (kp) Open and export of display options implemented.
    11.03.01, 2.51 revised (kp) Save choice JVX_SMALL added.
    01.05.00, 2.50 revised (sk) Internationalization added
    18.07.99, 2.10 revised (kp) Replace PsMenu by Menu and use `add()` methods to set menu fonts.
    19.06.99, 2.00 revised (kp) Identifiers moved to `PsViewerIf`.
    00.00.98, 1.02 revised (kp) Font inheritance removed.
    18.09.98, 1.01 revised (kp) Inherit font from control window.
    00.00.97, 1.00 created (kp)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PvControlMenu(PvViewer viewer, java.awt.Frame frame)` Constructor of menu bar in control window.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent event)` Handle menu events related with panels, dialog events which are forwarded to viewer and method events forwarded to the current geometry.
    `java.awt.Menu` | `add(java.awt.Menu menu)` Override `add(Menu)` to set of font of menu.
    `java.awt.MenuItem` | `add(java.awt.Menu menu, java.awt.MenuItem item)` Use this method instead of `menu.add(MenuItem)` to set of font of menu.
    `boolean` | `isMenuEnabled(int menuId)` Determine whether menu entry in menu bar of control window is enabled.
    `void` | `setEnabledMenu(int menuId, boolean cond)` Enable/disable menu entries in menu bar of control window.
    `void` | `setFont(java.awt.Font f)`

    - ### Methods inherited from class java.awt.MenuBar

      `addNotify, countMenus, deleteShortcut, getAccessibleContext, getHelpMenu, getMenu, getMenuCount, getShortcutMenuItem, remove, remove, removeNotify, setHelpMenu, shortcuts`

    - ### Methods inherited from class java.awt.MenuComponent

      `dispatchEvent, getFont, getName, getParent, getPeer, postEvent, setName, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.awt.MenuContainer

      `getFont, postEvent`

- - ### Constructor Detail

    - #### PvControlMenu

          public PvControlMenu(PvViewer viewer,
                               java.awt.Frame frame)

      Constructor of menu bar in control window. Menu item FILE_CLOSE available if frame!=null.

  - ### Method Detail

    - #### setFont

          public void setFont(java.awt.Font f)

      Overrides:
        `setFont` in class `java.awt.MenuComponent`

    - #### add

          public java.awt.Menu add(java.awt.Menu menu)

      Override `add(Menu)` to set of font of menu.
      Overrides:
        `add` in class `java.awt.MenuBar`

    - #### add

          public java.awt.MenuItem add(java.awt.Menu menu,
                                       java.awt.MenuItem item)

      Use this method instead of `menu.add(MenuItem)` to set of font of menu.

    - #### setEnabledMenu

          public void setEnabledMenu(int menuId,
                                     boolean cond)

      Enable/disable menu entries in menu bar of control window.
      Parameters:
        `menuId` - Id of menu to enable/disable, `PsViewerIf`.
        `cond` - `true` enables this menu item, otherwise disables it.
      See Also:
        `PsViewerIf`
      Version:
        16.06.04, 1.20 revised (kp) Search for menu object outsourced to getMenuItem(int).
        25.07.03, 1.10 revised (kp) Rename to setEnabledMenu() from enableMenu().

    - #### isMenuEnabled

          public boolean isMenuEnabled(int menuId)

      Determine whether menu entry in menu bar of control window is enabled.
      Parameters:
        `menuId` - Id of menu to enable/disable, `PsViewerIf`.
      Returns:
        `true` if menu is enabled.
      See Also:
        `PsViewerIf`
      Version:
        16.06.04, 1.20 revised (kp) Search for menu object outsourced to getMenuItem(int).

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent event)

      Handle menu events related with panels, dialog events which are forwarded to viewer and method events forwarded to the current geometry.
      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`
      Version:
        16.01.04, 2.20 revised (kp) Open configuration inspector if new geometry is configurable.
        24.11.02, 2.10 revised (kp) Export choice JVX_SMALL removed.
        05.06.02, 2.00 revised (kp) Moved to PvControlMenu from PvControl.
        13.03.01, 1.20 revised (kp) Import and export of display options implemented.
        11.03.01, 1.11 revised (kp) Export choice JVX_SMALL added.

"

The software JavaView? is copyright protected. All Rights Reserved.
"