org.vishia.gral.base

## Class GralMng.GralMngFocusListener

- java.lang.Object
- - org.vishia.gral.base.GralMng.GralMngFocusListener

- Enclosing class:
    GralMng

      public class GralMng.GralMngFocusListener
      extends java.lang.Object

  This standard Gral focus listener is the base class for the common implementation layer focus listener. The both methods `focusGainedGral(GralWidget)` and `focusLostGral(GralWidget)` will be invoked with that GralWidget, which is referred by the implementation layer widgets data.
  The GralMng implementation classes should offer a focus listener for common usage, see `SwtMng.SwtMngFocusListener` and its instance `gral.swt.SwtMng.focusListener`. That reference and class is protected and therewith package visible because only swt implementations needs it. An implementation widget class can use this instance of SwtMng.focusListener immediately for standard behavior. The standard behavior is realized in this class, see `focusGainedGral(GralWidget)`.
  For enhanced functionality of a focus listener the implementation layer SwtFocusListener class can be enhanced. That is realized for example in `SwtTextFieldWrapper`. That's focus listener should update the text in the widget with the gral text store `GralWidget.DynamicData.displayedText` on focus gained, and overtake a changed content on focus lost. Adequate it is on all edit-able widgets. The SwtTextFieldWrapper.TextFieldFocusListener.focusGained(...) and focusLost(...) methods executes the special functionality. After them 'super.focusGained/Lost(ev);' is in called to execute the standard behavior.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralMngFocusListener()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `focusGainedGral(GralWidget widgg)` Standard action on focus gained: Sets the html help into the `GralMng.setApplicationAdapter(GralMngApplAdapter_ifc)` if given.
    `void` | `focusLostGral(GralWidget widgg)` Standard action on focus lost:

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

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

- - ### Constructor Detail

    - #### GralMngFocusListener

          public GralMngFocusListener()

  - ### Method Detail

    - #### focusLostGral

          public void focusLostGral(GralWidget widgg)

      Standard action on focus lost:
      Parameters:
        `widgg` -

    - #### focusGainedGral

          public void focusGainedGral(GralWidget widgg)

      Standard action on focus gained:
      - Sets the html help into the `GralMng.setApplicationAdapter(GralMngApplAdapter_ifc)` if given.
      - invokes the `GralWidget.setActionFocused(GralUserAction)` if given.
      - invokes `GralMng.notifyFocus(GralWidget)` to detect the `GralMng.getWidgetInFocus()`.
      Parameters:
        `widgg` -