org.vishia.gral.ifc

## Interface GralMngBuild_ifc

- All Known Implementing Classes:
    GralMng

      public interface GralMngBuild_ifc

  This is a unique interface for the GUI-panel-manager to build its content. To work with the graphical application see `GralMng_ifc`.
  For the most simple applications, the capability of this interface and its given implementation for the platform may be sufficient, so the platform-specific widget isn't necessary to use. It may be better to enhance this interface and its implementation(s) if new features are need. But the definition of that enhancements should be done in a commonly form which is able to implement in any known Java GUI platform.
  Generally, the widgets are able to address with an identification String to do something with it for symbolic access.
  To build a GUI you must use the following order of calls:
  - Create a graphic manager which is typeof `GralMng` or this interface. For example create `SwtMng`.
  - Create a panel, for example call `#createGridPanel(GralColor, int, int, int, int)` and add the panel to the given
  - Before add, you can select any given panel by String-identifier, using `selectPanel(String)`.
  - Before add, you have to determine the position and size using
    - `setPositionSize(int, int, int, int, char)` in grid units
    - `#setFinePositionSize(int, int, int, int, int, int, int, int, char)`
    - `#setNextPositionX()`
  - The call the add method: This methods create the graphic widget in the current selected panel.
  Concept of positioning: see method `#setPosition(float, float, float, float, char, int)` and `GralWidget_ifc`.
  Concept for widgets: see `GralWidget`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `propGridZoomedPanel`
    `static int` | `propZoomedPanel`
    `static int` | `version` The version of this interface: 2016-09-01 Hartmut chg: instead extends `ReplaceAlias_ifc` now contains `getReplacerAlias()`.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `GralButton` | `addButton(java.lang.String sName, GralUserAction action, java.lang.String sButtonText)` Adds a button
    `GralButton` | `addButton(java.lang.String sName, GralUserAction action, java.lang.String sCmd, java.lang.String sDataPath, java.lang.String sButtonText)` Adds a button
    `GralButton` | `addCheckButton(java.lang.String sName, java.lang.String sButtonTextOn, java.lang.String sButtonTextOff, java.lang.String sButtonTextDisabled, GralColor colorOn, GralColor colorOff, GralColor colorDisabled)` Adds a button which is switching on or off.
    `GralCurveView` | `addCurveViewY(java.lang.String sName, int nrofXvalues, GralCurveView.CommonCurve common)` Adds a curve view for displaying values with ordinary x-coordinate.
    `GralTextField` | `addFileSelectField(java.lang.String name, java.util.List<java.lang.String> listRecentFiles, java.lang.String startDirMask, java.lang.String prompt, java.lang.String promptStylePosition)` Adds a special text field to select a file.
    `void` | `addFocusAction(GralWidget widgetInfo, GralUserAction action, java.lang.String sCmdEnter, java.lang.String sCmdRelease)` Adds the given Focus action to the known widget.
    `GralWidget` | `addFocusAction(java.lang.String sName, GralUserAction action, java.lang.String sCmdEnter, java.lang.String sCmdRelease)` Adds the given Focus action to the named widget.
    `GralHtmlBox` | `addHtmlBox(java.lang.String name)` Adds a box which presents html content.
    `java.lang.Object` | `addImage(java.lang.String sName, java.io.InputStream imageStream, int height, int width, java.lang.String sCmd)`
    `GralLed` | `addLed(java.lang.String sName, java.lang.String sDataPath)` Adds a Led (round)
    `void` | `addLine(GralColor color, java.util.List<GralPoint> points)` Adds a line.
    `void` | `addLine(int colorValue, float xa, float ya, float xe, float ye)` Deprecated. it is the old form before a `GralPlotArea` was created. Use that.
    `GralWidget` | `addSlider(java.lang.String sName, GralUserAction action, java.lang.String sShowMethod, java.lang.String sDataPath)`
    `GralButton` | `addSwitchButton(java.lang.String sName, GralUserAction action, java.lang.String sCmd, java.lang.String sDataPath, java.lang.String sButtonText, java.lang.String color0, java.lang.String color1)` Adds a button which saves its state, pressed or non-pressed.
    `GralButton` | `addSwitchButton(java.lang.String sName, java.lang.String sButtonTextOff, java.lang.String sButtonTextOn, GralColor colorOff, GralColor colorOn)` Adds a button which is switching on or off.
    `GralTabbedPanel` | `addTabbedPanel(java.lang.String namePanel, GralPanelActivated_ifc user, int properties)` Adds a panel for tabs as child of the current panel.
    `GralTable` | `addTable(java.lang.String sName, int height, int[] columnWidths)` Deprecated. Create an instance of `GralTable` and call `GralWidget.setToPanel(GralMngBuild_ifc)`
    `GralWidget` | `addText(java.lang.String sText)` Adds a text to the current panel at given position with standard colors, left origin.
    `GralWidget` | `addText(java.lang.String sText, char size, int color)` Deprecated.
    `GralWidget` | `addText(java.lang.String sText, int origin, GralColor textColor, GralColor BackColor)` Adds a simple text at the current position.
    `GralTextBox` | `addTextBox(java.lang.String name, boolean editable, java.lang.String prompt, char promptStylePosition)` Adds a box for editing or showing a text.
    `GralTextField` | `addTextField(java.lang.String name, boolean editable, java.lang.String prompt, java.lang.String promptStylePosition)` Adds a text field at the current position.
    `GralValueBar` | `addValueBar(java.lang.String sName, java.lang.String sDataPath)`
    `void` | `buildCfg(GralCfgData data, java.io.File fileCfg)` Sets the builder for content configuration.
    `GralPanelContent` | `createCompositeBox(java.lang.String name)` Creates a box inside the current panel to hold some widgets.
    `GralFileDialog_ifc` | `createFileDialog()` Creates a file or directory dialog.
    `GralPanelContent` | `createGridPanel(java.lang.String namePanel, GralColor backGround, int xG, int yG, int xS, int yS)` Creates an independent grid panel which is managed by this.
    `GralInfoBox` | `createHtmlInfoBox(java.lang.String posString, java.lang.String name, java.lang.String title, boolean onTop)`
    `void` | `createImplWidget_Gthread(GralWidget widgg)` This routine is called from `GralWidget.setToPanel(GralMngBuild_ifc)`.
    `GralInfoBox` | `createTextInfoBox(java.lang.String name, java.lang.String title)`
    `GralWindow` | `createWindow(java.lang.String name, java.lang.String title, int windProps)` Deprecated. use `GralWindow.GralWindow(String, String, String, int)` and then `GralWidget.createImplWidget_Gthread()` with this window.
    `GralColor` | `getColor(java.lang.String sName)` Gets the named color.
    `int` | `getColorValue(java.lang.String sName)` Gets the value to the named color.
    `GralPos` | `getPositionInPanel()` Deprecated. see `GralWidget.ImplAccess`.
    `GralUserAction` | `getRegisteredUserAction(java.lang.String name)`
    `ReplaceAlias_ifc` | `getReplacerAlias()`
    `java.util.Set<java.util.Map.Entry<java.lang.String,GralWidget>>` | `getShowFields()` Returns a Set of all fields, which are created to show.
    `void` | `registerPanel(GralPanelContent panel)` Registers a panel to place the widgets.
    `void` | `registerUserAction(java.lang.String name, GralUserAction action)` Registered any user action.
    `void` | `registerWidget(GralWidget widgd)` Register all widgets, which are created in its own classes, not add here.
    `boolean` | `remove(GralPanelContent compositeBox)` Removes a composite box from the graphic representation.
    `boolean` | `remove(GralWidget widget)`
    `void` | `repaint()` Forces a newly paint of the GUI-container.
    `void` | `repaintCurrentPanel()` Forces a newly paint of the current panel.
    `java.lang.String` | `saveCfg(java.io.Writer dest)` Saves the given configuration.
    `void` | `selectPanel(GralPanelContent panel)` Selects the given panel as current panel to build some content.
    `void` | `selectPanel(java.lang.String sName)` selects a registered panel for the next add-operations.
    `void` | `selectPrimaryWindow()` Selects the primary window as current panel to build some content.
    `void` | `setDesignMode(boolean mode)` Sets or resets the design mode.
    `void` | `setFinePosition(int y, int yFrac, int yEnd, int yEndFrac, int x, int xFrac, int xEnd, int xEndFrac, int origin, char direction, int border, int borderFrac, GralPos frame)` Same as `setPositionSize(int, int, int, int, char)`, but the positions can be in a fine division.
    `GralUserAction` | `setMainKeyAction(GralUserAction userKeyAction)` Sets the action for main keys.
    `void` | `setPosition(float line, float lineEndOrSize, float column, float columnEndOrSize, int origin, char direction)` Sets the position.
    `void` | `setPosition(float line, float lineEnd, float column, float columnEnd, int origin, char direction, float border)` Sets the position with fine position given as float value.
    `void` | `setPosition(GralPos framePos, float line, float lineEnd, float column, float columnEnd, int origin, char direction)` Sets the position in relation to a given position.
    `void` | `setPosition(GralPos framePos, float line, float lineEnd, float column, float columnEnd, int origin, char direction, float border)`
    `void` | `setPositionSize(int line, int column, int height, int length, char direction)` Sets the position and size for the next widget to add in the container.
    `void` | `setSize(int ySize, int ySizeFrac, int xSize, int xSizeFrac)` Sets the next position if the position is used, but change the size.

