org.vishia.gral.cfg

## Class GralCfgWindow

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

-     public class GralCfgWindow
      extends java.lang.Object

  This is the class to build a graphic window in any application which is configurable. It uses an existing instance of the `GralMng`
  Note: See `GuiCfg`, that is an application with 9 areas for configuration.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) GralGraphicTimeOrder` | `configInGthread` Code snippet to run the ZBNF-configurator (text controlled GUI)
    `private GralCfgData` | `guiCfgData` The configuration data for graphical appearance.
    `(package private) java.io.File` | `imgDir` Directory for images.
    `private MainCmdLogging_ifc` | `log`
    `static int` | `version` The version, history and license.
    `GralWindow` | `window`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `GralCfgWindow(java.lang.String sName, java.lang.String sTitle, char size, java.lang.CharSequence sCfg, java.io.File imgDir, MainCmdLogging_ifc log)` Creates a new Window or opens the existing one with given name.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GralWindow` | `createWindow(java.lang.String sName, java.lang.String sTitle, char size, java.lang.CharSequence sCfg, java.io.File imgDir, MainCmdLogging_ifc log)` Creates a window with a given configuration.

    - ### 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

      The version, history and license.
      - 2018-09-17 GralCfgWindow: with argument for size and AWT/SWT
      - 2015-04-26 Hartmut created: For usage in Jzcmd-scripts.
      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 don'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 are intent to use this sources without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

    - #### log

          private final MainCmdLogging_ifc log

    - #### guiCfgData

          private final GralCfgData guiCfgData

      The configuration data for graphical appearance.

    - #### imgDir

          java.io.File imgDir

      Directory for images.

    - #### window

          public final GralWindow window

    - #### configInGthread

          GralGraphicTimeOrder configInGthread

      Code snippet to run the ZBNF-configurator (text controlled GUI)

  - ### Constructor Detail

    - #### GralCfgWindow

          private GralCfgWindow(java.lang.String sName,
                                java.lang.String sTitle,
                                char size,
                                java.lang.CharSequence sCfg,
                                java.io.File imgDir,
                                MainCmdLogging_ifc log)
                         throws java.text.ParseException

      Creates a new Window or opens the existing one with given name.
      Parameters:
        `sName` - Name of the window inside the gral manager to address the window.
        `sTitle` - text in the title bar
        `size` - 'A'...'E' as pixel/grid unit for SWT graphic. 'a'...'e' same for AWT-Graphic
        `sCfg` - textual given configuration for the window.
        `imgDir` - start directory path where images are located if given with relative path.
        `log` - interface for logging output of parser and creation.
      Throws:
        `java.text.ParseException` - on errors in the sCfg

  - ### Method Detail

    - #### createWindow

          public static GralWindow createWindow(java.lang.String sName,
                                                java.lang.String sTitle,
                                                char size,
                                                java.lang.CharSequence sCfg,
                                                java.io.File imgDir,
                                                MainCmdLogging_ifc log)
                                         throws java.text.ParseException

      Creates a window with a given configuration. The window will be removed on closing.
      Parameters:
        `sName` - Name of the window inside the gral manager to address the window.
        `sTitle` - text in the title bar
        `size` - 'A'...'E' as pixel/grid unit for SWT graphic. 'a'...'e' same for AWT-Graphic
        `sCfg` - textual given configuration for the window.
        `imgDir` - start directory path where images are located if given with relative path.
        `log` - log output for status and parse messages
      Throws:
        `java.text.ParseException` - on errors in the sCfg