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

- - ### Constructor Summary

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

  - ### Method Summary

    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.

    - ### 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, setFont, 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

    - #### 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`

    - #### 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`

    - #### 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`

"

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