- - ### Field Detail

    - #### version

          static final int version

      The version of this interface:
      - 2016-09-01 Hartmut chg: instead extends `ReplaceAlias_ifc` now contains `getReplacerAlias()`. It is an extra class for a ReplacerAlias given independent of the graphic.
      - 2016-07-20 Hartmut chg: instead setToPanel now `#createImplWidget_Gthread()`. It is a better name.
      - 2012-04-01 Hartmut new: `#addDataReplace(Map)`, `#replaceDataPathPrefix(String)`. using alias in the `GralWidget.setDataPath(String)`. The resolving of the alias is done only if the datapath is used.
      - 2012-03-10 Hartmut chg: Rename this class to GralMngBuild_ifc
      - 2012-03-09 Hartmut new: `addCheckButton(String, String, String, String, GralColor, GralColor, GralColor)`
      - 2012-02-11 Hartmut new: `#setContextMenu(GralWidget, GralMenu)`.
      - 2011-11-16 Hartmut new: `addText(String)` simple with standards.
      - 2011-11-17 Hartmut chg: `createWindow(String, String, int)` now not only exclusive or not but with some control bits `GralWindow_ifc.windExclusive` etc.
      - 2011-06-18 Hartmut chg: createFileDialog() improved, new addFileSelectField(): A Field that comprises the possibility to open a file select dialog and that are a destination for drop or paste a file mime type from clipboard.
      - 2011-05-01 Hartmut new: `#addTextBox(GralWidget, boolean, String, char)`: A Text box with more as one line. The TextField has only one line.
      - 2011-05-01 Hartmut new: `#createCompositeBox()`. It is a box with its own PanelMng which is located in an area of another panel. (Composite)
      - 2011-05-01 Hartmut new: `#remove(GralGridBuild_ifc)` and `remove(GralWidget)` to remove widgets, for dynamic views.
      - 2011-05-01 Hartmut new: `#createWindow(String, boolean)` instead createModalWindow(String). This method should be used for any sub-windows in the application. The window position is determined inside the current window with the known `setPositionSize(int, int, int, int, char)` functionality. The `#createWindow(int, int, int, int, VariableContainer_ifc)` with absolute coordinates may be deprecated. (Is it necessary to create a window outside the own borders? )
      - All other changes in 2010
      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

    - #### propZoomedPanel

          static final int propZoomedPanel

      See Also:
        Constant Field Values

    - #### propGridZoomedPanel

          static final int propGridZoomedPanel

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setMainKeyAction

          GralUserAction setMainKeyAction(GralUserAction userKeyAction)

      Sets the action for main keys. Main keys are used in an application independent of the focused widget. The `GralUserAction.userActionGui(int, GralWidget, Object...)` is invoked on any key down event, exclusive some graphic implementation specific keys. The user should return false in this method if the key is not used and should not be blocked for widget specific key listeners.
      Parameters:
        `userKeyAction` - The user action to process main keys.
      Returns:
        the last set user action.

    - #### getReplacerAlias

          ReplaceAlias_ifc getReplacerAlias()

    - #### registerPanel

          void registerPanel(GralPanelContent panel)

      Registers a panel to place the widgets. The panel can be selected with its name calling the `selectPanel(String)` -Routine
      parameter panel:
      - Swing: javax.swing.JPanel
      - SWT: org.eclipse.swt.widgets.Composite
      Parameters:
        `name` - Name of the panel.
        `panel` - The panel. It should be from the correct type of the base-graphic-system. If it the instance is fault, a ClassCastException is thrown.

    - #### addTabbedPanel

          GralTabbedPanel addTabbedPanel(java.lang.String namePanel,
                                         GralPanelActivated_ifc user,
                                         int properties)

      Adds a panel for tabs as child of the current panel.
      Parameters:
        `user` - If not null, then this user class will be notified when a tab is selected. The user should update showed values.
        `properties` - use or of constants `propZoomedPanel`, `propGridZoomedPanel`
      Returns:
        The tab-container, there the tabs can be registered.

    - #### selectPanel

          void selectPanel(java.lang.String sName)

      selects a registered panel for the next add-operations. see `#registerPanel(String, Object)`.

    - #### selectPanel

          void selectPanel(GralPanelContent panel)

      Selects the given panel as current panel to build some content.

    - #### selectPrimaryWindow

          void selectPrimaryWindow()

      Selects the primary window as current panel to build some content.

    - #### setPositionSize

          void setPositionSize(int line,
                               int column,
                               int height,
                               int length,
                               char direction)

      Sets the position and size for the next widget to add in the container.
      Parameters:
        `line` - y-Position in y-Units, count from top of the box. It is either the top or bottom line of the widget, depending on height. If < 0, then the previous position is valid furthermore.
        `column` - x-Position in x-Units, count from left of the box. If < 0, then the previous position is valid furthermore.
        `heigth` - The height of the line. If <0, then the param line respectively the current line will be used as bottom line of the next widget, and (line-height) is the top line. If 0 then the last value of height is taken furthermore.
        `length` - The number of columns. If <0, then the param column is the right column, and column-length is the left column. If 0 then the last value of length is not changed.
        `direction` - direction for a next widget, use 'r', 'l', 'u', 'd' for right, left, up, down

    - #### setPosition

          void setPosition(float line,
                           float lineEndOrSize,
                           float column,
                           float columnEndOrSize,
                           int origin,
                           char direction)

      Sets the position.
      Parameters:
        `framePos` - The given frame.
        `line` - The line. Positive: from top, negative: from end.
        `lineEndOrSize` - The position of end of widget. negative or 0: from end. 0: the end position of Panel. see `GralPos.same` etc.
        `column` -
        `columnEndOrSize` -

    - #### setPosition

          void setPosition(GralPos framePos,
                           float line,
                           float lineEnd,
                           float column,
                           float columnEnd,
                           int origin,
                           char direction)

      Sets the position in relation to a given position.
      Parameters:
        `framePos` - The given frame.
        `line` - The line
        `lineEnd` -
        `column` -
        `columnEnd` -

    - #### setPosition

          void setPosition(GralPos framePos,
                           float line,
                           float lineEnd,
                           float column,
                           float columnEnd,
                           int origin,
                           char direction,
                           float border)

    - #### setPosition

          void setPosition(float line,
                           float lineEnd,
                           float column,
                           float columnEnd,
                           int origin,
                           char direction,
                           float border)

      Sets the position with fine position given as float value. Only one digit after the float point is regarded, see definition for the fine position as description of `GralPos`.
      Parameters:
        `line` - either position or combinded with `GralPos.refer` etc.
        `lineEnd` -
        `column` -
        `columnEnd` -
        `origin` - see `setFinePosition(int, int, int, int, int, int, int, int, int, char, int, int, GralPos)`
        `direction` -
        `border` -

    - #### setFinePosition

          void setFinePosition(int y,
                               int yFrac,
                               int yEnd,
                               int yEndFrac,
                               int x,
                               int xFrac,
                               int xEnd,
                               int xEndFrac,
                               int origin,
                               char direction,
                               int border,
                               int borderFrac,
                               GralPos frame)

      Same as `setPositionSize(int, int, int, int, char)`, but the positions can be in a fine division.
      Parameters:
        `y` - The line.
        `yFrac` - Number between 0..9 for fine positioning in the grid step.
        `yEnd` -
        `yEndFrac` - Number between 0..9 for fine positioning in the grid step.
        `x` -
        `xFrac` - Number between 0..9 for fine positioning in the grid step.
        `xEnd` -
        `xEndFrac` - Number between 0..9 for fine positioning in the grid step.
        `direction` - Direction of the next position if that is not given than or `GralPos.next` is given than. A value other then r, l, u, d let the direction unchanged from previous call.
        `origin` - Origin of inner widgets or next widgets. Use:

                    1    4    7
                    2    5    8
                    3    6    9

        for the origin points. (origin-1) %3 is the horizontal origin, (origin-1 /3) is the vertical one. A value 0 let the origin unchanged from previous call.

    - #### setSize

          void setSize(int ySize,
                       int ySizeFrac,
                       int xSize,
                       int xSizeFrac)

      Sets the next position if the position is used, but change the size.
      Parameters:
        `ySize` -
        `ySizeFrac` -
        `xSize` -
        `xSizeFrac` -

    - #### getPositionInPanel

          @Deprecated
          GralPos getPositionInPanel()

      Deprecated. see `GralWidget.ImplAccess`.
      Gets the current position in the panel to store anywhere other. Usual the position is stored in the widget itself. This operation returns an independent instance of GralGridPos. Note that the `GralMng.pos()` is reused there. Therefore the implementation of the method returns a cloned instance.
      Returns:
        An independent instance with current data of `GralMng.pos()`.

    - #### addButton

          GralButton addButton(java.lang.String sName,
                               GralUserAction action,
                               java.lang.String sCmd,
                               java.lang.String sDataPath,
                               java.lang.String sButtonText)

      Adds a button
      Parameters:
        `sButtonText` - text in the button
        `height` - in grid-units
        `width` - in grid-unigs
        `sCmd` - The command string will be transfered to the action-method
        `sUserAction` - The user action shoult be registered before calling `registerUserAction(String, GralUserAction)`
        `sName` -
      Returns:

    - #### addButton

          GralButton addButton(java.lang.String sName,
                               GralUserAction action,
                               java.lang.String sButtonText)

      Adds a button
      Parameters:
        `sButtonText` - text in the button
        `height` - in grid-units
        `width` - in grid-unigs
        `sCmd` - The command string will be transfered to the action-method
        `sUserAction` - The user action shoult be registered before calling `registerUserAction(String, GralUserAction)`
        `sName` -
      Returns:

    - #### addSwitchButton

          GralButton addSwitchButton(java.lang.String sName,
                                     GralUserAction action,
                                     java.lang.String sCmd,
                                     java.lang.String sDataPath,
                                     java.lang.String sButtonText,
                                     java.lang.String color0,
                                     java.lang.String color1)

      Adds a button which saves its state, pressed or non-pressed.
      Parameters:
        `sName` -
        `action` -
        `sCmd` -
        `sShowMethod` -
        `sDataPath` -
        `sButtonText` -
      Returns:

    - #### addSwitchButton

          GralButton addSwitchButton(java.lang.String sName,
                                     java.lang.String sButtonTextOff,
                                     java.lang.String sButtonTextOn,
                                     GralColor colorOff,
                                     GralColor colorOn)

      Adds a button which is switching on or off. The state is shown with 2 colors and 2 different texts inside the button. The state is able to retrieve calling `GralButton.isOn()` or `GralWidget.getValue()`.
      Parameters:
        `sName` -
        `sButtonText0` -
        `sButtonText1` -
        `color0` -
        `color1` -
      Returns:

    - #### addCheckButton

          GralButton addCheckButton(java.lang.String sName,
                                    java.lang.String sButtonTextOn,
                                    java.lang.String sButtonTextOff,
                                    java.lang.String sButtonTextDisabled,
                                    GralColor colorOn,
                                    GralColor colorOff,
                                    GralColor colorDisabled)

      Adds a button which is switching on or off. The state is shown with 2 colors and 2 different texts inside the button. The state is able to retrieve calling `GralButton.isOn()` or `GralWidget.getValue()`.
      Parameters:
        `sName` -
        `sButtonText0` -
        `sButtonText1` -
        `color0` -
        `color1` -
      Returns:

    - #### addLed

          GralLed addLed(java.lang.String sName,
                         java.lang.String sDataPath)

      Adds a Led (round)
      Parameters:
        `sName` -
      Returns:

    - #### addValueBar

          GralValueBar addValueBar(java.lang.String sName,
                                   java.lang.String sDataPath)

    - #### addSlider

          GralWidget addSlider(java.lang.String sName,
                               GralUserAction action,
                               java.lang.String sShowMethod,
                               java.lang.String sDataPath)

    - #### addTable

          @Deprecated
          GralTable addTable(java.lang.String sName,
                                          int height,
                                          int[] columnWidths)

      Deprecated. Create an instance of `GralTable` and call `GralWidget.setToPanel(GralMngBuild_ifc)`
      Adds a table, which is able to scroll. A user action on the GUI with the table invokes the `GralWidget.setActionChange(GralUserAction)` with
      - with given command "table-key".
      - values[0] is the selected line referenced with `GralTableLine_ifc`
      - values[1] is the key code described in `KeyCode`
      If the method isn't given or returns false, the central key action given in `GralMng.getRegisteredUserAction(String)` for "keyAction" is tried to get and then invoked with cmd = "key" and the key code in values[0]. This central keyAction may be used for application centralized keys without association to the table itself.
      Parameters:
        `sName` - register name, used for `GuiPanelMngWorkingIfc#insertInfo(String, int, String).`
        `height` - The height in grid units for the appearance
        `columnWidths` - Array with width of the columns. Each column has a fix default width per construction. It may or may not a fix widht, it may able to change by mouse actions, adequate to the possibilities of the used graphic base system.
      Returns:

    - #### createImplWidget_Gthread

          void createImplWidget_Gthread(GralWidget widgg)

      This routine is called from `GralWidget.setToPanel(GralMngBuild_ifc)`. It is not intent to call from the application immediately. Use `GralWidget.setToPanel(GralMngBuild_ifc)` instead. The implementation of this routine checks the type of the widget and invokes the proper routine for the implementation graphic in the implementation level of the `GralMng`.
      Parameters:
        `widgg` - The widget should be initialized already.

    - #### addText

          GralWidget addText(java.lang.String sText)

      Adds a text to the current panel at given position with standard colors, left origin. The size of text is calculated using the height of positioning values.
      Parameters:
        `text` -

    - #### addText

          @Deprecated
          GralWidget addText(java.lang.String sText,
                                          char size,
                                          int color)

      Deprecated.
      Adds a simple text at the current position.
      Parameters:
        `sText` - The text
        `size` - size, 'A' is small ...'E' is large.
        `color` - The color as RGB-value in 3 Byte. 0xffffff is white, 0xff0000 is red.
      Returns:

    - #### addText

          GralWidget addText(java.lang.String sText,
                             int origin,
                             GralColor textColor,
                             GralColor BackColor)

      Adds a simple text at the current position.
      Parameters:
        `sText` -
        `origin` - Origin, use char 1..9 for 1 top-left, 2 top-middle, ... 5 middle, 9 bottom-right.
        `textColor` -
        `BackColor` -
      Returns:

    - #### addImage

          java.lang.Object addImage(java.lang.String sName,
                                    java.io.InputStream imageStream,
                                    int height,
                                    int width,
                                    java.lang.String sCmd)

    - #### addLine

          @Deprecated
          void addLine(int colorValue,
                                    float xa,
                                    float ya,
                                    float xe,
                                    float ye)

      Deprecated. it is the old form before a `GralPlotArea` was created. Use that.
      Adds a line.
      To adding a line is only possible if the current panel is of type `SwtCanvasStorePanel`. This class stores the line coordinates and conditions and draws it as background if drawing is invoked.
      Parameters:
        `colorValue` - The value for color, 0xffffff is white, 0xff0000 is red.
        `xa` - start of line relative to current position in grid units. The start is relative to the given position! Not absolute in window!
        `ya` - start of line relative to current position in grid units.
        `xe` - end of line relative to current position in grid units.
        `ye` - end of line relative to current position in grid units.

    - #### addLine

          void addLine(GralColor color,
                       java.util.List<GralPoint> points)

      Adds a line.
      To adding a line is only possible if the current panel is of type `SwtCanvasStorePanel`. This class stores the line coordinates and conditions and draws it as background if drawing is invoked.
      Parameters:
        `color` -
        `points` -

    - #### addTextField

          GralTextField addTextField(java.lang.String name,
                                     boolean editable,
                                     java.lang.String prompt,
                                     java.lang.String promptStylePosition)

      Adds a text field at the current position.
      Parameters:
        `name` - The registering name to get the value from outside or set the content.
        `editable` - true then an input field, false only for show
        `prompt` - If not null, then this prompt text is shown above, left, rigth
        `promptStylePosition` - Position and size of description label: upper case letter: normal font, lower case letter: small font 'l' left, 't' top (above field)
      Returns:
        The WidgetDescriptor. An action, tooltip, color etc. can be set there later.

    - #### addTextBox

          GralTextBox addTextBox(java.lang.String name,
                                 boolean editable,
                                 java.lang.String prompt,
                                 char promptStylePosition)

      Adds a box for editing or showing a text.
      The current content of the edit field is able to get anytime calling `GralMng_ifc.getValue(String)` with the given registering name.
      To force a set of content or an action while getting focus of this field the method `#addActionFocused(String, GralUserAction, String)` can be called after invoking this method (any time, able to change). The `GralUserAction#userActionGui(String, String, GralWidget, Map)` is called in the GUI-thread before the field gets the focus.
      To force a check of content or an action while finish editing the method `#addActionFocusRelease(String, GralUserAction, String)` can be called after invoking this method (any time, able to change). The adequate userActionGui is called after editing the field.
      If the `GralWidget#action` refers an instance of type `GralUserAction`, than it is the action on finish editing.
      Parameters:
        `sName` - The registering name
        `widgetInfo` - The informations about the textfield.
        `editable` - true than edit-able, false to show content
        `prompt` - If not null, than a description label is shown
        `promptStylePosition` - Position and size of description label: upper case letter: normal font, lower case letter: small font 'l' left, 't' top (above field)
      Returns:

    - #### addHtmlBox

          GralHtmlBox addHtmlBox(java.lang.String name)

      Adds a box which presents html content.
      Parameters:
        `sName` - The registering name
      Returns:
        The instance arranged in the current panel at current position of the GralWidgetMng

    - #### addCurveViewY

          GralCurveView addCurveViewY(java.lang.String sName,
                                      int nrofXvalues,
                                      GralCurveView.CommonCurve common)

      Adds a curve view for displaying values with ordinary x-coordinate. The scaling of the curve view is set to -100..100 per default.
      Parameters:
        `sName` - Its registered name
        `dyGrid` - height in grid-units
        `dxGrid` - width in grid-units
        `nrofXvalues` - depth of the buffer for x-values. It should be 6..20 times of dx.
        `nrofTracks` - number of curves (tracks).
      Returns:
        The Canvas Object.

    - #### addFileSelectField

          GralTextField addFileSelectField(java.lang.String name,
                                           java.util.List<java.lang.String> listRecentFiles,
                                           java.lang.String startDirMask,
                                           java.lang.String prompt,
                                           java.lang.String promptStylePosition)

      Adds a special text field to select a file. On the right side a small button [<] is arranged to open the standard file select dialog. The text field is a receiver of file objects for drag % drop or paste the clipboard.
      Parameters:
        `name` - Name of the widget
        `listRecentFiles` - maybe null, a list which stores and offers selected files.
        `defaultDir` - The start directory on open the dialog.
        `startDirMask` - The start dir and selection mask. Both are separated with a ':' character in this string. See `GralFileDialog_ifc`. If the last or only one char is '/' then a directory should be selected. For example "D:/MyDir:*.txt" shows only .txt-files to select in the dialog starting from d:/MyDir.
        `prompt` - Prompt for the text field.
        `promptStylePosition` -
      Returns:

    - #### addFocusAction

          GralWidget addFocusAction(java.lang.String sName,
                                    GralUserAction action,
                                    java.lang.String sCmdEnter,
                                    java.lang.String sCmdRelease)

      Adds the given Focus action to the named widget.
      Parameters:
        `sName` - The name of the widget. It should be registered calling any add... method.
        `action` -
        `sCmdEnter` -
        `sCmdRelease` -
      Returns:

    - #### addFocusAction

          void addFocusAction(GralWidget widgetInfo,
                              GralUserAction action,
                              java.lang.String sCmdEnter,
                              java.lang.String sCmdRelease)

      Adds the given Focus action to the known widget.
      Parameters:
        `widgetInfo` -
        `action` -
        `sCmdEnter` -
        `sCmdRelease` -

    - #### registerWidget

          void registerWidget(GralWidget widgd)

      Register all widgets, which are created in its own classes, not add here. The widgets are stored in the index of names.
      Parameters:
        `widgd` -

    - #### getColorValue

          int getColorValue(java.lang.String sName)

      Gets the value to the named color. It is a method of the graphic.
      Parameters:
        `sName` - supported: red, green, blue, yellow
      Returns:
        3 bytes intensity: bit23..16 blue, bit15..8: green, bit 7..0 red.

    - #### getColor

          GralColor getColor(java.lang.String sName)

      Gets the named color.
      Parameters:
        `sName` - supported: red, green, blue, yellow

    - #### repaint

          void repaint()

      Forces a newly paint of the GUI-container. This method should only be called in the graphic thread (SWT).

    - #### repaintCurrentPanel

          void repaintCurrentPanel()

      Forces a newly paint of the current panel. This method should only be called in the graphic thread. It should be used after changing content.

    - #### registerUserAction

          void registerUserAction(java.lang.String name,
                                  GralUserAction action)

      Registered any user action. A registered user action is used especially for a script build GUI. Action can be given by this register name.
      The registering of user actions should be done at startup of the application, before the `GralCfgBuilder.buildGui(org.vishia.msgDispatch.LogMessage, int)` is invoked. The user actions can be called in any specialized context.
      Parameters:
        `name` - Name of the action
        `action` - what to do.

    - #### getRegisteredUserAction

          GralUserAction getRegisteredUserAction(java.lang.String name)

    - #### getShowFields

          java.util.Set<java.util.Map.Entry<java.lang.String,GralWidget>> getShowFields()

      Returns a Set of all fields, which are created to show.
      Returns:
        the set, never null, possible an empty set.

    - #### createCompositeBox

          GralPanelContent createCompositeBox(java.lang.String name)

      Creates a box inside the current panel to hold some widgets.
      Returns:
      Since:
        2010-05-01

    - #### createGridPanel

          GralPanelContent createGridPanel(java.lang.String namePanel,
                                           GralColor backGround,
                                           int xG,
                                           int yG,
                                           int xS,
                                           int yS)

      Creates an independent grid panel which is managed by this. The panel can be associated to any graphic frame.
      Parameters:
        `namePanel` -
        `backGround` -
        `xG` -
        `yG` -
        `xS` -
        `yS` -
      Returns:

    - #### remove

          boolean remove(GralPanelContent compositeBox)

      Removes a composite box from the graphic representation.
      Parameters:
        `compositeBox` -
      Returns:
        true if removed.

    - #### remove

          boolean remove(GralWidget widget)

    - #### createWindow

          @Deprecated
          GralWindow createWindow(java.lang.String name,
                                               java.lang.String title,
                                               int windProps)

      Deprecated. use `GralWindow.GralWindow(String, String, String, int)` and then `GralWidget.createImplWidget_Gthread()` with this window.
      Creates a Window for a modal or non modal dialog. The window is described by the returned interface. It can be filled with elements. The dialog is able to show and hide calling `GralWindow_setifc.setWindowVisible(boolean)` or `GralMng_ifc#setWindowsVisible(GralWindow_ifc, GralPos)`. The position and size of the window is set with the adequate strategy like all other widget: using `setPositionSize(int, int, int, int, char)`.
      Parameters:
        `title` - Title of the window, may be null, then without title bar.
        `windProps` - Or of the static variables `GralWindow_ifc.windExclusive` etc.
      Returns:

    - #### createTextInfoBox

          GralInfoBox createTextInfoBox(java.lang.String name,
                                        java.lang.String title)

    - #### createHtmlInfoBox

          GralInfoBox createHtmlInfoBox(java.lang.String posString,
                                        java.lang.String name,
                                        java.lang.String title,
                                        boolean onTop)

    - #### buildCfg

          void buildCfg(GralCfgData data,
                        java.io.File fileCfg)

      Sets the builder for content configuration.
      Parameters:
        `cfgBuilder` -

    - #### setDesignMode

          void setDesignMode(boolean mode)

      Sets or resets the design mode. The design mode allows to change the content.
      Parameters:
        `mode` -

    - #### saveCfg

          java.lang.String saveCfg(java.io.Writer dest)

      Saves the given configuration.
      Parameters:
        `dest` -
      Returns:

    - #### createFileDialog

          GralFileDialog_ifc createFileDialog()

      Creates a file or directory dialog. The dialog can be activated (showed) any time. The dialog is showed in a own window, maybe modal or not.
      Returns:
        Interface to deal with the dialog.