org.vishia.gral.cfg

## Class GralCfgWriter

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

-     public class GralCfgWriter
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) LogMessage` | `log`
    `private java.lang.String` | `sLastPanel`
    `static java.lang.String` | `version` Version and history 2015-27-01 Hartmut new: Now a text field can be set editable.
    `(package private) java.io.Writer` | `writer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralCfgWriter(LogMessage log)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `saveCfg(java.io.Writer dest, GralCfgData cfg)`
    `(package private) void` | `writeButton(GralCfgData.GuiCfgButton ee)`
    `(package private) void` | `writeDataReplace(GralCfgData cfg)`
    `(package private) void` | `writeElement(java.io.Writer ww, GralCfgElement cfge)`
    `(package private) void` | `writeImage(GralCfgData.GuiCfgImage ee)`
    `(package private) void` | `writeInputFile(GralCfgData.GuiCfgInputFile ee)`
    `(package private) void` | `writeLed(GralCfgData.GuiCfgLed ee)`
    `private void` | `writeParam(GralCfgData.GuiCfgWidget pp)`
    `private void` | `writeParam(GralCfgData.GuiCfgWidget pp, java.lang.String sep)`
    `(package private) void` | `writePosition(java.io.Writer ww, GralCfgElement cfge)`
    `(package private) void` | `writeShowField(GralCfgData.GuiCfgShowField ee)`
    `(package private) void` | `writeText(GralCfgData.GuiCfgText ee)`
    `(package private) void` | `writeUnknown(GralCfgData.GuiCfgWidget ee)`

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

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

- - ### Field Detail

    - #### version

          public static final java.lang.String version

      Version and history
      2015-27-01 Hartmut new: Now a text field can be set editable. Usage of a boolean `GralCfgData#editable` instead changing the type of a text field from 'S' to 'T', but in `writeShowField(org.vishia.gral.cfg.GralCfgData.GuiCfgShowField)` it is written as a "InputTextline(...". It means next read of the config reads it as editable.
      - 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

    - #### sLastPanel

          private java.lang.String sLastPanel

    - #### log

          final LogMessage log

    - #### writer

          java.io.Writer writer

  - ### Constructor Detail

    - #### GralCfgWriter

          public GralCfgWriter(LogMessage log)

  - ### Method Detail

    - #### saveCfg

          public java.lang.String saveCfg(java.io.Writer dest,
                                          GralCfgData cfg)

    - #### writeDataReplace

          void writeDataReplace(GralCfgData cfg)
                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeElement

          void writeElement(java.io.Writer ww,
                            GralCfgElement cfge)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writePosition

          void writePosition(java.io.Writer ww,
                             GralCfgElement cfge)
                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeShowField

          void writeShowField(GralCfgData.GuiCfgShowField ee)
                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeLed

          void writeLed(GralCfgData.GuiCfgLed ee)
                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeImage

          void writeImage(GralCfgData.GuiCfgImage ee)
                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeInputFile

          void writeInputFile(GralCfgData.GuiCfgInputFile ee)
                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeButton

          void writeButton(GralCfgData.GuiCfgButton ee)
                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeText

          void writeText(GralCfgData.GuiCfgText ee)
                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeUnknown

          void writeUnknown(GralCfgData.GuiCfgWidget ee)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeParam

          private void writeParam(GralCfgData.GuiCfgWidget pp)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeParam

          private void writeParam(GralCfgData.GuiCfgWidget pp,
                                  java.lang.String sep)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`