org.vishia.gral.base

## Class GralWidget

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

- All Implemented Interfaces:
    GetGralWidget_ifc, GralSetValue_ifc, GralWidget_ifc, Removeable
  Direct Known Subclasses:
    GralButton, GralCurveView, GralFileSelector, GralHorizontalSelector, GralHtmlBox, GralLabel, GralLed, GralPanelContent, GralPlotArea, GralSlider, GralTable, GralTextField, GralValueBar

      public class GralWidget
      extends java.lang.Object
      implements GralWidget_ifc, GralSetValue_ifc, GetGralWidget_ifc

  This class is the base class of representation of a graphical widget in the gral concept. All widgets in the gral concept have this base data independent of the implementation graphic. The implementation graphic should have a wrapper class inherited from `GralWidget.ImplAccess` which contains specials of the implementation and refers the widget of the implementation layer graphic, for example a text field.
  Any widget is represented in the user's level by a derived instance of a `GralWidget`. There are 2 strategies yet to create widgets in respect to the graphical implementation. Either the Widget is created independent of the graphic implementation first and then taken as parameter for the graphic widget-creating method. In this case the GralWidget contains nothing of the graphic implementation but has a reference to it. The second strategy yet is, the Widget is returned by the graphic-implementation widget-creating method as a instance which has `GralWidget` and its non-graphic specializations as super class and the graphic depending parts in the created instance.
  The first form is more universal. Especially generic can be used for the class definition if necessary. It us used yet only (2013-06) for
  - `setToPanel(GralMngBuild_ifc)`
  - `setToPanel(GralMngBuild_ifc)`.
  but it may be used more and more in the future. The `setToPanel(GralMng)` method invokes the graphic implementation specific derivation of the `GralMng`, which creates the implementation widgets.
  For the UML presentation see `Docu_UML_simpleNotation`:

         GralHorizontalSelector< UserType > <-----<*>UserCanCreateIt_GraphicIndependently
         - some special non-graphic data
           |
           |<------------------------------------------------------------------data---|
           |                                                                          |
           |&<--------&GraphicImplAccess<|---+                                        |
           |                                 |                                        |
           +--|>GralWidget                   |                                        |
           |     |                           |                                        |
           |     |<>--->GralWidgImpl_ifc<|---+--SwtHorizontalSelector                 |
           |     |                                 |                                  |
           |     |                                 |                                  |
                                                   |<*>------------------------>swt.Canvas
                                                   |                                  |
                                                   |                                  |
                                                -paintRoutine <-------paintListener---|
                                                -mouseListener<-------mouseListener---|
                                                -etc.

  The user creates an instance of `GralHorizontalSelector` in any thread maybe as composite, it is independent of the graphic itself. Then the user builds its graphic appearance with invocation of `setToPanel(GralMngBuild_ifc)` with the derived instance of `GralMng` as parameter.
  The `GralWidget` knows the graphic implementation via the `GralWidgImpl_ifc` to invoke some methods for the graphical appearance. The interface is independent of the implementation itself. The implementor of this interface for this example is the `SwtHorizontalSelector` implements this methods.
  The SwtHorizontalSelector refers the platform-specific widget Object (Swing: javax.swing.JComponent, org.eclipse.swt.widgets.Control etc.), in this case a `Canvas`. It contains the special paint routines, mouse handling etc.
  The platform-specific widget has a reference to the GralWidget, in this case the `GralHorizontalSelector` stored as Object-reference. This reference can be used in the paintRoutine, mouseListerner etc. to get information about the GralWidget.
  The second form takes most of the characteristics as parameters for the creating method. It needs inheritance.

         GralButton <-------UserCanAssociate it but can't create the instance with constructor.
             |
             |-------------|>SwtButton

  The instance is Graphic-Implementation-specific and it is created with this interface as factory:
  `#addButton(String, GralUserAction, String)`.
  The ObjectModelDiagram may shown the relations:
  In this graphic the relationship between this class and the graphical implementation layer widget is shown with the example 'text field' in SWT:
  - The class `GralTextField` is the derived class of this to represent a text field in an implementation independent way.
  - The class `SwtTextFieldWrapper` is the implementor for the GralTextField for SWT graphic.
  - That implementor knows is SWT-specific and refers the SWT widget `Text` It based on the SWT-specific `Widget`.
  The implementation layer widget should to be deal with this GralWidget because of some overridden methods of the implementation layer widget need that. The general contract is, that the implementation layer widget refers this GralWidget in its commonly user data field. For SWT it is `Widget.setData(Object)` method.
  The Widget knows its `GralPos` at its panel where it is placed. The panel knows all widgets which are placed there (widgetList).
  Change a widget from application in any thread:
  The user can invoke the methods of the widget to animate it in a GUI etc, for example `setBackColor(GralColor, int)` or `setValue(int, int, Object)`. This methods can be called in any thread. This concept is described with the method `setText(CharSequence)`, appropriate for all set methods.
  Concept of data binding
  2012-05-19
  A widget has 2 associations: `variable` and `variables` to a management class `VariableAccessWithIdx` which knows the user data via a commonly `VariableAccess_ifc`. The data can be existing in the user space with this interface. That part of user software doesn't know the graphical view of the data. The graphical part of software calls any refresh of showing, it calls the method `refreshFromVariable(VariableContainer_ifc)` for all visible widgets. With this the widget gets the data from user with the variable associations and prepares it for the proper appearance depending on the kind of widget, format String etc.
  The association to the correct variable is given only with a String as argument of the `setDataPath(String)` method. The variable is found with the second interface `VariableContainer_ifc` which should be known by the graphical part of software and which is one parameter of the `refreshFromVariable(VariableContainer_ifc)` method. The conclusion between the String given variable name or path and the data can be supplied in any form in the users software, which knows the data.
  The data can be coming from any remote device. In that kind there are two ways to get the actually values:
  1. There is a cyclically communication. The remote device sends all data in a cycle maybe some 100 milliseconds. Then the actual data are present. The superior control should be call the `refreshFromVariable(VariableContainer_ifc)`-method if the data are received yet or in any other proper cycle.
  2. The data are requested from the remote device only if they are need either for displaying in widgets of for other reasons. This kind of data holding are proper especially if they are a lot of data, not all of them should be communicated any time.
  For the second approach a time of actuality and a time of requesting are used. The method `requestNewValueForVariable(long)` can be used to force communication.
  Strategy of changing the graphical content of a widget:
  See `GralWidget_ifc`
  Strategy to create widgets and positioning: see `GralMng.GralMngFocusListener`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `GralWidget.ActionChangeSelect`
    `static class` | `GralWidget.ConfigData` This class holds common configuration data for widgets.
    `static class` | `GralWidget.DynamicData` This inner class holds the dynamic data of a widget.
    `static class` | `GralWidget.ImplAccess` Methods which should be called back by events of the implementation layer.

    - ### Nested classes/interfaces inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `GralWidget_ifc.ActionChange, GralWidget_ifc.ActionChangeWhen`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GralWidget.ImplAccess` | `_wdgImpl` The implementation specific widget.
    `private GralPos` | `_wdgPos` The position of the widget.
    `protected boolean` | `bEditable` Set to true on `setEditable(boolean)`.
    `protected boolean` | `bHasFocus` Set on focus gained, false on focus lost.
    `protected boolean` | `bShouldInitialize` If this bit is true on an edit field, it should be initialized.
    `protected GralMngBuild_ifc` | `buildMng`
    `protected boolean` | `bVisibleState` Set true if its shell, tab card etc is be activated.
    `GralWidget.ConfigData` | `cfg` Reference to the common configuration data for widgets.
    `protected GralMenu` | `contextMenu` If not null, it is the right-mouse-button menu for this widget.
    `private int` | `dataIx` An index associated to the data.
    `protected long` | `dateUser`
    `protected GralWidget.DynamicData` | `dyda`
    `protected java.lang.String` | `htmlHelp` The relative path to a html help label (maybe an URL, or file, or file with label).
    `private GralWidgetCfg_ifc` | `itsCfgElement` Association to the configuration element from where this widget was built.
    `protected GralMng` | `itsMng` The widget manager from where the widget is organized.
    `(package private) long` | `lastTimeSetVisible` The time when the bVisible state was changed.
    `java.lang.String` | `name` Name of the widget in the panel.
    `private java.lang.Object` | `oContentInfo` Any special info, may be set from any user class.
    `protected int` | `repaintDelay` Standard delay to repaint if `repaint()` is called without arguments.
    `protected int` | `repaintDelayMax` Standard delay to repaint if `repaint()` is called without arguments.
    `private GralGraphicTimeOrder` | `repaintRequ` This time order calls the `#repaintGthread()` in the graphical thread.
    `java.lang.String` | `sCmd` Any widget can have a command String, which can be quest for example in an action.
    `private java.lang.String` | `sDataPath` Textual informations about content.
    `protected java.lang.String` | `sFormat` Textual info about representation format.
    `java.lang.String` | `sToolTip`
    `static java.lang.String` | `sVersion` Version, history and license.
    `private VariableAccess_ifc` | `variable` One variable which is associated with this widget.
    `private java.util.List<VariableAccess_ifc>` | `variables` More as one variable which are associated with this widget.
    `char` | `whatIs` numeric info what to do (kind of widget).
    `private static GralWidget_ifc.ActionChangeWhen[]` | `whenAll`

    - ### Fields inherited from interface org.vishia.gral.ifc.GralSetValue_ifc

      `version`

    - ### Fields inherited from interface org.vishia.gral.base.GetGralWidget_ifc

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralWidget(java.lang.String sPosName, char whatIs)` Creates a widget.
    `GralWidget(java.lang.String sName, char whatIs, GralMng mng)` Deprecated.
    `GralWidget(java.lang.String pos, java.lang.String name, char whatIs)` Deprecated. since 2016-09: The idea is: Use always one String for "@pos=name".

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `chgPos(GralPos newPos)`
    `void` | `clearShowParam()` Clear the parameter if they are over-taken already.
    `void` | `createImplWidget_Gthread()` Standard implementation of @see org.vishia.gral.ifc.GralWidget_ifc#setToPanel() Only large widgets (contains more as one GralWidget) should override this method.
    `GralWidget_ifc.ActionChange` | `getActionChange(GralWidget_ifc.ActionChangeWhen when)` Gets the action to execute on changing a widget.
    `GralWidget_ifc.ActionChange` | `getActionChangeStrict(GralWidget_ifc.ActionChangeWhen when, boolean strict)` Gets the action to execute on changing a widget.
    `GralUserAction` | `getActionDrag()`
    `GralUserAction` | `getActionDrop()`
    `GralUserAction` | `getActionFocused()`
    `GralUserAction` | `getActionShow()` Gets the action to show the widget.
    `GralColor` | `getBackColor(int ix)` Gets the background color for the widget.
    `GralWidgetCfg_ifc` | `getCfgElement()`
    `java.lang.String` | `getCmd()` Any widget can have a command String, which can be quest for example in an action.
    `java.lang.String` | `getCmd(int option)` Get the command string from the `setCmd(String)` with choice of an option.
    `long` | `getContentIdent()` Gets the content identification of the users data which are set with `GralWidget_ifc.setContentIdent(long)`.
    `java.lang.Object` | `getContentInfo()` Deprecated. use `getData()`
    `GralMenu` | `getContextMenu()` Gets the context menu to add a menu item.
    `java.lang.Object` | `getData()` Gets the application specific info.
    `int` | `getDataIx()`
    `java.lang.String` | `getDataPath()` Gets the data path.
    `java.lang.String` | `getDataPath(java.lang.String sDataPath)` Changes the data path
    `float` | `getFloatValue()` Gets the float attribute value of this widget.
    `java.lang.String` | `getFormat()`
    `GralWidget` | `getGralWidget()` Returns this.
    `java.lang.String` | `getHtmlHelp()`
    `GralWidget.ImplAccess` | `getImpl()` Returns the instance which extends the `GralWidget.ImplAccess` of this widget.
    `GralPanelContent` | `getItsPanel()` Gets the panel where the widget is member of.
    `float` | `getLongValue()` Gets the float attribute value of this widget.
    `java.lang.String` | `getName()`
    `java.lang.String` | `getShowMethod()`
    `java.lang.String[]` | `getShowParam()` Returns the parameter of the show method.
    `java.lang.String` | `getsToolTip()`
    `java.lang.String` | `getText()` Get the text of this widget.
    `java.lang.String` | `getValue()` Gets the current value of the content of the widget in the given context.
    `VariableAccess_ifc` | `getVariable(VariableContainer_ifc container)`
    `VariableAccess_ifc` | `getVariableFromContentInfo(VariableContainer_ifc container)` Deprecated.
    `GralMng` | `gralMng()` Gets the working interface of the manager.
    `boolean` | `isChanged(boolean setUnchanged)` Returns true if the content is changed from a user action on GUI.
    `boolean` | `isEditable()` Query whether this widget is able to change from user handling.
    `boolean` | `isGraphicDisposed()` Returns true if the graphic implementatin widget was initialized, and then it was disposed.
    `boolean` | `isInFocus()` Returns true if this widget is the focused one.
    `boolean` | `isNotEditableOrShouldInitialize()` Query whether this field should be written from any initial or actual data.
    `boolean` | `isVisible()` Returns whether the widget is visible or not.
    `GralPos` | `pos()`
    `void` | `refreshFromVariable(VariableContainer_ifc container)` Capability for any widget to update its content from its associated variables described in its sDataPath.
    `void` | `refreshFromVariable(VariableContainer_ifc container, long timeLatest, GralColor colorRefreshed, GralColor colorOld)` Refreshes the graphical content with the content of the variables.
    `(package private) void` | `registerWidget()`
    `boolean` | `remove()` Removes the widget from the lists in its panel and from the graphical representation.
    `void` | `repaint()` repaint request.
    `void` | `repaint(int delay, int latest)` The Implementation of repaint calls `#repaintGthread()` if it is the graphic thread and the delay is 0.
    `void` | `requestNewValueForVariable(long timeRequested)` Requests new values for all variables which are associated to this widget.
    `void` | `setActionChange(GralUserAction action)` Deprecated.
    `void` | `setActionFocused(GralUserAction action)`
    `void` | `setActionMouse(GralMouseWidgetAction_ifc mouseWidgetAction, int mUser)` Sets the action for mouse operation.
    `void` | `setActionShow(GralUserAction action, java.lang.String[] param)` Sets the action in application context which is invoked for applying user data to show in the widget.
    `void` | `setBackColor(GralColor color, int ix)` Sets the background color for the widget.
    `GralColor` | `setBackgroundColor(GralColor color)` Deprecated.
    `void` | `setBoundsPixel(int x, int y, int dx, int dy)`
    `void` | `setCfgElement(GralWidgetCfg_ifc cfge)`
    `void` | `setCmd(java.lang.String cmd)` Any widget can have a command String, which can be quest for example in an action.
    `long` | `setContentIdent(long date)` Sets a identification for the shown data.
    `void` | `setContentInfo(java.lang.Object content)` Deprecated. use `setData(Object)`
    `void` | `setData(java.lang.Object data)` Sets a application specific data.
    `void` | `setDataIx(int dataIx)`
    `void` | `setDataPath(java.lang.String sDataPath)` Sets the data path.
    `void` | `setDragEnable(GralUserAction action, int dragType)` Sets the action to receive a drop event and initializes the drop feature of the widget.
    `void` | `setDropEnable(GralUserAction action, int dropType)` Sets the action to receive a drop event and initializes the drop feature of the widget.
    `void` | `setEditable(boolean editable)` Sets whether it is able to edit the content of the text field or text box.
    `void` | `setFocus()` Standard implementation.
    `void` | `setFocus(int delay, int latest)` Sets the focus to this widget.
    `GralColor` | `setForegroundColor(GralColor color)`
    `void` | `setFormat(java.lang.String sFormat)`
    `void` | `setHtmlHelp(java.lang.String url)` Sets the html help url for this widget.
    `void` | `setLineColor(GralColor color, int ix)` Sets the line color for the widget.
    `void` | `setLongValue(long value)` Sets a value to show.
    `void` | `setMinMax(float minValue, float maxValue)` Sets the border of the value range for showing.
    `void` | `setPanelMng(GralMng mng)` Deprecated. it should be set by the MethodsCalledbackFromImplementation ctor.
    `void` | `setPrimaryWidgetOfPanel()` Default implementation:Most of widgets may have only one implementation widget.
    `void` | `setText(java.lang.CharSequence text)` Set the text of the widget.
    `void` | `setTextColor(GralColor color)` Sets the text color for the widget.
    `void` | `setToolTip(java.lang.String sToolTip)`
    `void` | `setToPanel(GralMngBuild_ifc mngUnused)` Deprecated. use `createImplWidget_Gthread()`
    `void` | `setValue(float value)` Sets a value to show.
    `void` | `setValue(int cmd, int ident, java.lang.Object visibleInfo)` Sets the current value of the content of the widget in the given context.
    `void` | `setValue(int cmd, int ident, java.lang.Object visibleInfo, java.lang.Object userData)` Sets the current value of the content of the widget in the given context.
    `void` | `setValue(java.lang.Object[] value)` Sets some value to show any content.
    `boolean` | `setVisible(boolean visible)` Sets the widget visible or not.
    `void` | `setVisibleState(boolean visible)`
    `void` | `setVisibleStateWidget(boolean visible)` Sets the state of the widget whether it seams to be visible.
    `void` | `specifyActionChange(java.lang.String sAction, GralUserAction action, java.lang.String[] args, GralWidget_ifc.ActionChangeWhen... when)` Sets the action to invoke after changing or touching the widget.
    `private void` | `specifyActionChangeWhen(GralWidget_ifc.ActionChange action, GralWidget_ifc.ActionChangeWhen when)`
    `void` | `specifyContextMenu(GralMenu menu)`
    `(package private) void` | `stop()`
    `java.lang.String` | `toString()` Especially for test and debug, short info about widget.
    `GralRectangle` | `XXXgetPixelPositionSize()`
    `java.lang.Object` | `XXXgetWidgetImplementation()`
    `void` | `XXXremoveWidgetImplementation()`
    `void` | `XXXrepaintGthread()`
    `boolean` | `XXXsetFocusGThread()`
    `void` | `XXXsetVisibleGThread(boolean bVisible)` Sets the implementation widget visible or not.

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

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

