org.vishia.gral.widget

## Class GralColorSelector

- java.lang.Object
- - org.vishia.gral.widget.GralColorSelector

-     public class GralColorSelector
      extends java.lang.Object

  This class creates a window with buttons for selecting colors. The window may be created permanently but hided. On calling `#openDialog(String, GralUserAction)` the window is placed in foreground in a concurrently mode. The user have to implement a instance of `GralColorSelector.SetColorIfc`. This interface instance is used as parameter for `openDialog(String, SetColorIfc)` to receive the color. The user should show its graphic with the selected color immediately to see the effect in the users context.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GralColorSelector.SetColorFor` Enumeration to specify what's color is changed.
    `static interface` | `GralColorSelector.SetColorIfc` The user can build some instances with this interface.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private GralUserAction` | `actionSelect_` Action for a color button.
    `(package private) GralColorSelector.SetColorIfc` | `callback`
    `(package private) java.lang.String[][]` | `colors`
    `static int` | `version` Version, history and license.
    `private GralWindow_ifc` | `wind`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralColorSelector(java.lang.String name, GralMngBuild_ifc mng)` Creates the dialog window to select colors.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `openDialog(java.lang.String sTitle, GralColorSelector.SetColorIfc actionSelect)` Opens the window with the given title.

    - ### 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, history and license. The version number is a date written as yyyymmdd as decimal number. Changes:
      - 2013-04-15 Hartmut create new
      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 ist 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

    - #### colors

          java.lang.String[][] colors

    - #### wind

          private final GralWindow_ifc wind

    - #### callback

          GralColorSelector.SetColorIfc callback

    - #### actionSelect_

          private final GralUserAction actionSelect_

      Action for a color button. It calls `callback`

  - ### Constructor Detail

    - #### GralColorSelector

          public GralColorSelector(java.lang.String name,
                                   GralMngBuild_ifc mng)

      Creates the dialog window to select colors. This window may be created only one time for some functionality, if the application is attempt to open only one color selection dialog. Use `openDialog(String, SetColorIfc)` to open the window and specify the destination for selecting colors.

  - ### Method Detail

    - #### openDialog

          public void openDialog(java.lang.String sTitle,
                                 GralColorSelector.SetColorIfc actionSelect)

      Opens the window with the given title. The window is non-exclusive.
      Parameters:
        `sTitle` - The title of the window
        `actionSelect` - called method on press any color button.