Class AbstractColorSlider

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
org.jhotdraw8.fxcontrols.colorchooser.AbstractColorSlider
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget
Direct Known Subclasses:
AlphaSlider, ColorRectangleSlider, ColorSlider

public abstract class AbstractColorSlider extends javafx.scene.layout.Pane
Base class for color sliders that support color spaces with up to 4 color components.
  • Property Summary

    Properties
    Type
    Property
    Description
    @NonNull javafx.beans.property.BooleanProperty
    Set this value to true when the user is adjusting a value in another control.
    @NonNull javafx.beans.property.FloatProperty
     
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 0.
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 1.
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 2.
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 3.
    @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
    The color space of the display.
    @NonNull javafx.beans.property.ObjectProperty<ToIntFunction<Integer>>
     
    @NonNull javafx.beans.property.BooleanProperty
    Indicates whether the value of the slider should always be aligned with the tick marks.
    @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
     
    @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
    The color space of the components.
    @NonNull javafx.beans.property.DoubleProperty
     
    @NonNull javafx.beans.property.DoubleProperty
     

    Properties inherited from class javafx.scene.layout.Region

    background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width

    Properties inherited from class javafx.scene.Parent

    needsLayout

    Properties inherited from class javafx.scene.Node

    accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static final record 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final @NonNull javafx.beans.property.BooleanProperty
    Set this value to true when the user is adjusting a value in another control.
    protected final @NonNull javafx.beans.property.FloatProperty
     
    static final int
     
    static final int
     
    protected final @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 0.
    protected final @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 1.
    protected final @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 2.
    protected final @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 3.
    protected final @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
    The color space of the display.
    protected final @NonNull javafx.beans.property.ObjectProperty<ToIntFunction<Integer>>
     
    protected final @NonNull javafx.beans.property.BooleanProperty
    Indicates whether the value of the slider should always be aligned with the tick marks.
    protected final @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
     
    protected final @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
    The color space of the components.
    protected javafx.scene.layout.Region
     
    protected final @NonNull javafx.beans.property.DoubleProperty
     
    protected final @NonNull javafx.beans.property.DoubleProperty
     

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull javafx.beans.property.BooleanProperty
    Set this value to true when the user is adjusting a value in another control.
    @NonNull javafx.beans.property.FloatProperty
     
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 0.
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 1.
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 2.
    @NonNull javafx.beans.property.FloatProperty
    The value of the color component with index 3.
    createFillTask(@NonNull javafx.scene.image.PixelBuffer<IntBuffer> pixelBuffer)
     
    @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
    The color space of the display.
    protected void
     
    float
    Gets the value of the alpha property.
    protected static int
    getArgb(NamedColorSpace scs, NamedColorSpace tcs, NamedColorSpace dcs, float[] colorValue, float[] sRgb, float[] tComponent, float[] dComponent, float[] dRgb, float alpha)
     
    float
    Gets the value of the c0 property.
    float
    Gets the value of the c1 property.
    float
    Gets the value of the c2 property.
    float
    Gets the value of the c3 property.
    Gets the value of the displayColorSpace property.
    static @NonNull URL
     
    protected static int
    getPreArgb(NamedColorSpace dcs, float[] dRgb, float[] pre, float alpha)
     
    Gets the value of the rgbFilter property.
    Gets the value of the sourceColorSpace property.
    Gets the value of the targetColorSpace property.
    double
    Gets the value of the thumbTranslateX property.
    double
    Gets the value of the thumbTranslateY property.
    void
     
    boolean
    Gets the value of the adjusting property.
    boolean
    Gets the value of the snapToTicks property.
    protected void
     
    protected void
    Must be called from the constructor of the subclass!
    protected float
    maybeSnapToTicks(float value, double tickUnit, javafx.scene.input.MouseEvent mouseEvent)
     
    protected abstract void
    onKeyPressed(javafx.scene.input.KeyEvent keyEvent)
     
    protected abstract void
    onMousePressedOrDragged(javafx.scene.input.MouseEvent mouseEvent)
     
    protected static boolean
    outOfGamut(NamedColorSpace colorSpace, float[] component)
    If epsilon is 0, we get the best rendering with OK LCH: the shape is a triangle with a straight line from the bottom left to the right, and a curved line from the right to the top left.
    @NonNull javafx.beans.property.ObjectProperty<ToIntFunction<Integer>>
     
    void
    setAdjusting(boolean adjusting)
    Sets the value of the adjusting property.
    void
    setAlpha(float alpha)
    Sets the value of the alpha property.
    void
    setC0(float c0)
    Sets the value of the c0 property.
    void
    setC1(float c1)
    Sets the value of the c1 property.
    void
    setC2(float c2)
    Sets the value of the c2 property.
    void
    setC3(float c3)
    Sets the value of the c3 property.
    void
    Sets the value of the displayColorSpace property.
    void
    Sets the value of the rgbFilter property.
    void
    setSnapToTicks(boolean snapToTicks)
    Sets the value of the snapToTicks property.
    void
    Sets the value of the sourceColorSpace property.
    void
    Sets the value of the targetColorSpace property.
    void
    setThumbTranslateX(double thumbTranslateX)
    Sets the value of the thumbTranslateX property.
    void
    setThumbTranslateY(double thumbTranslateY)
    Sets the value of the thumbTranslateY property.
    @NonNull javafx.beans.property.BooleanProperty
    Indicates whether the value of the slider should always be aligned with the tick marks.
    @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
     
    @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace>
    The color space of the components.
    @NonNull javafx.beans.property.DoubleProperty
     
    @NonNull javafx.beans.property.DoubleProperty
     

    Methods inherited from class javafx.scene.layout.Pane

    getChildren

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty

    Methods inherited from class javafx.scene.Parent

    getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    Methods inherited from class javafx.scene.Node

    accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

  • Field Details

    • BLOCK_SIZE_COARSE

      public static final int BLOCK_SIZE_COARSE
      See Also:
    • BLOCK_SIZE_FINE

      public static final int BLOCK_SIZE_FINE
      See Also:
    • thumbTranslateX

      protected final @NonNull javafx.beans.property.DoubleProperty thumbTranslateX
    • thumbTranslateY

      protected final @NonNull javafx.beans.property.DoubleProperty thumbTranslateY
    • adjusting

      protected final @NonNull javafx.beans.property.BooleanProperty adjusting
      Set this value to true when the user is adjusting a value in another control.

      For example, when the user is pressing the mouse button in a slider in another control.

    • c0

      protected final @NonNull javafx.beans.property.FloatProperty c0
      The value of the color component with index 0.
    • c1

      protected final @NonNull javafx.beans.property.FloatProperty c1
      The value of the color component with index 1.
    • c2

      protected final @NonNull javafx.beans.property.FloatProperty c2
      The value of the color component with index 2.
    • c3

      protected final @NonNull javafx.beans.property.FloatProperty c3
      The value of the color component with index 3.
    • alpha

      protected final @NonNull javafx.beans.property.FloatProperty alpha
    • targetColorSpace

      protected final @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace> targetColorSpace
      The color space of the components.
    • sourceColorSpace

      protected final @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace> sourceColorSpace
    • displayColorSpace

      protected final @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace> displayColorSpace
      The color space of the display.
    • rgbFilter

      protected final @NonNull javafx.beans.property.ObjectProperty<ToIntFunction<Integer>> rgbFilter
    • snapToTicks

      protected final @NonNull javafx.beans.property.BooleanProperty snapToTicks
      Indicates whether the value of the slider should always be aligned with the tick marks.
    • thumb

      protected javafx.scene.layout.Region thumb
  • Constructor Details

    • AbstractColorSlider

      public AbstractColorSlider()
  • Method Details

    • getFxml

      public static @NonNull URL getFxml()
    • adjustingProperty

      public @NonNull javafx.beans.property.BooleanProperty adjustingProperty()
      Set this value to true when the user is adjusting a value in another control.

      For example, when the user is pressing the mouse button in a slider in another control.

      Returns:
      the adjusting property
      See Also:
    • c0Property

      public @NonNull javafx.beans.property.FloatProperty c0Property()
      The value of the color component with index 0.
      Returns:
      the c0 property
      See Also:
    • c1Property

      public @NonNull javafx.beans.property.FloatProperty c1Property()
      The value of the color component with index 1.
      Returns:
      the c1 property
      See Also:
    • c2Property

      public @NonNull javafx.beans.property.FloatProperty c2Property()
      The value of the color component with index 2.
      Returns:
      the c2 property
      See Also:
    • c3Property

      public @NonNull javafx.beans.property.FloatProperty c3Property()
      The value of the color component with index 3.
      Returns:
      the c3 property
      See Also:
    • targetColorSpaceProperty

      public @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace> targetColorSpaceProperty()
      The color space of the components.
      Returns:
      the targetColorSpace property
      See Also:
    • createFillTask

      protected abstract @Nullable AbstractColorSlider.AbstractFillTask createFillTask(@NonNull javafx.scene.image.PixelBuffer<IntBuffer> pixelBuffer)
    • drawColorRect

      protected void drawColorRect()
    • getC0

      public float getC0()
      Gets the value of the c0 property.
      Property description:
      The value of the color component with index 0.
      Returns:
      the value of the c0 property
      See Also:
    • setC0

      public void setC0(float c0)
      Sets the value of the c0 property.
      Property description:
      The value of the color component with index 0.
      Parameters:
      c0 - the value for the c0 property
      See Also:
    • getC1

      public float getC1()
      Gets the value of the c1 property.
      Property description:
      The value of the color component with index 1.
      Returns:
      the value of the c1 property
      See Also:
    • setC1

      public void setC1(float c1)
      Sets the value of the c1 property.
      Property description:
      The value of the color component with index 1.
      Parameters:
      c1 - the value for the c1 property
      See Also:
    • getC2

      public float getC2()
      Gets the value of the c2 property.
      Property description:
      The value of the color component with index 2.
      Returns:
      the value of the c2 property
      See Also:
    • setC2

      public void setC2(float c2)
      Sets the value of the c2 property.
      Property description:
      The value of the color component with index 2.
      Parameters:
      c2 - the value for the c2 property
      See Also:
    • getC3

      public float getC3()
      Gets the value of the c3 property.
      Property description:
      The value of the color component with index 3.
      Returns:
      the value of the c3 property
      See Also:
    • setC3

      public void setC3(float c3)
      Sets the value of the c3 property.
      Property description:
      The value of the color component with index 3.
      Parameters:
      c3 - the value for the c3 property
      See Also:
    • getTargetColorSpace

      public NamedColorSpace getTargetColorSpace()
      Gets the value of the targetColorSpace property.
      Property description:
      The color space of the components.
      Returns:
      the value of the targetColorSpace property
      See Also:
    • setTargetColorSpace

      public void setTargetColorSpace(NamedColorSpace targetColorSpace)
      Sets the value of the targetColorSpace property.
      Property description:
      The color space of the components.
      Parameters:
      targetColorSpace - the value for the targetColorSpace property
      See Also:
    • getRgbFilter

      public ToIntFunction<Integer> getRgbFilter()
      Gets the value of the rgbFilter property.
      Property description:
      Returns:
      the value of the rgbFilter property
      See Also:
    • setRgbFilter

      public void setRgbFilter(ToIntFunction<Integer> rgbFilter)
      Sets the value of the rgbFilter property.
      Property description:
      Parameters:
      rgbFilter - the value for the rgbFilter property
      See Also:
    • onKeyPressed

      protected abstract void onKeyPressed(javafx.scene.input.KeyEvent keyEvent)
    • invalidate

      public void invalidate()
    • isAdjusting

      public boolean isAdjusting()
      Gets the value of the adjusting property.
      Property description:
      Set this value to true when the user is adjusting a value in another control.

      For example, when the user is pressing the mouse button in a slider in another control.

      Returns:
      the value of the adjusting property
      See Also:
    • setAdjusting

      public void setAdjusting(boolean adjusting)
      Sets the value of the adjusting property.
      Property description:
      Set this value to true when the user is adjusting a value in another control.

      For example, when the user is pressing the mouse button in a slider in another control.

      Parameters:
      adjusting - the value for the adjusting property
      See Also:
    • isSnapToTicks

      public boolean isSnapToTicks()
      Gets the value of the snapToTicks property.
      Property description:
      Indicates whether the value of the slider should always be aligned with the tick marks.
      Returns:
      the value of the snapToTicks property
      See Also:
    • setSnapToTicks

      public void setSnapToTicks(boolean snapToTicks)
      Sets the value of the snapToTicks property.
      Property description:
      Indicates whether the value of the slider should always be aligned with the tick marks.
      Parameters:
      snapToTicks - the value for the snapToTicks property
      See Also:
    • layoutChildren

      protected void layoutChildren()
      Overrides:
      layoutChildren in class javafx.scene.Parent
    • load

      protected void load()
      Must be called from the constructor of the subclass!
    • maybeSnapToTicks

      protected float maybeSnapToTicks(float value, double tickUnit, javafx.scene.input.MouseEvent mouseEvent)
    • onMousePressedOrDragged

      protected abstract void onMousePressedOrDragged(javafx.scene.input.MouseEvent mouseEvent)
    • rgbFilterProperty

      public @NonNull javafx.beans.property.ObjectProperty<ToIntFunction<Integer>> rgbFilterProperty()
      Returns:
      the rgbFilter property
      See Also:
    • snapToTicksProperty

      public @NonNull javafx.beans.property.BooleanProperty snapToTicksProperty()
      Indicates whether the value of the slider should always be aligned with the tick marks.
      Returns:
      the snapToTicks property
      See Also:
    • getDisplayColorSpace

      public NamedColorSpace getDisplayColorSpace()
      Gets the value of the displayColorSpace property.
      Property description:
      The color space of the display.
      Returns:
      the value of the displayColorSpace property
      See Also:
    • displayColorSpaceProperty

      public @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace> displayColorSpaceProperty()
      The color space of the display.
      Returns:
      the displayColorSpace property
      See Also:
    • setDisplayColorSpace

      public void setDisplayColorSpace(NamedColorSpace displayColorSpace)
      Sets the value of the displayColorSpace property.
      Property description:
      The color space of the display.
      Parameters:
      displayColorSpace - the value for the displayColorSpace property
      See Also:
    • getThumbTranslateX

      public double getThumbTranslateX()
      Gets the value of the thumbTranslateX property.
      Property description:
      Returns:
      the value of the thumbTranslateX property
      See Also:
    • thumbTranslateXProperty

      public @NonNull javafx.beans.property.DoubleProperty thumbTranslateXProperty()
      Returns:
      the thumbTranslateX property
      See Also:
    • outOfGamut

      protected static boolean outOfGamut(NamedColorSpace colorSpace, float[] component)
      If epsilon is 0, we get the best rendering with OK LCH: the shape is a triangle with a straight line from the bottom left to the right, and a curved line from the right to the top left. (as shown below).

      However, with epsilon 0, pure white color converted from sRGB to Display P3 is out of gamut, because the converted color value is slightly greater than 1.0.

           +---
           |   ----
           |       ------
           |             --------
           |             ----
           |         ----
           |    ----
           +----
       

      If epsilon is too large, we get wiggles in the OK LCH rendering: the shape wiggles at the bottom left before it goes to the right. The curved line from the right to the top left is still good.

           +---
           |   ----
           |       ------
           |             --------
           |             ----
           |         ----
           |      ----
           +----------
       
      Parameters:
      colorSpace - a color space
      component - component values in the specified color space
      Returns:
      true if at least one component value is out of gamut
    • getPreArgb

      protected static int getPreArgb(NamedColorSpace dcs, float[] dRgb, float[] pre, float alpha)
    • getArgb

      protected static int getArgb(NamedColorSpace scs, NamedColorSpace tcs, NamedColorSpace dcs, float[] colorValue, float[] sRgb, float[] tComponent, float[] dComponent, float[] dRgb, float alpha)
    • setThumbTranslateX

      public void setThumbTranslateX(double thumbTranslateX)
      Sets the value of the thumbTranslateX property.
      Property description:
      Parameters:
      thumbTranslateX - the value for the thumbTranslateX property
      See Also:
    • getThumbTranslateY

      public double getThumbTranslateY()
      Gets the value of the thumbTranslateY property.
      Property description:
      Returns:
      the value of the thumbTranslateY property
      See Also:
    • thumbTranslateYProperty

      public @NonNull javafx.beans.property.DoubleProperty thumbTranslateYProperty()
      Returns:
      the thumbTranslateY property
      See Also:
    • setThumbTranslateY

      public void setThumbTranslateY(double thumbTranslateY)
      Sets the value of the thumbTranslateY property.
      Property description:
      Parameters:
      thumbTranslateY - the value for the thumbTranslateY property
      See Also:
    • getSourceColorSpace

      public NamedColorSpace getSourceColorSpace()
      Gets the value of the sourceColorSpace property.
      Property description:
      Returns:
      the value of the sourceColorSpace property
      See Also:
    • sourceColorSpaceProperty

      public @NonNull javafx.beans.property.ObjectProperty<NamedColorSpace> sourceColorSpaceProperty()
      Returns:
      the sourceColorSpace property
      See Also:
    • setSourceColorSpace

      public void setSourceColorSpace(NamedColorSpace sourceColorSpace)
      Sets the value of the sourceColorSpace property.
      Property description:
      Parameters:
      sourceColorSpace - the value for the sourceColorSpace property
      See Also:
    • getAlpha

      public float getAlpha()
      Gets the value of the alpha property.
      Property description:
      Returns:
      the value of the alpha property
      See Also:
    • alphaProperty

      public @NonNull javafx.beans.property.FloatProperty alphaProperty()
      Returns:
      the alpha property
      See Also:
    • setAlpha

      public void setAlpha(float alpha)
      Sets the value of the alpha property.
      Property description:
      Parameters:
      alpha - the value for the alpha property
      See Also: