org.vishia.gral.swt

## Class SwtProperties

- java.lang.Object
- - org.vishia.gral.base.GralGridProperties
  - - org.vishia.gral.swt.SwtProperties

-     public class SwtProperties
      extends GralGridProperties

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `org.eclipse.swt.graphics.Color` | `colorBackground` A common background color for all widgets which are paint at the background.
    `private org.eclipse.swt.graphics.Color` | `colorBlack`
    `org.eclipse.swt.graphics.Color` | `colorGrid`
    `org.eclipse.swt.graphics.Color` | `colorGridStrong`
    `(package private) java.util.Map<java.lang.Integer,org.eclipse.swt.graphics.Color>` | `colorsSwt`
    `private org.eclipse.swt.graphics.Device` | `guiDevice`
    `org.eclipse.swt.graphics.Font` | `smallPromptFont`
    `org.eclipse.swt.graphics.Font` | `stdButtonFont`
    `org.eclipse.swt.graphics.Font` | `stdInputFont`

    - ### Fields inherited from class org.vishia.gral.base.GralGridProperties

      `colorBackground_, fontMonospacedSansSerif, pixelFrac, size, smallPromptFontSize, stdButtonFontSize, stdInputFontSize, stdTextFontSize, textFont, version, xPixelUnit`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwtProperties(org.eclipse.swt.graphics.Device device, char sizeC)` Initializes a properties object.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.eclipse.swt.graphics.Color` | `color(java.lang.String sColorname)` Returns a color with given Gui-independent color name.
    `org.eclipse.swt.graphics.Color` | `colorBackgroundSwt()`
    `org.eclipse.swt.graphics.Color` | `colorSwt(GralColor color)` Returns a color with given Gui-independent color.
    `org.eclipse.swt.graphics.Color` | `colorSwt(int colorValue)` Returns a color with given numeric color value.
    `static GralColor` | `createColorGui(org.eclipse.swt.graphics.Color color)` Creates an instance of a GUI-system independent color with given SWT color.
    `org.eclipse.swt.graphics.Font` | `fontSwt(GralFont font)` Returns a implementation font with given Gui-independent font.
    `org.eclipse.swt.graphics.Font` | `getSwtFont(float fontSize)`
    `(package private) org.eclipse.swt.graphics.Font` | `getTextFontSwt(float fontSize, char type, char style)`

    - ### Methods inherited from class org.vishia.gral.base.GralGridProperties

      `color, getColorValue, getTextFont, getTextFont, xPixelFrac, xPixelUnit, yPixelFrac, yPixelUnit`

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

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

- - ### Field Detail

    - #### guiDevice

          private final org.eclipse.swt.graphics.Device guiDevice

    - #### smallPromptFont

          public final org.eclipse.swt.graphics.Font smallPromptFont

    - #### stdInputFont

          public final org.eclipse.swt.graphics.Font stdInputFont

    - #### stdButtonFont

          public final org.eclipse.swt.graphics.Font stdButtonFont

    - #### colorsSwt

          java.util.Map<java.lang.Integer,org.eclipse.swt.graphics.Color> colorsSwt

    - #### colorBlack

          private final org.eclipse.swt.graphics.Color colorBlack

    - #### colorGrid

          public final org.eclipse.swt.graphics.Color colorGrid

    - #### colorGridStrong

          public final org.eclipse.swt.graphics.Color colorGridStrong

    - #### colorBackground

          public org.eclipse.swt.graphics.Color colorBackground

      A common background color for all widgets which are paint at the background.

  - ### Constructor Detail

    - #### SwtProperties

          public SwtProperties(org.eclipse.swt.graphics.Device device,
                               char sizeC)

      Initializes a properties object.
      Parameters:
        `size` - number between 1..5 to determine the size of the content (font size, pixel per cell)

  - ### Method Detail

    - #### colorSwt

          public org.eclipse.swt.graphics.Color colorSwt(GralColor color)

      Returns a color with given Gui-independent color. The SWT-Color instance is taken from a pool if the color is used already. Elsewhere it is created newly and put into the pool.
      Parameters:
        `color` - The given color in system-indpending form.
      Returns:
        An instance of SWT-color

    - #### colorSwt

          public org.eclipse.swt.graphics.Color colorSwt(int colorValue)

      Returns a color with given numeric color value. The SWT-Color instance is taken from a pool if the color is used already. Elsewhere it is created newly and put into the pool.
      Parameters:
        `colorValue` - red, green and blue
      Returns:
        An instance of SWT-color

    - #### color

          public org.eclipse.swt.graphics.Color color(java.lang.String sColorname)

      Returns a color with given Gui-independent color name. The SWT-Color instance is taken from a pool if the color is used already. Elsewhere it is created newly and put into the pool.
      Parameters:
        `sColorName` - One of the registered color names.
      Returns:
        An instance of SWT-color

    - #### colorBackgroundSwt

          public org.eclipse.swt.graphics.Color colorBackgroundSwt()

    - #### createColorGui

          public static GralColor createColorGui(org.eclipse.swt.graphics.Color color)

      Creates an instance of a GUI-system independent color with given SWT color.
      Parameters:
        `color` - The SWT-color
      Returns:
        a new instance.

    - #### getSwtFont

          public org.eclipse.swt.graphics.Font getSwtFont(float fontSize)

    - #### fontSwt

          public org.eclipse.swt.graphics.Font fontSwt(GralFont font)

      Returns a implementation font with given Gui-independent font. The SWT-Font instance is taken from a pool if the font is used already. Elsewhere it is created newly and put into the pool.
      Parameters:
        `forn` - The given Gral font in system-independent form.
      Returns:
        An instance of SWT-Font

    - #### getTextFontSwt

          org.eclipse.swt.graphics.Font getTextFontSwt(float fontSize,
                                                       char type,
                                                       char style)