org.vishia.gral.cfg

## Class GralCfgPosition

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

- All Implemented Interfaces:
    java.lang.Cloneable

      public final class GralCfgPosition
      extends java.lang.Object
      implements java.lang.Cloneable

  ZBNF: position::= ... ; Class for instance to capture and store the position in an element.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `panel`
    `static int` | `version` Version and history Copyright/Copyleft: For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid.
    `(package private) boolean` | `xIncr_`
    `int` | `xPos`
    `int` | `xPosFrac`
    `boolean` | `xPosRelative`
    `int` | `xSizeFrac`
    `int` | `xWidth`
    `(package private) boolean` | `yIncr_`
    `int` | `yPos`
    `int` | `yPosFrac`
    `boolean` | `yPosRelative`
    `int` | `ySizeDown`
    `int` | `ySizeFrac`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralCfgPosition()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected GralCfgPosition` | `clone()`
    `void` | `set_xIncr()`
    `void` | `set_xOwnSize()`
    `void` | `set_yIncr()`
    `void` | `set_yOwnSize()`
    `void` | `set(GralCfgPosition src)` Sets all data from src.
    `boolean` | `setPosElement(char what, java.lang.String sVal)` Sets a position element.

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

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

- - ### Field Detail

    - #### version

          public static final int version

      Version and history
      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

    - #### panel

          public java.lang.String panel

    - #### yPosRelative

          public boolean yPosRelative

    - #### yPos

          public int yPos

    - #### yPosFrac

          public int yPosFrac

    - #### ySizeDown

          public int ySizeDown

    - #### ySizeFrac

          public int ySizeFrac

    - #### yIncr_

          boolean yIncr_

    - #### xPosRelative

          public boolean xPosRelative

    - #### xPos

          public int xPos

    - #### xPosFrac

          public int xPosFrac

    - #### xWidth

          public int xWidth

    - #### xSizeFrac

          public int xSizeFrac

    - #### xIncr_

          boolean xIncr_

  - ### Constructor Detail

    - #### GralCfgPosition

          public GralCfgPosition()

  - ### Method Detail

    - #### set_xIncr

          public void set_xIncr()

    - #### set_yIncr

          public void set_yIncr()

    - #### set_xOwnSize

          public void set_xOwnSize()

    - #### set_yOwnSize

          public void set_yOwnSize()

    - #### clone

          protected GralCfgPosition clone()

      Overrides:
        `clone` in class `java.lang.Object`

    - #### set

          public void set(GralCfgPosition src)

      Sets all data from src. It is similar as `clone()` but it uses a given instance.
      Parameters:
        `src` - of data

    - #### setPosElement

          public boolean setPosElement(char what,
                                       java.lang.String sVal)

      Sets a position element. It is able to call from a configuration input or gui input.
      Parameters:
        `what` - use y, x, h, w for pos-y, pos-x, height, width. All other chars causes an IllegalArgumentException.
        `sVal` - String given Value in ZBNF-syntax-form ::=[< ?posRelative> &+]< #?val>[ \. <#?frac> ]. Fault inputs causes return false. It should not have leeding or trailing spaces! Trim outside. It is admissible that the string is empty, then no action is done.
      Returns:
        true on success. False if the sVal contains numberFormat errors. True on empty sVal