org.vishia.gral.base

## Class GralWidget.DynamicData

- java.lang.Object
- - org.vishia.gral.base.GralWidget.DynamicData

- Enclosing class:
    GralWidget

      public static final class GralWidget.DynamicData
      extends java.lang.Object

  This inner class holds the dynamic data of a widget. This data are existent for any widget independent of its type. It can be used in a specific way depending on the widget type.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GralColor` | `backColor` Three colors for background, line and text should be convert to the platforms color and used in the paint routine.
    `GralColor` | `backColorNoFocus` Three colors for background, line and text should be convert to the platforms color and used in the paint routine.
    `protected boolean` | `bTextChanged` Set to true from any listener of the implementation level if the data of the widget was changed from GUI handling.
    `protected boolean` | `bTouchedField` Set to true from any listener of the implementation level if the cursor in the widget is moved or such GUI handling.
    `java.lang.String` | `displayedText` A text to display.
    `float` | `fValue`
    `float[]` | `fValues`
    `GralColor` | `lineColor` Three colors for background, line and text should be convert to the platforms color and used in the paint routine.
    `long` | `lValue` If a long or int value is given, it is stored here.
    `float` | `maxValue`
    `float` | `minValue`
    `java.lang.Object[]` | `oValues` Any specific value.
    `GralColor` | `textColor` Three colors for background, line and text should be convert to the platforms color and used in the paint routine.
    `GralFont` | `textFont` It depends of the pixel size.
    `java.lang.Object` | `userData`
    `java.lang.Object` | `visibleInfo`
    `private java.util.concurrent.atomic.AtomicInteger` | `whatIsChanged` 32 bit what is changed, see `GralWidget#chgColorText` etc.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DynamicData()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acknChanged(int mask)` Resets what is changed, Bits defined in `GralWidget.ImplAccess.chgColorBack` etc.
    `int` | `getChanged()` Returns the bits what is changed.
    `void` | `setChanged(int mask)` Sets what is changed, Bits defined in `GralWidget.ImplAccess.chgColorBack` etc.

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

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

- - ### Field Detail

    - #### whatIsChanged

          private java.util.concurrent.atomic.AtomicInteger whatIsChanged

      32 bit what is changed, see `GralWidget#chgColorText` etc. TODO should be protected.

    - #### backColor

          public GralColor backColor

      Three colors for background, line and text should be convert to the platforms color and used in the paint routine. If this elements are null, the standard color should be used.

    - #### backColorNoFocus

          public GralColor backColorNoFocus

      Three colors for background, line and text should be convert to the platforms color and used in the paint routine. If this elements are null, the standard color should be used.

    - #### lineColor

          public GralColor lineColor

      Three colors for background, line and text should be convert to the platforms color and used in the paint routine. If this elements are null, the standard color should be used.

    - #### textColor

          public GralColor textColor

      Three colors for background, line and text should be convert to the platforms color and used in the paint routine. If this elements are null, the standard color should be used.

    - #### textFont

          public GralFont textFont

      It depends of the pixel size. Therefore set after setToPanel, if GralMng is known.

    - #### displayedText

          public java.lang.String displayedText

      A text to display.

    - #### oValues

          public java.lang.Object[] oValues

      Any specific value.

    - #### fValue

          public float fValue

    - #### minValue

          public float minValue

    - #### maxValue

          public float maxValue

    - #### lValue

          public long lValue

      If a long or int value is given, it is stored here.

    - #### visibleInfo

          public java.lang.Object visibleInfo

    - #### userData

          public java.lang.Object userData

    - #### fValues

          public float[] fValues

    - #### bTouchedField

          protected boolean bTouchedField

      Set to true from any listener of the implementation level if the cursor in the widget is moved or such GUI handling. Then the content won't be overridden by `GralWidget.setText(CharSequence)` furthermore till the focus is left.

    - #### bTextChanged

          protected boolean bTextChanged

      Set to true from any listener of the implementation level if the data of the widget was changed from GUI handling. If the data are changed from any Gral method invocation, this bit should not set to true. For example a key listener changes the content of a text edit field, then this bit should be set. This bit should be cleared if the GUI-content of the widget is synchronized with the widget data cells. Note that the GUI-content of a widget can be changed only in the GUI thread, whereby the content of the `GralWidget.dyda` can be read and write in any threat. This bit helps to synchronize.

  - ### Constructor Detail

    - #### DynamicData

          public DynamicData()

  - ### Method Detail

    - #### setChanged

          public void setChanged(int mask)

      Sets what is changed, Bits defined in `GralWidget.ImplAccess.chgColorBack` etc.
      Parameters:
        `mask` - one bit or some bits. ImplAccess.chgXYZ

    - #### getChanged

          public int getChanged()

      Returns the bits what is changed. All bits which were evaluated should be acknowledged via `acknChanged(int)`
      Returns:

    - #### acknChanged

          public void acknChanged(int mask)

      Resets what is changed, Bits defined in `GralWidget.ImplAccess.chgColorBack` etc. This routine should be called in the paint routine whenever the change was succeeded.
      Parameters:
        `mask` - one bit or some bits. ImplAccess.chgXYZ