public class FXSimpleLinearGradientPicker extends Composite
FXSimpleLinearGradientPicker
allows the selection of two colors
from which a gradient is constructed.Type | Property and Description |
---|---|
javafx.beans.property.Property<javafx.scene.paint.LinearGradient> |
simpleLinearGradient
Returns a writable property for the simple linear gradient.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SIMPLE_LINEAR_GRADIENT_PROPERTY
Property name used in change events related to
simpleLinearGradientProperty() . |
Constructor and Description |
---|
FXSimpleLinearGradientPicker(Composite parent,
javafx.scene.paint.Color color1,
javafx.scene.paint.Color color2)
Constructs a new
FXSimpleLinearGradientPicker . |
Modifier and Type | Method and Description |
---|---|
static javafx.scene.paint.LinearGradient |
createSimpleLinearGradient(javafx.scene.paint.Color c1,
javafx.scene.paint.Color c2)
Creates a simple color gradient from the given start color to the given
end color.
|
javafx.scene.paint.LinearGradient |
getSimpleLinearGradient()
Returns the currently selected simple gradient.
|
static boolean |
isSimpleLinearGradient(javafx.scene.paint.Paint paint)
Returns
true if the given Paint is a "simple"
gradient, i.e. it has exactly 2 stops. |
void |
setSimpleLinearGradient(javafx.scene.paint.LinearGradient simpleLinearGradient)
Changes the currently selected gradient to the given value.
|
javafx.beans.property.Property<javafx.scene.paint.LinearGradient> |
simpleLinearGradientProperty()
Returns a writable property for the simple linear gradient.
|
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
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, 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, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public javafx.beans.property.Property<javafx.scene.paint.LinearGradient> simpleLinearGradientProperty
public static final java.lang.String SIMPLE_LINEAR_GRADIENT_PROPERTY
simpleLinearGradientProperty()
.public FXSimpleLinearGradientPicker(Composite parent, javafx.scene.paint.Color color1, javafx.scene.paint.Color color2)
FXSimpleLinearGradientPicker
.parent
- The parent Composite
.color1
- The first color of the initial simple LinearGradient
.color2
- The second color of the initial simple LinearGradient
.public static javafx.scene.paint.LinearGradient createSimpleLinearGradient(javafx.scene.paint.Color c1, javafx.scene.paint.Color c2)
c1
- The start Color
.c2
- The end Color
.LinearGradient
.public static boolean isSimpleLinearGradient(javafx.scene.paint.Paint paint)
true
if the given Paint
is a "simple"
gradient, i.e. it has exactly 2 stops. Otherwise returns
false
.paint
- The Paint
in question.true
if the given Paint
is a simple
gradient, otherwise false
.public javafx.scene.paint.LinearGradient getSimpleLinearGradient()
public void setSimpleLinearGradient(javafx.scene.paint.LinearGradient simpleLinearGradient)
simpleLinearGradient
- The new simple LinearGradient
to select.public javafx.beans.property.Property<javafx.scene.paint.LinearGradient> simpleLinearGradientProperty()
Copyright (c) 2014 itemis AG and others. All rights reserved.