org.vishia.gral.base

## Class GralShowMethods

- java.lang.Object
- - org.vishia.gral.base.GralShowMethods

-     public class GralShowMethods
      extends java.lang.Object

  This class contains some standard `GralUserAction` for widgets. The show methods can be used by giving its name with `GralWidget#setShowMethod(String)` in the configuration of any widget. The show method may use parameter given with `GralWidget.setDataPath(String)` or alternatively with parameter of the show method, for example:

       myWidget.setShowMethod("showBool(datapath, green, red)";

  The string given parameters should be separated with a colon. They are evaluated by first calling the show method. The show method can be configured in a script, see `GralCfgZbnf`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GralUserAction` | `action_openHelp` This userAction can be used by name (calling `#addFocusAction(String, GralUserAction, String, String)` to set a variable when an input field is leaved.
    `GralUserAction` | `action_openWindow` This userAction can be used by name (calling `#addFocusAction(String, GralUserAction, String, String)` to set a variable when an input field is leaved.
    `private java.lang.String` | `getParams`
    `GralUserAction` | `setBar` Shows the back color of the widget depending on the boolean value of a variable.
    `GralUserAction` | `showBackColor` Shows the back color of the widget depending on the boolean value of the associated variable.
    `GralUserAction` | `syncVariableOnFocus` This userAction can be used by name (calling `#addFocusAction(String, GralUserAction, String, String)` to set a variable when an input field is leaved.
    `protected VariableContainer_ifc` | `variableContainer` Common aggregation to variables.
    `static int` | `version` Version, history and license.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralShowMethods(VariableContainer_ifc container)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `registerShowMethods(GralMngBuild_ifc mng)`

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

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

- - ### Field Detail

    - #### version

          public static final int version

      Version, history and license.
      - 2014-01-15 Hartmut chg: `showBackColor` stores the value which is used in `GralWidget.getFloatValue()` (dyda).
      - 2013-03-13 Hartmut new `setBar` for a `GralValueBar`
      - 2012-06-00 Hartmut created as common container for methods for different widgets.
      Copyright/Copyleft:
      For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid. It means:
      1. You can use this source without any restriction for any desired purpose.
      2. You can redistribute copies of this source to everybody.
      3. Every user of this source, also the user of redistribute copies with or without payment, must accept this license for further using.
      4. But the LPGL is not appropriate for a whole software product, if this source is only a part of them. It means, the user must publish this part of source, but doesn't need to publish the whole source of the own product.
      5. You can study and modify (improve) this source for own using or for redistribution, but you have to license the modified sources likewise under this LGPL Lesser General Public License. You mustn't delete this Copyright/Copyleft inscription in this source file.
      If you intent to use this source without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

    - #### getParams

          private java.lang.String getParams

    - #### variableContainer

          protected final VariableContainer_ifc variableContainer

      Common aggregation to variables.

    - #### showBackColor

          public final GralUserAction showBackColor

      Shows the back color of the widget depending on the boolean value of the associated variable. The params[0] of exec should be an `VariableAccess_ifc` instance from which the value is read. It is because the routine is called as show method in `GralWidget.refreshFromVariable(VariableContainer_ifc)`. The colors should be part of the textual arguments of the show method given in `GralWidget.setActionShow(GralUserAction, String[])`. That textual colors are converted and stored in `GralWidget.ConfigData.showParam`.
      The value which is read from the variable is stored in `GralWidget.DynamicData.fValue` for further using, for example for a change action (on mouse pressed etc. ). param of exec should be a VariableAccess_ifc-instance. The int value 0, 1, ... is used to select one of the back colors.

    - #### setBar

          public final GralUserAction setBar

      Shows the back color of the widget depending on the boolean value of a variable. param of exec should be a VariableAccessWithIdx-instance. The variable value 0, 1, ... is used to select one of the back colors.

    - #### syncVariableOnFocus

          public final GralUserAction syncVariableOnFocus

      This userAction can be used by name (calling `#addFocusAction(String, GralUserAction, String, String)` to set a variable when an input field is leaved.

    - #### action_openWindow

          public final GralUserAction action_openWindow

      This userAction can be used by name (calling `#addFocusAction(String, GralUserAction, String, String)` to set a variable when an input field is leaved.

    - #### action_openHelp

          public final GralUserAction action_openHelp

      This userAction can be used by name (calling `#addFocusAction(String, GralUserAction, String, String)` to set a variable when an input field is leaved.

  - ### Constructor Detail

    - #### GralShowMethods

          public GralShowMethods(VariableContainer_ifc container)

  - ### Method Detail

    - #### registerShowMethods

          public void registerShowMethods(GralMngBuild_ifc mng)