Type | Property and Description |
---|---|
javafx.beans.property.Property<javafx.scene.paint.LinearGradient> |
advancedLinearGradient
Returns a writable
Property for the advanced gradient. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADVANCED_LINEAR_GRADIENT_PROPERTY
Property name used in change events related to
advancedLinearGradientProperty() |
Constructor and Description |
---|
FXAdvancedLinearGradientPicker(Composite parent,
javafx.scene.paint.Color color1,
javafx.scene.paint.Color color2,
javafx.scene.paint.Color color3)
Constructs a new
FXAdvancedLinearGradientPicker . |
Modifier and Type | Method and Description |
---|---|
javafx.beans.property.Property<javafx.scene.paint.LinearGradient> |
advancedLinearGradientProperty()
Returns a writable
Property for the advanced gradient. |
static javafx.scene.paint.LinearGradient |
createAdvancedLinearGradient(javafx.scene.paint.Color c1,
javafx.scene.paint.Color c2,
javafx.scene.paint.Color c3)
Creates an "advanced" linear color gradient with 3 stops from the given
colors.
|
protected void |
createStop(double offset)
Creates a new spot for the given offset.
|
javafx.scene.paint.LinearGradient |
getAdvancedLinearGradient()
Returns the currently selected advanced gradient.
|
protected double |
getNextOffset(int stopIndex)
Computes the maximum offset for the given stop index.
|
protected double |
getPrevOffset(int stopIndex)
Computes the minimum offset for the given stop index.
|
protected java.util.List<javafx.scene.paint.Stop> |
getStops()
Returns a list of the
Stop s of the currently selected advanced
gradient. |
static boolean |
isAdvancedLinearGradient(javafx.scene.paint.Paint paint)
Returns
true if the given Paint is considered to be
an "advanced" gradient. |
protected void |
removeStop(int index)
Removes the spot specified by the given index.
|
void |
setAdvancedGradient(javafx.scene.paint.LinearGradient advancedLinearGradient)
Sets the gradient managed by this gradient picker to the given value.
|
protected void |
updateDirectionLine()
Updates the direction line to display the current direction (specified by
directionX and directionY).
|
protected void |
updateGradient(java.util.List<javafx.scene.paint.Stop> newStops)
Changes the currently selected advanced gradient to a new linear gradient
that is constructed from the given list of
Stop s. |
protected void |
updateStop(int index,
double offset,
javafx.scene.paint.Color color)
Sets the offset and color of the spot specified by the given index to the
given values.
|
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> advancedLinearGradientProperty
Property
for the advanced gradient.getAdvancedLinearGradient()
public static final java.lang.String ADVANCED_LINEAR_GRADIENT_PROPERTY
advancedLinearGradientProperty()
public FXAdvancedLinearGradientPicker(Composite parent, javafx.scene.paint.Color color1, javafx.scene.paint.Color color2, javafx.scene.paint.Color color3)
FXAdvancedLinearGradientPicker
.parent
- The parent Composite
.color1
- The first color of the initial three-stop
LinearGradient
.color2
- The second color of the initial three-stop
LinearGradient
.color3
- The third color of the initial three-stop
LinearGradient
.public static javafx.scene.paint.LinearGradient createAdvancedLinearGradient(javafx.scene.paint.Color c1, javafx.scene.paint.Color c2, javafx.scene.paint.Color c3)
c1
- The start color.c2
- The middle color (t = 0.5).c3
- The end color.LinearGradient
from the given colors.public static boolean isAdvancedLinearGradient(javafx.scene.paint.Paint paint)
true
if the given Paint
is considered to be
an "advanced" gradient. Otherwise returns false
. An advanced
gradient can either be a linear gradient with at least 3 stops, or any
radial gradient.paint
- The Paint
in question.true
if the given Paint
is considered to be
an "advanced" gradient, othwerise false
.public javafx.beans.property.Property<javafx.scene.paint.LinearGradient> advancedLinearGradientProperty()
Property
for the advanced gradient.getAdvancedLinearGradient()
protected void createStop(double offset)
offset
- The offset for the new spot.public javafx.scene.paint.LinearGradient getAdvancedLinearGradient()
protected double getNextOffset(int stopIndex)
stopIndex
- The index of the stop for which to compute the next offset.protected double getPrevOffset(int stopIndex)
stopIndex
- The index of the stop for which to compute the previous
offset.protected java.util.List<javafx.scene.paint.Stop> getStops()
Stop
s of the currently selected advanced
gradient.Stop
s of the currently selected advanced
gradient.protected void removeStop(int index)
index
- The spot index.public void setAdvancedGradient(javafx.scene.paint.LinearGradient advancedLinearGradient)
advancedLinearGradient
- The new gradient.protected void updateDirectionLine()
protected void updateGradient(java.util.List<javafx.scene.paint.Stop> newStops)
Stop
s.newStops
- The list of Stop
s from which the newly selected
advanced gradient is constructed.protected void updateStop(int index, double offset, javafx.scene.paint.Color color)
index
- The index of the spot.offset
- The new offset for that spot.color
- The new color for that spot.Copyright (c) 2014 itemis AG and others. All rights reserved.