org.eclipse.gef.fx.swt.controls

## Class FXColorPicker

- java.lang.Object
- - org.eclipse.swt.widgets.Widget
  - - org.eclipse.swt.widgets.Control
    - - org.eclipse.swt.widgets.Scrollable
      - - org.eclipse.swt.widgets.Composite
        - - org.eclipse.gef.fx.swt.controls.FXColorPicker

All Implemented Interfaces:
  Drawable

    public class FXColorPicker
    extends Composite

An SWT control that can be used to select a JavaFX color (and indicates the selected color via an image).

### Property Summary

All Methods Instance Methods Concrete Methods
`javafx.beans.property.Property<javafx.scene.paint.Color>` `color` A writable property for the color controlled by this `FXColorPicker`.

### Field Summary

Fields
`static java.lang.String` `COLOR_PROPERTY` Property name used in change events related to `colorProperty()`.

### Fields inherited from class org.eclipse.swt.widgets.Control

`view`

### Constructor Summary

Constructors
Constructor and Description
`FXColorPicker(Composite parent, javafx.scene.paint.Color color)` Constructs a new `FXColorPicker`.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`javafx.beans.property.Property<javafx.scene.paint.Color>` `colorProperty()` A writable property for the color controlled by this `FXColorPicker`.
`javafx.scene.paint.Color` `getColor()` Returns the currently selected `Color`.
`protected static javafx.scene.paint.Color` `pickColor(Shell shell, javafx.scene.paint.Color initial)` Opens a `ColorDialog` to let the user pick a `Color`.
`void` `setColor(javafx.scene.paint.Color color)` Changes the currently selected `Color` to the given value.

### Methods inherited from class org.eclipse.swt.widgets.Composite

`changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList`

### Methods inherited from class org.eclipse.swt.widgets.Scrollable

`computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar`

### Methods inherited from class org.eclipse.swt.widgets.Control

`addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update`

### Methods inherited from class org.eclipse.swt.widgets.Widget

`addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString`

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

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

### Property Detail

#### color

    public javafx.beans.property.Property<javafx.scene.paint.Color> colorProperty

A writable property for the color controlled by this `FXColorPicker`.

See Also:
  `getColor()`, `setColor(Color)`

### Field Detail

#### COLOR_PROPERTY

    public static final java.lang.String COLOR_PROPERTY

Property name used in change events related to `colorProperty()`.

See Also:
  Constant Field Values

### Constructor Detail

#### FXColorPicker

    public FXColorPicker(Composite parent,
                         javafx.scene.paint.Color color)

Constructs a new `FXColorPicker`.

Parameters:
  `parent` - The parent `Composite`.
  `color` - The initial `Color` to set.

### Method Detail

#### pickColor

    protected static javafx.scene.paint.Color pickColor(Shell shell,
                                                        javafx.scene.paint.Color initial)

Opens a `ColorDialog` to let the user pick a `Color`. Returns the picked `Color`, or `null` if no color was picked.

Parameters:
  `shell` - The `Shell` which serves as the parent for the `ColorDialog`.
  `initial` - The initial `Color` to display in the `ColorDialog`.
Returns:
  The picked `Color`, or `null`.

#### colorProperty

    public javafx.beans.property.Property<javafx.scene.paint.Color> colorProperty()

A writable property for the color controlled by this `FXColorPicker`.

See Also:
  `getColor()`, `setColor(Color)`

#### getColor

    public javafx.scene.paint.Color getColor()

Returns the currently selected `Color`.

Returns:
  The currently selected `Color`.

#### setColor

    public void setColor(javafx.scene.paint.Color color)

Changes the currently selected `Color` to the given value.

Parameters:
  `color` - The newly selected `Color`.