Package 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
An SWT control that can be used to select a JavaFX color (and indicates the
selected color via an image).
-
Property Summary
Properties -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty name used in change events related tocolorProperty(). -
Constructor Summary
ConstructorsConstructorDescriptionFXColorPicker(Composite parent, Color color) Constructs a newFXColorPicker. -
Method Summary
Modifier and TypeMethodDescriptionA writable property for the color controlled by thisFXColorPicker.getColor()Returns the currently selectedColor.protected static ColorOpens aColorDialogto let the user pick aColor.voidChanges the currently selectedColorto 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, redraw, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBarMethods 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, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, 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, updateMethods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.swt.graphics.Drawable
isAutoScalable
-
Property Details
-
color
A writable property for the color controlled by thisFXColorPicker.- See Also:
-
-
Field Details
-
COLOR_PROPERTY
Property name used in change events related tocolorProperty().- See Also:
-
-
Constructor Details
-
FXColorPicker
Constructs a newFXColorPicker.
-
-
Method Details
-
pickColor
Opens aColorDialogto let the user pick aColor. Returns the pickedColor, ornullif no color was picked.- Parameters:
shell- TheShellwhich serves as the parent for theColorDialog.initial- The initialColorto display in theColorDialog.- Returns:
- The picked
Color, ornull.
-
colorProperty
A writable property for the color controlled by thisFXColorPicker.- See Also:
-
getColor
Returns the currently selectedColor.- Returns:
- The currently selected
Color.
-
setColor
Changes the currently selectedColorto the given value.- Parameters:
color- The newly selectedColor.
-