org.vishia.gral.base

## Class GralMenu._GraphicImpl

- java.lang.Object
- - org.vishia.gral.base.GralMenu._GraphicImpl

- Direct Known Subclasses:
    AwtMenu, SwtMenu
  Enclosing class:
    GralMenu

      public abstract class GralMenu._GraphicImpl
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected GralWidget` | `widgg`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `_GraphicImpl(GralWidget widgg)` Creates a new menu wrapper.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `_implMenu()` Creates all necessary new implementation instances for this GralMenu.
    `private void` | `_implMenu(java.lang.Object parentMenu, java.util.Map<java.lang.String,GralMenu.MenuEntry> menusP)`
    `protected abstract void` | `_implMenuItem(java.lang.Object oParentMenu, GralMenu.MenuEntry gralEntry)` This method should be implemented in the implementation layer.
    `abstract java.lang.Object` | `getMenuImpl()` Returns the implementation instance for the menu.
    `abstract void` | `setVisible()` Deprecated. The `GralWidget.getContextMenu()` creates a menu for the graphic implementation layer widget and assigns it to the widget as GralMenu. The GralMenu has the association `widgg` to the widget already. In the adequate case `GralWindow.getMenuBar()` adds the menu to the window and stores the window's reference in `widgg`. That is proper to use. This method was create before the `widgg` are set in this constructor.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### widgg

          protected final GralWidget widgg

  - ### Constructor Detail

    - #### _GraphicImpl

          protected _GraphicImpl(GralWidget widgg)

      Creates a new menu wrapper. This is called as super(widgg, mng) in the derived class.
      Parameters:
        `widgg` - The gral widget which is the parent. If it is a context menu it is that widget where `GralWidget.getContextMenu()` was called. If it is is a menu bar, the window is used.
        `mng` - The mng

  - ### Method Detail

    - #### _implMenu

          public final void _implMenu()

      Creates all necessary new implementation instances for this GralMenu.

    - #### _implMenu

          private final void _implMenu(java.lang.Object parentMenu,
                                       java.util.Map<java.lang.String,GralMenu.MenuEntry> menusP)

    - #### _implMenuItem

          protected abstract void _implMenuItem(java.lang.Object oParentMenu,
                                                GralMenu.MenuEntry gralEntry)

      This method should be implemented in the implementation layer.
      Parameters:
        `oParentMenu` -
        `gralEntry` -

    - #### setVisible

          @Deprecated
          public abstract void setVisible()

      Deprecated. The `GralWidget.getContextMenu()` creates a menu for the graphic implementation layer widget and assigns it to the widget as GralMenu. The GralMenu has the association `widgg` to the widget already. In the adequate case `GralWindow.getMenuBar()` adds the menu to the window and stores the window's reference in `widgg`. That is proper to use. This method was create before the `widgg` are set in this constructor.
      Adds with a given widget. Note the widget is in difference with the `widgg` of the constructor. Check what is happen. Therefore:
      Parameters:
        `widggMenu` - the widget can be used to add any `GralWidget.setContentInfo(Object)` etc. It is provided in the action method.
        `name` -
        `sMenuPath` -
        `action` -

    - #### getMenuImpl

          public abstract java.lang.Object getMenuImpl()

      Returns the implementation instance for the menu.