org.vishia.gral.cfg

## Class GralCfgBuilder

- java.lang.Object
- - org.vishia.gral.cfg.GralCfgBuilder

-     public class GralCfgBuilder
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private GralCfgData` | `cfgData`
    `private java.io.File` | `currentDir` The current directory is that directory, where the config file is located.
    `private GralMngBuild_ifc` | `gralMng`
    `private java.util.Map<java.lang.String,java.lang.String>` | `indexAlias`
    `static int` | `version` Version and history 2015-04-27 Hartmut chg: `buildGui(LogMessage, int)` Now regards only one panel in the window, not only tabbed panels.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralCfgBuilder(GralCfgData cfgData, GralMngBuild_ifc gui, java.io.File currentDir)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `buildGui(LogMessage log, int msgIdent)`
    `java.lang.String` | `buildPanel(GralCfgPanel cfgDataPanel)` Builds the appearance of one panel with the given `GralCfgPanel` cfgData.
    `java.lang.String` | `buildWidget(GralCfgElement cfge)` Builds the graphical widget inclusive its `GralWidget` and place it in the GUI.
    `(package private) java.lang.String` | `replaceAlias(java.lang.String src)`
    `(package private) void` | `stop()`
    `void` | `updatePanel(java.lang.String panelName)`
    `GralCfgElement` | `XXXnewCfgElement(GralCfgElement previous)`

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

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

- - ### Field Detail

    - #### version

          public static final int version

      Version and history
      - 2015-04-27 Hartmut chg: `buildGui(LogMessage, int)` Now regards only one panel in the window, not only tabbed panels.
      - 2014-02-24 Hartmut new element help now also in config.
      - 2012-09-17 Hartmut chg: showMethod now split functionName and parameters. The function name is used to get the `GralUserAction` for `GralWidget.setActionShow(GralUserAction, String[])`. The parameter are stored in `GralWidget.cfg` as `GralWidget.ConfigData#showParam`.
      - 2011-05-00 Hartmut created, the old ZbnfCfg.. class is obsolte now.
      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

    - #### cfgData

          private final GralCfgData cfgData

    - #### gralMng

          private final GralMngBuild_ifc gralMng

    - #### currentDir

          private final java.io.File currentDir

      The current directory is that directory, where the config file is located. It is used if other files are given with relative path.

    - #### indexAlias

          private final java.util.Map<java.lang.String,java.lang.String> indexAlias

  - ### Constructor Detail

    - #### GralCfgBuilder

          public GralCfgBuilder(GralCfgData cfgData,
                                GralMngBuild_ifc gui,
                                java.io.File currentDir)

  - ### Method Detail

    - #### XXXnewCfgElement

          public GralCfgElement XXXnewCfgElement(GralCfgElement previous)

    - #### buildGui

          public java.lang.String buildGui(LogMessage log,
                                           int msgIdent)

      Parameters:
        `log` -
        `msgIdent` -
      Returns:

    - #### buildPanel

          public java.lang.String buildPanel(GralCfgPanel cfgDataPanel)

      Builds the appearance of one panel with the given `GralCfgPanel` cfgData.
      Parameters:
        `cfgDataPanel` -
      Returns:
        null if ok, elsewhere the error hints, one per line.

    - #### buildWidget

          public java.lang.String buildWidget(GralCfgElement cfge)
                                       throws java.text.ParseException

      Builds the graphical widget inclusive its `GralWidget` and place it in the GUI.
      Parameters:
        `cfge` - The configuration element data read from config file or set from the GUI-editor.
      Returns:
        null if OK, an error String for a user info message on warning or error. It is possible that a named user action is not found etc.
      Throws:
        `java.text.ParseException`

    - #### updatePanel

          public void updatePanel(java.lang.String panelName)

    - #### replaceAlias

          java.lang.String replaceAlias(java.lang.String src)

    - #### stop

          void stop()