- - ### Field Detail

    - #### sVersion

          public static final java.lang.String sVersion

      Version, history and license.
      - 2016-09-30 Hartmut bugfix: `setFocus()` has set the default focus of the primaryWindow if the focus of a window was set.
      - 2016-09-30 Hartmut New idea, concept: `GralWidget.ImplAccess.wdgimpl`: That refers an implementation of a WidgetHelper class of the implementation layer which knows the widget. Via this aggregation some action with the implementation widget can be do which are defined in the `GralWidgetImpl_ifc`. See `SwtWidgetHelper`.
      - 2016-09-18 Hartmut chg: `getActionChangeStrict(org.vishia.gral.ifc.GralWidget_ifc.ActionChangeWhen, boolean)` documented, changed: returns not null if strict and when==null and a common action is given. Earlier: Returns null in that case.
      - 2016-09-02 Hartmut chg: `GralWidget(String, String, char)` with a position String is now deprecated. Instead the `GralWidget(String, char)` which was deprecated till now is the favor again, but with a combination of "@pos=name" as first argument. That can be used for all derived widgets!. Therewith it is more simple to complete the widgets with the capability of usage of a position String. Without "@...=" it is the old behavior of the constructor. Note that the position can be given with `GralMng.setPosition(GralPos, float, float, float, float, int, char)` etc. too, with numeric values which may be calculated, instead a constant text.
      - 2016-08-31 Hartmut new: `isGraphicDisposed()` especially used for GralWindow-dispose detection.
      - 2016-07-20 Hartmut chg: invocation of registerWidget one time after its position is known. Either it is in the ctor of GralWidget or it is in the ctor of `GralWidget.ImplAccess` if the position was assigned later in the graphic thread.
      - 2016-07-20 Hartmut chg: instead setToPanel now `createImplWidget_Gthread()`. It is a better name.
      - 2016-07-03 Hartmut chg: `createImplWidget_Gthread()`: If the _wdgImpl is initialized already, this method does nothing. Before: Exception
      - 2016-07-03 Hartmut refact: actionChange: Now the `GralWidget_ifc.ActionChange` describes the action class and arguments. `GralWidget.ConfigData.actionChange1` refers the only one change action, or `GralWidget.ConfigData.actionChangeSelect` contains more as one change action. `specifyActionChange(String, GralUserAction, String[], org.vishia.gral.ifc.GralWidget_ifc.ActionChangeWhen...)` sets the only one or special actions, `getActionChange(org.vishia.gral.ifc.GralWidget_ifc.ActionChangeWhen)` selects a proper one. All derived widgets and implementation are adapted to the new system. The user interface is nearly identical.
      - 2016-07-03 Hartmut chg: it is not derived from `GralWidgImpl_ifc` any more. It was the old concept: An implementing widgets was derived from the GralWidget. The new concept is: An implementing widget is derived from its derived class of `GralWidget.ImplAccess`. Therefore only that base class implements the GralWidgetImpl_ifc.
      - 2016-07-03 Hartmut chg: handling of visible: A GralWidget is invisible by default. `setVisible(boolean)` should be invoked on creation. It is possible that widgets are switched. All widgets of a non-visible tab of a tabbed panel are set to invisible, especially `bVisibleState` = false. The `isVisible()` is checked to decide whether a widget should be updated in the inspector. Only visible widgets should be updated. The `GralWidgImpl_ifc.setVisibleGThread(boolean)` is implemented to all known widgets for the implementation layer in the kind of `#setFocusGThread()`. See documentation on the methods.
      - 2015-09-20 Hartmut chg: some final methods now non final, because they have to be overridden for large widgets.
      - 2015-09-20 Hartmut chg: gardening for `GralWidget.DynamicData.getChanged()`, now private attribute `GralWidget.DynamicData.whatIsChanged`
      - 2015-09-20 Hartmut new: `setActionMouse(GralMouseWidgetAction_ifc, int)` was a private thing in `SwtGralMouseListener.MouseListenerGralAction` for widget implementation's mouse handling. Now as user define-able property of any widget, especially use-able for text fields.
      - 2015-09-12 Hartmut new: `getData()`, `setData(Object)` was existent as `setContentInfo(Object)`, now explicit property of any widget. `setContentInfo(Object)` was an older approach, not in interface, now deprecated.
      - 2015-06-21 Hartmut bugfix: `setFocus(int, int)` had hanged because while-loop on same window panel for a parent.
      - 2015-01-27 Hartmut new: `GralWidget.DynamicData.bTouchedField`, `ImplAccess##setTouched()` especially for a text field if any editing key was received. Then the GUI-operator may mark a text or make an input etc. The setting of the text from a cyclically thread should be prevented then to prevent disturb the GUI-operation. If the focus was lost then this bit is reseted. It is an important feature for GUI-handling which was missed up to now. Yet only used for `GralTextField.setText(CharSequence, int)`. It may prevent repaint for universally usage for all widgets.
      - 2015-01-27 Hartmut new: method `getVariable(VariableContainer_ifc)` instead `getVariableFromContentInfo(VariableContainer_ifc)`. The last one method is used in an application but it does not run well for all requirements. The code of `getVariable(VariableContainer_ifc)` is copied from the well tested `refreshFromVariable(VariableContainer_ifc)` as own routine and then used in a new application.
      - 2014-01-15 Hartmut new: `getCmd(int)` with options.
      - 2014-01-03 Hartmut new: `isInFocus()`
      - 2013-12-21 Hartmut chg: `repaint()` invokes redraw immediately if it is in graphic thread. It invokes `repaint(int, int)` with the `repaintDelay` if it is not in graphic thread. It does nothing if the implementation layer widget is not created yet. It means it can invoked without parameter in any case.
      - 2013-12-21 Hartmut chg: `GralWidget.ImplAccess.setDragEnable(int)` and setDropEnable moved from the core class. It is adapt after change `GralTextField`.
      - 2013-12-21 Hartmut new: `setToPanel(GralMngBuild_ifc)` is final now and invokes `GralMngBuild_ifc.createImplWidget_Gthread(GralWidget)`. That method handles all widget types.
      - 2013-11-11 Hartmut new: `refreshFromVariable(VariableContainer_ifc, long, GralColor, GralColor)` which shows old values grayed.
      - 2013-11-11 Hartmut chg: `setFocus()` searches the `GralTabbedPanel` where the widget is member of and invokes its `GralTabbedPanel.selectTab(String)`. It is not correct that the graphic implementation layer does that itself.
      - 2013-06-29 Hartmut new: `setToPanel(GralMngBuild_ifc)` as common method.
      - 2013-06-16 Hartmut new `_wdgImpl`. This instance was present in the past but removed. The concept is re-activated because a graphic-implementation-independent GralWidget instance can have any generic types and can be created as composite (with final type name = new Type(...)). See comments of class `GralMngBuild_ifc`.
      - 2013-03-13 Hartmut new `getContentIdent()`, `setContentIdent(long)`
      - 2013-03-13 Hartmut new `bShouldInitialize`
      - 2012-09-24 Hartmut chg: `getName()` now returns `sDataPath` or `sCmd` if the other info are null.
      - 2012-09-24 Hartmut chg: `refreshFromVariable(VariableContainer_ifc)` for long and double values.
      - 2012-09-17 Hartmut new `GralWidget.ConfigData` and `cfg`, used yet only for `GralWidget.ConfigData.showParam`.
      - 2012-09-17 Hartmut chg whatIsChanged#whatIsChanged} moved from `GralTextField`. The concept is valid for all widgets in cohesion with the concept of the whatIsChanged}.
      - 2012-09-17 Hartmut chg `setActionShow(GralUserAction, String[])` now with parameters.
      - 2012-08-21 Hartmut new `GralWidget.DynamicData` and `dyda` for all non-static widget properties, the dynamic data are that data which are used for all widget types in runtime. TODO: store the configuration data (all other) in an inner class CfgData or in a common class cfgdata see `GralCfgData`.
      - 2012-08-21 The method `setBackColor(GralColor, int)`, `setLineColor(GralColor, int)` and `setTextColor(GralColor)` are declared in the `GralWidget_ifc` yet and implemented here using `dyda`.
      - 2012-07-29 Hartmut chg: `setFocus()` and `setFocus(int, int)` can be called in any thread yet.
      - 2012-04-25 Hartmut some enhancements
      - 2012-04-07 Hartmut chg: `refreshFromVariable(VariableContainer_ifc)` regards int16, int8
      - 2012-04-01 Hartmut new: `refreshFromVariable(VariableContainer_ifc)`. A GralWidget is binded now more to a variable via the new `VariableAccessWithIdx` and then to any `VariableAccess_ifc`. It is possible to refresh the visible information from the variable.
      - 2012-01-04 Hartmut new: `repaintDelay`, use it.
      - 2012-03-31 Hartmut new: `isVisible()` and `GralWidget.ImplAccess.setVisibleState(boolean)`. renamed: `#implMethodWidget_` instead old: 'gralWidgetMethod'.
      - 2012-03-08 Hartmut chg: `repaintRequ` firstly remove the request from queue before execution, a new request after that time will be added newly therefore, then execute it.
      - 2012-02-22 Hartmut new: catch on `#repaintGthread()` and continue the calling level because elsewhere the repaint order isn't removed from the `GralGraphicThread.addDispatchOrder(GralGraphicTimeOrder)`-queue.
      - 2012-02-22 Hartmut new: implements `GralSetValue_ifc` now.
      - 2012-01-16 Hartmut new Concept `repaint()`, can be invoked in any thread. With delay possible. All inherit widgets have to be implement `#repaintGthread()`.
      - 2011-12-27 Hartmut new `setHtmlHelp(String)`. For context sensitive help.
      - 2011-11-18 Hartmut bugfix: `#setFocusGThread()` had called `GralMng.setFocus(GralWidget)` and vice versa. Instead it should be a abstract method here and implemented in all Widgets. See `SwtWidgetHelper.setFocusOfTabSwt(org.eclipse.swt.widgets.Control)`.
      - 2011-10-15 Hartmut chg: This class is now abstract. It is the super class for all wrapper implementations. The wrapper implements special interfaces for the kind of widgets. It is more simple for usage, less instances to know. A GralWidget is able to test with instanceof whether it is a special widget. The element widget is removed because the reference to the implementation widget will be present in the derived classes.
      - 2011-10-01 Hartmut new: method `#setFocusGThread()`. It wrappes the `GralMng_ifc.setFocus(GralWidget)`.
      - 2011-09-18 Hartmut chg: rename from WidgetDescriptor to GralWidget. It is the representation of a Widget in the graphic adapter inclusive some additional capabilities in comparison to basic graphic widgets, like `sFormat` etc.
      - 2011-09-11 Hartmut chg: rename itsPanel to `itsMng`. The original approach was, that the PanelManager manages only one panel then one window. Now the GralPanelMng manages all panels of one application. It is instantiated only one time. Therefore this association isn't the associated panel where the widget is member of.
      - 2011-09-08 Hartmut new: method `setLineColor(GralColor, int)`. Background: Any widget have a background. Most of widgets have lines. The color of them should be able to animate if user data are changed.
      - 2011-09-04 Hartmut new: method `setBackColor(GralColor, int)`.
      - 2011-08-14 Hartmut chg: `#widget` is now type of `GralWidget_ifc` and not Object. Generally it is the reference to the implementing code of the widget. The implementing code may based on a graphic base widget (SWT: Control) and implements the `GralWidget_ifc`, or it references the graphic base widget instance. The class `SwtWidgetSimpleWrapper` is able to wrap simple graphical base widget instances.
      - 2011-08-13 Hartmut new: WidgetDescriptor now contains the position of the widget. It is used for resizing of large widgets. A large widget is a widget, which lengthens over the panel and it is changed in size with panel size change. A typical example is a text-area-widget.
      - 2011-06-20 Hartmut new: method `gralMng()` It is the panel manager!
      - 2011-05-26 Hartmut new: separate action in `#actionChanging` and `#actionShow`. The actionChanging was the old action. It was called from the listener of the widgets of the underlying graphic if any changing is done on the widget (mouse click etc). But the actionShow is necessary too to prepare values to animate widgets without knowledge of the special kind of widget. The application should call only the actionShow, all specifics should be done in the action.
      - 2011-05-22 Hartmut new: The Widget knows its `itsCfgElement` now if it is present. It is possible to configurate widgets with the GralDesigner up to now.
      - 2011-05-14 Hartmut chg: The WidgetDescriptor is now non-generic. Older Concept: Store the GUI implementation widget type as generic type there. But now a widget is stored as Object and it is casted in the implementation. It is more simple because the type is only used and the casting is only necessary in the implementation level.
      - 2011-06-00 Hartmut created
      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

    - #### itsMng

          protected GralMng itsMng

      The widget manager from where the widget is organized. Most of methods need the information stored in the panel manager. This reference is used to set values to other widgets.

    - #### _wdgPos

          private GralPos _wdgPos

      The position of the widget. It may be null if the widget should not be resized.

    - #### _wdgImpl

          public GralWidget.ImplAccess _wdgImpl

      The implementation specific widget. The instance is derived from the graphic implementation-specific super class of all widgets such as `Control` or `Component`. The user can check and cast this instance if some special operations may be need graphic-implementation-dependent. It is recommended that implementation specific features should not used if they are not necessary and the application should be held graphic implementation independent.
      This reference is null if the GralWidgets extends the Graphic specific implementation widget. It should be used in the future (2013-06).

    - #### buildMng

          protected GralMngBuild_ifc buildMng

    - #### itsCfgElement

          private GralWidgetCfg_ifc itsCfgElement

      Association to the configuration element from where this widget was built. If the widget is moved or its properties are changed in the 'design mode' of the GUI, this aggregate data are adjusted and re-written to a file. The configuration elemenet contains all data which are necessary to build the appearance of the GUI.
      If this aggregation is null, the widget can't be changed in the design mode of the GUI. It is created directly without configuration data.

    - #### cfg

          public GralWidget.ConfigData cfg

      Reference to the common configuration data for widgets.

    - #### name

          public java.lang.String name

      Name of the widget in the panel.

    - #### whatIs

          public final char whatIs

      numeric info what to do (kind of widget).
      - B: a Button: has a color, has an action method.
      - c: curve view
      - C: traCk of curve view
      - D: a LED
      - xxx E: an edit field, 1 line
      - xxx e: an edit area
      - F: input file selection field
      - f: GralFileSelector
      - h; HTML text box (browser)
      - I: a line
      - i: an image
      - k: a tree node
      - K: a tree leafe
      - l: a list or table
      - L: a list or table line
      - M: a Menu entry
      - n: a Horizontal Selector
      - r: a rectangle area
      - P: a plot or canvas area
      - R: a rectangle line
      - S: a text field to show
      - s: a text area.
      - T: a text input field
      - t: a text input area.
      - U: a graphical value representation (bar etc)
      - V: a graphical value enter representation (slider etc)
      - w: A window.
      - @: A Tabbed Panel
      - $: Any Panel (composite)
      - +: A canvas panel
      - *: A type (not a widget, common information) See `GralCfgData.new_Type()`

    - #### sToolTip

          public java.lang.String sToolTip

    - #### sDataPath

          private java.lang.String sDataPath

      Textual informations about content. It may be a data path or adequate.

    - #### contextMenu

          protected GralMenu contextMenu

      If not null, it is the right-mouse-button menu for this widget.

    - #### dataIx

          private int dataIx

      An index associated to the data.

    - #### sFormat

          protected java.lang.String sFormat

      Textual info about representation format. See usage in `GralTextField`.

    - #### variable

          private VariableAccess_ifc variable

      One variable which is associated with this widget. This reference may be null. Alternatively `variables` may be set. See `getVariableFromContentInfo(VariableContainer_ifc)`. See `setValue(float)`, `#setValue(String)`. See `#indices` to use an array- or bit-variable.

    - #### variables

          private java.util.List<VariableAccess_ifc> variables

      More as one variable which are associated with this widget. This reference may be null. Alternatively `variable` may be set. See `getVariableFromContentInfo(VariableContainer_ifc)`. See `setValue(float)`, `#setValue(String)`. See `#indices` to use an array- or bit-variable.

    - #### sCmd

          public java.lang.String sCmd

      Any widget can have a command String, which can be quest for example in an action. The widget can be identified by its `getCmd()` independent of its name.

    - #### htmlHelp

          protected java.lang.String htmlHelp

      The relative path to a html help label (maybe an URL, or file, or file with label).

    - #### oContentInfo

          private java.lang.Object oContentInfo

      Any special info, may be set from any user class. It should help to present the content. This info can be set and changed after registration.

    - #### bVisibleState

          protected boolean bVisibleState

      Set true if its shell, tab card etc is be activated. Set false if it is deactivated. It is an estimation whether this widget is be shown yet.

    - #### bEditable

          protected boolean bEditable

      Set to true on `setEditable(boolean)`. With that designation the cyclically refresh of the text field can be prevented.

    - #### bHasFocus

          protected boolean bHasFocus

      Set on focus gained, false on focus lost.

    - #### bShouldInitialize

          protected boolean bShouldInitialize

      If this bit is true on an edit field, it should be initialized.

    - #### repaintDelay

          protected int repaintDelay

      Standard delay to repaint if `repaint()` is called without arguments. It delays a few time because an additional process can be occure in a short time, and only one repaint should be invoked. The repaintDelayMax limits a shifting to the future. See `EventTimeout`, that is used.

    - #### repaintDelayMax

          protected int repaintDelayMax

      Standard delay to repaint if `repaint()` is called without arguments. It delays a few time because an additional process can be occure in a short time, and only one repaint should be invoked. The repaintDelayMax limits a shifting to the future. See `EventTimeout`, that is used.

    - #### lastTimeSetVisible

          long lastTimeSetVisible

      The time when the bVisible state was changed.

    - #### dateUser

          protected long dateUser

    - #### dyda

          protected final GralWidget.DynamicData dyda

    - #### whenAll

          private static GralWidget_ifc.ActionChangeWhen[] whenAll

    - #### repaintRequ

          private final GralGraphicTimeOrder repaintRequ

      This time order calls the `#repaintGthread()` in the graphical thread. It is used with delay and wind up whenever `repaint(int, int)` with an delay is called. If its executeOrder() runs, it is dequeued from timer queue in the `GralGraphicThread` till the next request of `repaint(int, int)` or `repaint()`.

  - ### Constructor Detail

    - #### GralWidget

          @Deprecated
          public GralWidget(java.lang.String pos,
                                         java.lang.String name,
                                         char whatIs)

      Deprecated. since 2016-09: The idea is: Use always one String for "@pos=name".
      Creates a widget.
      Parameters:
        `posString` - If null then the widget is not positioned. !=null then a position string. The position is taken relative to the `GralMng.pos()`, the `GralMng.pos()` is changed see `GralPos.setPosition(CharSequence, GralPos)`
        `sName` - If posString is null and sName has the form "@pos = name" then this is a combination from name and pos. The name should be unified to indent a widget by its name.
        `whatIs` -
      Throws:
        `java.text.ParseException`

    - #### GralWidget

          public GralWidget(java.lang.String sPosName,
                            char whatIs)

      Creates a widget.
      Parameters:
        `sName` - has the form "@pos = name" then this is a combination from position string and name. The name should be unified to indent a widget by its name. Syntax of pos: see `GralPos.setPosition(CharSequence, GralPos)`. It is the same syntax as in textual config scripts.
        `whatIs` - See `whatIs`

    - #### GralWidget

          @Deprecated
          public GralWidget(java.lang.String sName,
                                         char whatIs,
                                         GralMng mng)

      Deprecated.

  - ### Method Detail

    - #### registerWidget

          void registerWidget()

    - #### createImplWidget_Gthread

          public void createImplWidget_Gthread()
                                        throws java.lang.IllegalStateException

      Standard implementation of @see org.vishia.gral.ifc.GralWidget_ifc#setToPanel() Only large widgets (contains more as one GralWidget) should override this method. If the _wdgImpl is initialized already, this method does nothing. It is possible to invoke this for all existing widgets of a panel, only new widgets are initialized with them.
      Specified by:
        `createImplWidget_Gthread` in interface `GralWidget_ifc`
      Throws:
        `java.lang.IllegalStateException` - This routine can be called only if the graphic implementation widget is not existing. It is one time after startup or more as one time if `#removeWidgetImplementation()` was called.

    - #### setToPanel

          @Deprecated
          public final void setToPanel(GralMngBuild_ifc mngUnused)
                                             throws java.lang.IllegalStateException

      Deprecated. use `createImplWidget_Gthread()`
      Description copied from interface: `GralWidget_ifc`
      Deprecated. Use `GralWidget_ifc.createImplWidget_Gthread()`.
      Specified by:
        `setToPanel` in interface `GralWidget_ifc`
      Parameters:
        `mngUnused` - not used. It is known as singleton. Use null as argument.
      Throws:
        `java.lang.IllegalStateException`
      See Also:
        `GralWidget_ifc.setToPanel(org.vishia.gral.ifc.GralMngBuild_ifc)`

    - #### pos

          public GralPos pos()

    - #### chgPos

          public void chgPos(GralPos newPos)

    - #### getGralWidget

          public GralWidget getGralWidget()

      Returns this.
      Specified by:
        `getGralWidget` in interface `GetGralWidget_ifc`
      See Also:
        `GetGralWidget_ifc.getGralWidget()`

    - #### setPrimaryWidgetOfPanel

          public void setPrimaryWidgetOfPanel()

      Default implementation:Most of widgets may have only one implementation widget. This returns null.
      See Also:
        `org.vishia.gral.ifc.GralWidget_ifc#getWidgetMultiImplementations()`

    - #### getName

          public java.lang.String getName()

      Specified by:
        `getName` in interface `GralWidget_ifc`

    - #### setContentInfo

          public void setContentInfo(java.lang.Object content)

      Deprecated. use `setData(Object)`
      Sets a application specific info. It should help to present user data which are associated to this widget. This info can be set and changed anytime.
      Specified by:
        `setContentInfo` in interface `GralSetValue_ifc`

    - #### getContentInfo

          public java.lang.Object getContentInfo()

      Deprecated. use `getData()`
      Gets the application specific info. See `setContentInfo(Object)`.
      Specified by:
        `getContentInfo` in interface `GralSetValue_ifc`
      Specified by:
        `getContentInfo` in interface `GralWidget_ifc`

    - #### setData

          public void setData(java.lang.Object data)

      Sets a application specific data. It should help to present user data which are associated to this widget. This info can be set and changed anytime.
      Specified by:
        `setData` in interface `GralWidget_ifc`

    - #### getData

          public java.lang.Object getData()

      Gets the application specific info. See `setContentInfo(Object)`.
      Specified by:
        `getData` in interface `GralWidget_ifc`

    - #### setEditable

          public void setEditable(boolean editable)

      Description copied from interface: `GralWidget_ifc`
      Sets whether it is able to edit the content of the text field or text box. If a content is not able to edit, it is a showing field or box. The user can't change the content. But the user can set the cursor, select any text and copy to the systems clipboard. If the content is able to edit, the change should be notified and the content should be gotten. To do that TODO
      Specified by:
        `setEditable` in interface `GralWidget_ifc`
      Parameters:
        `editable` - true then the content is going to be able to change. False then the edit functionality is disabled.

    - #### isEditable

          public boolean isEditable()

      Description copied from interface: `GralWidget_ifc`
      Query whether this widget is able to change from user handling.
      Specified by:
        `isEditable` in interface `GralWidget_ifc`

    - #### isNotEditableOrShouldInitialize

          public boolean isNotEditableOrShouldInitialize()

      Description copied from interface: `GralWidget_ifc`
      Query whether this field should be written from any initial or actual data.
      Specified by:
        `isNotEditableOrShouldInitialize` in interface `GralWidget_ifc`

    - #### setDataPath

          public void setDataPath(java.lang.String sDataPath)

      Sets the data path. It is a String in application context.
      Specified by:
        `setDataPath` in interface `GralSetValue_ifc`
      Specified by:
        `setDataPath` in interface `GralWidget_ifc`
      Parameters:
        `sDataPath` -

    - #### getDataPath

          public java.lang.String getDataPath(java.lang.String sDataPath)

      Changes the data path
      Parameters:
        `sDataPath` - the new one
      Returns:
        the last one.

    - #### getCmd

          public java.lang.String getCmd()

      Any widget can have a command String, which can be quest for example in an action. The widget can be identified by this method independent of its name. See `setCmd(String)`.
      Specified by:
        `getCmd` in interface `GralWidget_ifc`

    - #### getCmd

          public java.lang.String getCmd(int option)

      Get the command string from the `setCmd(String)` with choice of an option. The command string should have the form "base[Option1|Option2|Option3]End" whereby base and end can be empty. if option is <0 an IndexOutOfBoundsException is thrown. If option is >= the given number of options, the option part is replaced by "??". That may be more helpfull to detect errors.
      Parameters:
        `option` - number >=0
      Returns:
        "baseOptionEnd"

    - #### setCmd

          public void setCmd(java.lang.String cmd)

      Any widget can have a command String, which can be quest for example in an action. The widget can be identified by its `getCmd()` independent of its name which can be set on runtime with this method.
      Specified by:
        `setCmd` in interface `GralWidget_ifc`

    - #### getDataPath

          public java.lang.String getDataPath()

      Gets the data path. It is a String in application context.
      Specified by:
        `getDataPath` in interface `GralSetValue_ifc`
      Specified by:
        `getDataPath` in interface `GralWidget_ifc`
      Returns:
        the last one.

    - #### setActionChange

          @Deprecated
          public void setActionChange(GralUserAction action)

      Deprecated.
      Sets the action in application context for processing of user handling for the widget. Handling means, pressing button, user inputs of text fields The method `GralUserAction.exec(int, GralWidget_ifc, Object...)` will be called with following key codes:
      - `KeyCode.focusGained`, `KeyCode.focusLost` on enter and leave a text field.
      - `KeyCode.mouse1Down` etc, any mouse events on any widget.
      - `KeyCode.valueChanged` if the content of a text field is changed.
      - Some more TODO, set breakpoint in the routine.
      Parameters:
        `action` - any instance. Its action method is invoked depending of the type of widget usual if the user takes an action on screen, press button etc.

    - #### specifyActionChange

          public void specifyActionChange(java.lang.String sAction,
                                          GralUserAction action,
                                          java.lang.String[] args,
                                          GralWidget_ifc.ActionChangeWhen... when)

      Sets the action to invoke after changing or touching the widget.
      Parameters:
        `sAction` - maybe null, String for visualization, especially menu entry for context menu.
        `action` - The action. null admissible to remove the existing action.
        `args` - possible arguments for the action or null
        `when` - List of type of action, maybe empty, then the given action is set for all conditions. Especially `setActionChange(null, null, null) removes all actions.`

    - #### specifyActionChangeWhen

          private void specifyActionChangeWhen(GralWidget_ifc.ActionChange action,
                                               GralWidget_ifc.ActionChangeWhen when)

    - #### specifyContextMenu

          public void specifyContextMenu(GralMenu menu)

    - #### getActionChange

          public GralWidget_ifc.ActionChange getActionChange(GralWidget_ifc.ActionChangeWhen when)

      Gets the action to execute on changing a widget. If only one action is given with `setActionChange(String, action, args) without a specified when then this action is returned in any case, especially if when == null. If specific actions were set, this action is returned, or null.`
      Specified by:
        `getActionChange` in interface `GralWidget_ifc`
      Parameters:
        `when` - type of action, if null then returns the only one given action or null if only specific actions are given
      Returns:
        null if the action is not set.

    - #### getActionChangeStrict

          public GralWidget_ifc.ActionChange getActionChangeStrict(GralWidget_ifc.ActionChangeWhen when,
                                                                   boolean strict)

      Gets the action to execute on changing a widget. If only one action is given with `setActionChange(String, action, args) without a specified when then this action is returned in any case, especially if when == null. If specific actions were set, this action is returned, or null.`
      Parameters:
        `when` - type of action, if null then returns the only one given action or null if only specific actions are given
        `strict` - if true then a common action without when-designation is not returned if when is not null.
      Returns:
        null if the action is not set.

    - #### setActionMouse

          public void setActionMouse(GralMouseWidgetAction_ifc mouseWidgetAction,
                                     int mUser)

      Sets the action for mouse operation. Either it is a special mouse handler or the `setActionChange(GralUserAction)` is used with `KeyCode.mouse1Down` etc. key code. It works with all widgets which uses `SwtGralMouseListener.MouseListenerGralAction` respectively the adequate implementation mouse listener. By contract of Gral, all widgets should add the mouse listener. Therefore no further special action is necessary to activate the requested mouse behavior. Note: If you set an abbreviate mouse handler for Button etc. where the mouse is an essential functionality that functionality is disturbed. An extra handler should base on that special mouse handler, for example `GralButton.MouseActionButton` and should invoke that actions calling super.mouse1Down(...) etc. For that widgets usual the `setActionChange(GralUserAction)` is called also, that may be sufficient.
      Parameters:
        `mouseWidgetAction` - null possible, elsewhere the mouse operation callback instance.
        `mUser` - One or more of the bits `GralMouseWidgetAction_ifc.mUser1down` etc. If given the `setActionChange(GralUserAction)` is invoked with that operation instead the given (or usually not given) mouseWidgetAction.

    - #### setActionShow

          public void setActionShow(GralUserAction action,
                                    java.lang.String[] param)

      Sets the action in application context which is invoked for applying user data to show in the widget.
      The invocation of the action should be organized in the user context, maybe cyclically for all widgets of visible windows or if any data are received.
      In the action the user should read any data from its application and invoke `setValue(int, int, Object, Object)` after data preparation to display the value. Because the `GralWidget` is given as parameter, the implementation can use the information for example `sDataPath` or `sFormat`. The implementation of the action can be done in the users context in a specialized form, or some standard actions can be used. See notes of `getActionShow()`.
      To get the action in a script context (GuiCfgBuilder) some actions can be registered using `GralMngBuild_ifc.registerUserAction(String, GralUserAction)`. They are gotten by name invoking `GralMngBuild_ifc.getRegisteredUserAction(String)` in the `GralCfgBuilder`.
      Parameters:
        `action` - The action instance.
        `param` - maybe param for the show method.

    - #### getActionShow

          public GralUserAction getActionShow()

      Gets the action to show the widget. This method is helpfully to invoke showing after receiving data in the users context. Invoke `GralUserAction.userActionGui(String, GralWidget, Object...)` with this WidgetDescriptor and additional user data. The implementation of that method may be done in the users context but in another module or the implementation may be given in any library superordinated to this graphic adapter library but subordinated in respect to the explicit application. The usage of a show method given in the implementation of `GralUserAction` helps to separate the invocation of showing and the decision what and how is to show.

    - #### setActionFocused

          public void setActionFocused(GralUserAction action)

    - #### getActionFocused

          public GralUserAction getActionFocused()

    - #### getsToolTip

          public java.lang.String getsToolTip()

    - #### setToolTip

          public void setToolTip(java.lang.String sToolTip)

    - #### setDragEnable

          public void setDragEnable(GralUserAction action,
                                    int dragType)

      Sets the action to receive a drop event and initializes the drop feature of the widget. For drag file the 'drag get action' method will be offered in the params[0] a String[][] reference. This String reference array has to be filled with the absolute path of the file using String[0][0]. After that callback invocation a drag file object will be created therewith internally.
      Parameters:
        `action` - The drag file get action.
        `dropType` - one of `KeyCode.dropFiles` or ..dropText

    - #### getActionDrag

          public GralUserAction getActionDrag()

    - #### setDropEnable

          public void setDropEnable(GralUserAction action,
                                    int dropType)

      Sets the action to receive a drop event and initializes the drop feature of the widget.
      Parameters:
        `action` - The action will be called
        `dropType` - one of `KeyCode.dropFiles` or ..dropText

    - #### getActionDrop

          public GralUserAction getActionDrop()

    - #### getShowMethod

          public java.lang.String getShowMethod()

    - #### getDataIx

          public int getDataIx()

      Specified by:
        `getDataIx` in interface `GralSetValue_ifc`

    - #### setDataIx

          public void setDataIx(int dataIx)

      Specified by:
        `setDataIx` in interface `GralSetValue_ifc`

    - #### getShowParam

          public java.lang.String[] getShowParam()

      Returns the parameter of the show method. The parameters for the show-method are given as "showMethod(param, param, ...)" while calling `setActionShow(GralUserAction, String[])`. They are split in extra Strings, this
      Returns:

    - #### clearShowParam

          public void clearShowParam()

      Clear the parameter if they are over-taken already.

    - #### getFormat

          public java.lang.String getFormat()

    - #### setFormat

          public void setFormat(java.lang.String sFormat)

    - #### getContextMenu

          public GralMenu getContextMenu()

      Gets the context menu to add a menu item. If this widget hasn't a gral context menu, then the context menu is created by calling `GralMng#addContextMenu(GralWidget)`. If the widget has a context menu already, it is stored in the reference `contextMenu`.
      Returns:
        the context menu root for this widget.

    - #### setHtmlHelp

          public void setHtmlHelp(java.lang.String url)

      Description copied from interface: `GralWidget_ifc`
      Sets the html help url for this widget. That information will be used if the widget is focused to control the help window output.
      Specified by:
        `setHtmlHelp` in interface `GralWidget_ifc`
      Parameters:
        `url` - String given url, maybe a local file too with #internalLabel.

    - #### getHtmlHelp

          public java.lang.String getHtmlHelp()

    - #### setPanelMng

          @Deprecated
          public void setPanelMng(GralMng mng)

      Deprecated. it should be set by the MethodsCalledbackFromImplementation ctor.
      Sets the GralMng.

    - #### getVariableFromContentInfo

          @Deprecated
          public VariableAccess_ifc getVariableFromContentInfo(VariableContainer_ifc container)

      Deprecated.
      Gets the info to access the values for this widget in the users context. If this method is called the first time for the widget after start the application, the access info is searched in the container calling `VariableContainer_ifc#getVariable(String, int[])` with the stored textual info `setDataPath(String)` and `setDataIx(int)`. This operation may need a little bit of calculation time, which were to expensive if a lot of widgets should be provided with user values. Therefore the returned `VariableAccess_ifc` instance is stored in the `oContentInfo` of the widget and returned on the further calls.
      The returned `VariableAccess_ifc` should be allow the fast access to users values.
      Parameters:
        `container` - The container where all `VariableAccess_ifc` should be found.
      Returns:
        The access to a user variable in the user's context, null if the data path is empty.

    - #### getVariable

          public VariableAccess_ifc getVariable(VariableContainer_ifc container)

    - #### refreshFromVariable

          public void refreshFromVariable(VariableContainer_ifc container)

      Description copied from interface: `GralWidget_ifc`
      Capability for any widget to update its content from its associated variables described in its sDataPath.
      Specified by:
        `refreshFromVariable` in interface `GralWidget_ifc`
      Parameters:
        `container` - The container is used only if the variable is not known by direct reference in the private `variable` or `variables`. If the variable(s) is/are not known, they are searched by there data path set by `GralWidget_ifc.setDataPath(String)`. More as one variables are possible separated by "," in the setDataPath("variable1, variable2"). The variables are searched in the container calling `VariableContainer_ifc.getVariable(String)`.

    - #### refreshFromVariable

          public void refreshFromVariable(VariableContainer_ifc container,
                                          long timeLatest,
                                          GralColor colorRefreshed,
                                          GralColor colorOld)

      Refreshes the graphical content with the content of the variables. First time if a variables is not associated the variable is searched in the container by the given `setDataPath(String)`. The next times the variable is used independent of the reference to the container and independent of the data path. If `setDataPath(String)` was called again, the variables are searched in the container newly.
      If the data path contains ',' as separator, more as one variable is associated.
      Specified by:
        `refreshFromVariable` in interface `GralWidget_ifc`
      Parameters:
        `container` - contains variables able to search by string.

    - #### requestNewValueForVariable

          public void requestNewValueForVariable(long timeRequested)

      Requests new values for all variables which are associated to this widget. This method is usefull if the variables are filled by a communication with any remote device and that filling should be requested for the current visible variables.

    - #### getValue

          public java.lang.String getValue()

      Gets the current value of the content of the widget in the given context.
      Parameters:
        `mng` - The context.
      Returns:
        The value in String representation, null if the widget has no possibility of input.

    - #### isVisible

          public boolean isVisible()

      Description copied from interface: `GralWidget_ifc`
      Returns whether the widget is visible or not. This method can be invoked in any thread. It is an estimation because the state of the widget may be changed in the last time or a window can be covered by another one. The widget is not visible if it is a member of a card in a tabbed panel and that tab is not the selected one.
      Specified by:
        `isVisible` in interface `GralWidget_ifc`
      Returns:
        true if the widget seams to be visible.

    - #### isInFocus

          public boolean isInFocus()

      Description copied from interface: `GralWidget_ifc`
      Returns true if this widget is the focused one.
      Specified by:
        `isInFocus` in interface `GralWidget_ifc`

    - #### isGraphicDisposed

          public boolean isGraphicDisposed()

      Description copied from interface: `GralWidget_ifc`
      Returns true if the graphic implementatin widget was initialized, and then it was disposed. It is able to use especially to detect whether a sub window is closed or if the primary window was closed, to finish any other (waiting) thread. It may be used on any disposed widget.
      Specified by:
        `isGraphicDisposed` in interface `GralWidget_ifc`
      Returns:
        true if the Widget was created and after them disposed again.

    - #### setVisible

          public boolean setVisible(boolean visible)

      Sets the widget visible or not. It is the default implementation for all simple widgets: Sets `GralWidget.ImplAccess.chgVisible` or `GralWidget.ImplAccess.chgInvisible` in `GralWidget.DynamicData.setChanged(int)` and invokes `repaint()` with the `repaintDelay` and `repaintDelayMax`
      Specified by:
        `setVisible` in interface `GralWidget_ifc`
      Parameters:
        `visible` -
      Returns:
        the old state.

    - #### XXXgetPixelPositionSize

          public GralRectangle XXXgetPixelPositionSize()

    - #### isChanged

          public boolean isChanged(boolean setUnchanged)

      Description copied from interface: `GralWidget_ifc`
      Returns true if the content is changed from a user action on GUI.
      Specified by:
        `isChanged` in interface `GralWidget_ifc`
      Parameters:
        `setUnchanged` - If true then set to unchanged with this call.
      Returns:
        true if the content was changed since last setUnchanged.

    - #### setValue

          public void setValue(int cmd,
                               int ident,
                               java.lang.Object visibleInfo)

      Sets the current value of the content of the widget in the given context.
      Parameters:
        `cmd` - see `GralMng_ifc.cmdSet` etc. It is possible to set the color etc.
        `ident` - Any number to specify set, maybe 0
        `value` - The value in the necessary representation.

    - #### setBackColor

          public void setBackColor(GralColor color,
                                   int ix)

      Description copied from interface: `GralWidget_ifc`
      Sets the background color for the widget. It supports widgets with more as one background color by an index. The usage of the index is widget-specific. An index -1 should mean: All backgrounds. ix=0 means the first background.
      Specified by:
        `setBackColor` in interface `GralWidget_ifc`
      Parameters:
        `color` - Any color
        `ix` - -1 for non-specific, 0 for the first color or if only one color is supported, 1, ... if the widget has more as one background.

    - #### getBackColor

          public GralColor getBackColor(int ix)

      Description copied from interface: `GralWidget_ifc`
      Gets the background color for the widget.
      Specified by:
        `getBackColor` in interface `GralWidget_ifc`
      Parameters:
        `ix` - 0 if only one color is supported, 1, ... if the widget has more as one background.
      Returns:
        color Any color

    - #### setLineColor

          public void setLineColor(GralColor color,
                                   int ix)

      Description copied from interface: `GralWidget_ifc`
      Sets the line color for the widget.
      Specified by:
        `setLineColor` in interface `GralWidget_ifc`
      Parameters:
        `color` - Any color
        `ix` - 0 if only one color is supported, 1, ... if the widget has more as one line.

    - #### setTextColor

          public void setTextColor(GralColor color)

      Description copied from interface: `GralWidget_ifc`
      Sets the text color for the widget.
      Specified by:
        `setTextColor` in interface `GralWidget_ifc`
      Parameters:
        `color` - Any color

    - #### setValue

          public void setValue(int cmd,
                               int ident,
                               java.lang.Object visibleInfo,
                               java.lang.Object userData)

      Sets the current value of the content of the widget in the given context.
      Parameters:
        `cmd` - see `GralMng_ifc.cmdSet` etc. It is possible to set the color etc.
        `ident` - Any number to specify set, maybe 0
        `value` - The value in the necessary representation.

    - #### setValue

          public void setValue(float value)

      Sets a value to show.
      Specified by:
        `setValue` in interface `GralSetValue_ifc`
      Parameters:
        `value` - This routine may be overridden by some specialized widgets.

    - #### setLongValue

          public void setLongValue(long value)

      Sets a value to show.
      Specified by:
        `setLongValue` in interface `GralSetValue_ifc`
      Parameters:
        `value` - This routine may be overridden by some specialized widgets.

    - #### getFloatValue

          public float getFloatValue()

      Gets the float attribute value of this widget. Returns 0.0 if a float value is never used.

    - #### getLongValue

          public float getLongValue()

      Gets the float attribute value of this widget. Returns 0.0 if a float value is never used.

    - #### setValue

          public void setValue(java.lang.Object[] value)

      Sets some value to show any content.
      Specified by:
        `setValue` in interface `GralSetValue_ifc`
      Parameters:
        `value` - This routine may be overridden by some specialized widgets.

    - #### setText

          public void setText(java.lang.CharSequence text)

      Description copied from interface: `GralWidget_ifc`
      Set the text of the widget. If the widget is a button, the standard button text is changed. If it is a window, its title is changed.
      Concept of changing a widget from application:
      Here the generally approach is described, appropriate for this method, but in the same kind for all methods to set something like `GralWidget_ifc.setBackColor(GralColor, int)` etc.
      With the set methods the user stores the text, color etc. in graphic-independent attributes. Then the method `GralWidget_ifc.repaint(int, int)` is invoked with the standard delay of `#repaintDelay` and `#repaintDelayMax`. With that the widget-specific private instance of `#repaintRequ` is added to the queue of requests in the `GralGraphicThread#addTimeOrder(GralGraphicTimeOrder)`. In the requested time that dispatch order is executed in the graphic thread. It calls `GralWidgImpl_ifc.repaintGthread()`. That method is implemented in the graphic implementation layer of the widget. It sets the appropriate values from the independent Gral attributes to the implementation specifics and invoke a redraw of the graphic layer.
      If more as one attribute is changed one after another, only one instance of the `GralGraphicTimeOrder` is queued. All changed attributes are stored in `DynamicData#whatIsChanged` and the `GralWidgImpl_ifc.repaintGthread()` quests all changes one after another. It means that a thread switch is invoked only one time per widget for more as one change.
      See `DynamicData`. That composite part of a widget stores all standard dynamic data of a widget.
      Specified by:
        `setText` in interface `GralSetValue_ifc`
      Specified by:
        `setText` in interface `GralWidget_ifc`

    - #### getText

          public java.lang.String getText()

      Get the text of this widget. It can be invoked in any thread. If it is a edit able text field, it returns the current text after focus lost or pressing any control key.
      Returns:
        The current text.

    - #### setMinMax

          public void setMinMax(float minValue,
                                float maxValue)

      Sets the border of the value range for showing. If it is a ValueBar, for exmaple, it is the value for 0% and 100% This routine is empty per default, should be overridden if it is necessary.
      Specified by:
        `setMinMax` in interface `GralSetValue_ifc`
      Parameters:
        `minValue` -
        `maxValue` -

    - #### setContentIdent

          public long setContentIdent(long date)

      Description copied from interface: `GralWidget_ifc`
      Sets a identification for the shown data. A widget may not need to refresh if the contentIdent is not changed. A refresh of a widget's content may have side effects in user handling such as selection of text etc. See `GralWidget_ifc.getContentIdent()`.
      Specified by:
        `setContentIdent` in interface `GralWidget_ifc`
      Parameters:
        `date` - any number which identifies the value of content.
      Returns:
        the last stored ident.

    - #### getContentIdent

          public long getContentIdent()

      Description copied from interface: `GralWidget_ifc`
      Gets the content identification of the users data which are set with `GralWidget_ifc.setContentIdent(long)`.
      Specified by:
        `getContentIdent` in interface `GralWidget_ifc`

    - #### setCfgElement

          public void setCfgElement(GralWidgetCfg_ifc cfge)

    - #### getCfgElement

          public GralWidgetCfg_ifc getCfgElement()

    - #### setFocus

          public void setFocus()

      Standard implementation. Override only if necessary for sepcial handling.
      Specified by:
        `setFocus` in interface `GralWidget_ifc`
      See Also:
        `GralWidget_ifc.setFocus()`

    - #### setFocus

          public void setFocus(int delay,
                               int latest)

      Sets the focus to this widget. This method is possible to call in any thread. If it is called in the graphic thread and the delay = 0, then it is executed immediately. Elsewhere the request is stored in the graphic thread execution queue and invoked later. If the widget is inside a tab of a tabbed panel, the tab is designated as currently therewith. That is done in the calling thread because it is a thread safe operation.
      Specified by:
        `setFocus` in interface `GralWidget_ifc`
      Parameters:
        `delay` - Delay in ms for invoking the focus request
        `latest` -

    - #### gralMng

          public GralMng gralMng()

      Gets the working interface of the manager. It can be used to set and get values from other widgets symbolic identified by its name. Note: It is possible too to store the `GralWidget` of specific widgets to get and set values and properties of this widgets non-symbolic.
      Specified by:
        `gralMng` in interface `GralWidget_ifc`
      Returns:
        The manager.

    - #### getItsPanel

          public GralPanelContent getItsPanel()

      Gets the panel where the widget is member of.
      Returns:
        The panel.

    - #### repaint

          public void repaint()

      Description copied from interface: `GralWidget_ifc`
      repaint request. It can be called in any thread. If it is called in the graphic thread, the repaint action is executed immediately in the thread. Elsewhere the graphic thread will be waken up in the standard repaint time (about 100 ms). If this routine is invoked more as one time before the standard repaint time expires and not in the graphic thread, then the repaint is executed only one time after the given delay with the last set data. See `GralWidget_ifc.repaint(int, int)`
      Specified by:
        `repaint` in interface `GralWidget_ifc`

    - #### repaint

          public void repaint(int delay,
                              int latest)

      The Implementation of repaint calls `#repaintGthread()` if it is the graphic thread and the delay is 0. Elsewhere the `repaintRequ` is added as request to the graphic thread.
      Specified by:
        `repaint` in interface `GralWidget_ifc`
      Parameters:
        `delay` - in milliseconds. If 0 or less 0, then it is executed immediately if the calling thread is the graphic thread.
        `latest` - The latest draw time in milliseconds. If it is less 0, then it is unused. If it is 0 or less delay if a delay is given, then the delay isn't wound up on re-call.
      See Also:
        `GralWidget_ifc.repaint(int, int)`

    - #### remove

          public boolean remove()

      Removes the widget from the lists in its panel and from the graphical representation. It calls the protected `#removeWidgetImplementation()` which is implemented in the adaption.
      Specified by:
        `remove` in interface `Removeable`
      Returns:
        true if successfully. If false it is a hint for the application that the instance itself should not be removed.

    - #### toString

          public java.lang.String toString()

      Especially for test and debug, short info about widget.
      Overrides:
        `toString` in class `java.lang.Object`
      See Also:
        `Object.toString()`

    - #### getImpl

          public GralWidget.ImplAccess getImpl()

      Returns the instance which extends the `GralWidget.ImplAccess` of this widget.
      Returns:
        null if the widget has not an implementation yet.

    - #### setVisibleStateWidget

          public final void setVisibleStateWidget(boolean visible)

      Sets the state of the widget whether it seams to be visible. This method should not be invoked by the application. It is
      Parameters:
        `visible` -

    - #### setVisibleState

          public void setVisibleState(boolean visible)

    - #### stop

          void stop()

    - #### setBackgroundColor

          @Deprecated
          public GralColor setBackgroundColor(GralColor color)

      Deprecated.
      Specified by:
        `setBackgroundColor` in interface `GralWidget_ifc`

    - #### setBoundsPixel

          public void setBoundsPixel(int x,
                                     int y,
                                     int dx,
                                     int dy)

      Specified by:
        `setBoundsPixel` in interface `GralWidget_ifc`

    - #### setForegroundColor

          public GralColor setForegroundColor(GralColor color)

      Specified by:
        `setForegroundColor` in interface `GralWidget_ifc`

    - #### XXXgetWidgetImplementation

          public java.lang.Object XXXgetWidgetImplementation()

    - #### XXXremoveWidgetImplementation

          public void XXXremoveWidgetImplementation()

    - #### XXXrepaintGthread

          public void XXXrepaintGthread()

    - #### XXXsetFocusGThread

          public boolean XXXsetFocusGThread()

    - #### XXXsetVisibleGThread

          public void XXXsetVisibleGThread(boolean bVisible)

      Sets the implementation widget visible or not.
      See Also:
        `GralWidgImpl_ifc.setVisibleGThread(boolean)`