org.vishia.gral.cfg

## Class GralCfgData

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

-     public final class GralCfgData
      extends java.lang.Object

  This class contains all configuration data for the appearance of the GUI. It can be filled by `GralCfgZbnf` or others. It is changed by user handling on GUI. It can be written out in a new configuration file

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `GralCfgData.Conditional`
    `static class` | `GralCfgData.DataReplace` ZBNF: DataReplace::= <$?
    `static class` | `GralCfgData.GuiCfgButton` ZBNF: Button::= ... ; Class for instance to capture and store the Button data.
    `static class` | `GralCfgData.GuiCfgColor`
    `static class` | `GralCfgData.GuiCfgCoord` ZBNF: |
    `static class` | `GralCfgData.GuiCfgCurveLine` ZBNF: {
    `static class` | `GralCfgData.GuiCfgCurveview` ZBNF: Table::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgImage` ZBNF: Text::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgInputFile` ZBNF: ShowField::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgLed` ZBNF: Text::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgLine` ZBNF: Line::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgShowField` ZBNF: ShowField::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgTable` ZBNF: Table::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgText` ZBNF: Text::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgType` ZBNF: Text::= ... ; Class for instance to capture and store the Table data.
    `static class` | `GralCfgData.GuiCfgWidget` This is the base class of all configuration data for one widget.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) GralCfgPanel` | `actPanel`
    `private GralCfgData.Conditional` | `actualConditional`
    `private GralCfgElement` | `actualElement`
    `(package private) java.util.List<java.lang.String>` | `cfgConditions`
    `java.util.Map<java.lang.String,java.lang.String>` | `dataReplace` Map of replacements of paths to data.
    `private GralCfgData.DataReplace` | `dataReplaceTempInstance` ZBNF: DataReplace::= <$?
    `(package private) GralCfgElement` | `firstElement`
    `private java.util.Map<java.lang.String,GralCfgPanel>` | `idxPanels` Map of replacements of paths to data.
    `(package private) java.util.Map<java.lang.String,GralCfgData.GuiCfgWidget>` | `idxTypes`
    `(package private) java.util.List<GralCfgElement>` | `listElementsInTextfileOrder` TODO widgets sorted to panels and tabs!
    `private GralCfgElement` | `newGuiElement` The element is created if the text if `set_Element(String)` is invoked before `newGuiElement` is invoked.
    `static int` | `version` Version and history 2014-02-24 Hartmut new element help now also in config.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralCfgData(java.util.List<java.lang.String> conditions)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add_Conditional(GralCfgData val)` It is called on end of conditional block.
    `void` | `add_Element(GralCfgElement value)` From ZBNF: DataReplace: < DataReplace>
    `void` | `add_Type(GralCfgData.GuiCfgType data)` ZBNF: Type::= typeName ( param );
    `void` | `add_Window(GralCfgPanel panel)`
    `java.util.Set<java.util.Map.Entry<java.lang.String,GralCfgPanel>>` | `getPanels()`
    `GralCfgData` | `new_Conditional()` ZBNF: DataReplace: < ?
    `GralCfgData.DataReplace` | `new_DataReplace()` From ZBNF: DataReplace: < DataReplace>
    `GralCfgElement` | `new_Element()` ZBNF: DataReplace: < ?
    `GralCfgData` | `new_ElseConditional()` ZBNF: DataReplace: < ?
    `GralCfgData.GuiCfgType` | `new_Type()` ZBNF: Type::= typeName ( param );
    `GralCfgPanel` | `new_Window()`
    `void` | `set_DataReplace(GralCfgData.DataReplace value)` From ZBNF: DataReplace: < DataReplace>
    `void` | `set_Element(java.lang.String val)` ZBNF: DataReplace: < Element>
    `void` | `set_elseCondition()`
    `void` | `set_ifCondition(java.lang.String cond)`
    `void` | `set_xSize(int value)` ZBNF: size( <#?
    `void` | `set_ySize(int value)` ZBNF: size( <#?
    `(package private) void` | `stop()`
    `(package private) void` | `XXXprocessConfiguration(GralMngBuild_ifc panel)`
    `java.lang.String` | `XXXreplacePathPrefix(java.lang.String path, java.lang.String[] target)`

    - ### 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
      - 2014-02-24 Hartmut new element help now also in config.
      - 2013-12-02 Hartmut new conditional configuration.
      - 2012-04-22 Hartmut support `new_Type()`.
      - 2012-02-25 Hartmut chg `GralCfgData.GuiCfgCurveLine.colorValue` = -1 initially to check whether it is given, see `GralCfgBuilder.buildWidget(GralCfgElement)`
      - 2011-06-00 Hartmut created: The old concept was evaluating ZBNF parse result of cfg file manually, now usage of `ZbnfJavaOutput` to write result info in this class.
      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

    - #### cfgConditions

          final java.util.List<java.lang.String> cfgConditions

    - #### firstElement

          GralCfgElement firstElement

    - #### actualElement

          private GralCfgElement actualElement

    - #### actualConditional

          private GralCfgData.Conditional actualConditional

    - #### dataReplaceTempInstance

          private final GralCfgData.DataReplace dataReplaceTempInstance

      ZBNF: DataReplace::= <$?key> = <$-/\.?string> ; Temporary instance to capture key and string.

    - #### newGuiElement

          private GralCfgElement newGuiElement

      The element is created if the text if `set_Element(String)` is invoked before `newGuiElement` is invoked. The association is temporary valid for the current element.

    - #### dataReplace

          public final java.util.Map<java.lang.String,java.lang.String> dataReplace

      Map of replacements of paths to data. Filled from ZBNF: DataReplace::= <$?key> = <$-/\.?string>

    - #### idxTypes

          java.util.Map<java.lang.String,GralCfgData.GuiCfgWidget> idxTypes

    - #### listElementsInTextfileOrder

          final java.util.List<GralCfgElement> listElementsInTextfileOrder

      TODO widgets sorted to panels and tabs!

    - #### actPanel

          GralCfgPanel actPanel

    - #### idxPanels

          private final java.util.Map<java.lang.String,GralCfgPanel> idxPanels

      Map of replacements of paths to data. Filled from ZBNF: DataReplace::= <$?key> = <$-/\.?string>

  - ### Constructor Detail

    - #### GralCfgData

          public GralCfgData(java.util.List<java.lang.String> conditions)

  - ### Method Detail

    - #### getPanels

          public java.util.Set<java.util.Map.Entry<java.lang.String,GralCfgPanel>> getPanels()

    - #### set_ySize

          public void set_ySize(int value)

      ZBNF: size( <#?ySize> , <#?xSize> )

    - #### set_xSize

          public void set_xSize(int value)

      ZBNF: size( <#?ySize> , <#?xSize> )

    - #### new_DataReplace

          public GralCfgData.DataReplace new_DataReplace()

      From ZBNF: DataReplace: < DataReplace>

    - #### set_DataReplace

          public void set_DataReplace(GralCfgData.DataReplace value)

      From ZBNF: DataReplace: < DataReplace>

    - #### new_Conditional

          public GralCfgData new_Conditional()

      ZBNF: DataReplace: < ?Element >[ | | ]

    - #### new_ElseConditional

          public GralCfgData new_ElseConditional()

      ZBNF: DataReplace: < ?Element >[ | | ]

    - #### add_Conditional

          public void add_Conditional(GralCfgData val)

      It is called on end of conditional block.
      Parameters:
        `val` -

    - #### set_ifCondition

          public void set_ifCondition(java.lang.String cond)

    - #### set_elseCondition

          public void set_elseCondition()

    - #### new_Window

          public GralCfgPanel new_Window()

    - #### add_Window

          public void add_Window(GralCfgPanel panel)

    - #### new_Element

          public GralCfgElement new_Element()

      ZBNF: DataReplace: < ?Element >[ | | ]

    - #### add_Element

          public void add_Element(GralCfgElement value)

      From ZBNF: DataReplace: < DataReplace>

    - #### set_Element

          public void set_Element(java.lang.String val)

      ZBNF: DataReplace: < Element>

    - #### new_Type

          public GralCfgData.GuiCfgType new_Type()

      ZBNF: Type::= typeName ( param );

    - #### add_Type

          public void add_Type(GralCfgData.GuiCfgType data)

      ZBNF: Type::= typeName ( param );

    - #### XXXprocessConfiguration

          void XXXprocessConfiguration(GralMngBuild_ifc panel)

    - #### XXXreplacePathPrefix

          public java.lang.String XXXreplacePathPrefix(java.lang.String path,
                                                       java.lang.String[] target)

    - #### stop

          void stop()