Class RangeSlider

  • All Implemented Interfaces:
    javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable

    public class RangeSlider
    extends javafx.scene.control.Control
    The RangeSlider control is simply a JavaFX Slider control with support for two 'thumbs', rather than one. A thumb is the non-technical name for the draggable area inside the Slider / RangeSlider that allows for a value to be set.

    Because the RangeSlider has two thumbs, it also has a few additional rules and user interactions:

    1. The 'lower value' thumb can not move past the 'higher value' thumb.
    2. Whereas the Slider control only has one value property, the RangeSlider has a low value and a high value property, not surprisingly represented by the 'low value' and 'high value' thumbs.
    3. The area between the low and high values represents the allowable range. For example, if the low value is 2 and the high value is 8, then the allowable range is between 2 and 8.
    4. The allowable range area is rendered differently. This area is able to be dragged with mouse / touch input to allow for the entire range to be modified. For example, following on from the previous example of the allowable range being between 2 and 8, if the user drags the range bar to the right, the low value will adjust to 3, and the high value 9, and so on until the user stops adjusting.

    Screenshots

    Because the RangeSlider supports both horizontal and vertical orientation, there are two screenshots below:
    Horizontal: Screenshot of a horizontal RangeSlider
    Vertical: Screenshot of a vertical RangeSlider

    Code Samples

    Instantiating a RangeSlider is simple. The first decision is to decide whether a horizontal or a vertical track is more appropriate. By default RangeSlider instances are horizontal, but this can be changed by setting the orientation property.

    Once the orientation is determined, the next most important decision is to determine what the min / max and default low / high values are. The min / max values represent the smallest and largest legal values for the thumbs to be set to, whereas the low / high values represent where the thumbs are currently, within the bounds of the min / max values. Because all four values are required in all circumstances, they are all required parameters to instantiate a RangeSlider: the constructor takes four doubles, representing min, max, lowValue and highValue (in that order).

    For example, here is a simple horizontal RangeSlider that has a minimum value of 0, a maximum value of 100, a low value of 10 and a high value of 90:

    final RangeSlider hSlider = new RangeSlider(0, 100, 10, 90);

    To configure the hSlider to look like the RangeSlider in the horizontal RangeSlider screenshot above only requires a few additional properties to be set:

     
     final RangeSlider hSlider = new RangeSlider(0, 100, 10, 90);
     hSlider.setShowTickMarks(true);
     hSlider.setShowTickLabels(true);
     hSlider.setBlockIncrement(10);

    To create a vertical slider, simply do the following:

     
     final RangeSlider vSlider = new RangeSlider(0, 200, 30, 150);
     vSlider.setOrientation(Orientation.VERTICAL);

    This code creates a RangeSlider with a min value of 0, a max value of 200, a low value of 30, and a high value of 150.

    See Also:
    Slider
    • Field Summary

      • 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
      RangeSlider()
      Creates a new RangeSlider instance using default values of 0.0, 0.25, 0.75 and 1.0 for min/lowValue/highValue/max, respectively.
      RangeSlider​(double min, double max, double lowValue, double highValue)
      Instantiates a default, horizontal RangeSlider with the specified min/max/low/high values.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void adjustHighValue​(double newValue)
      Adjusts highValue to match newValue, or as closely as possible within the constraints imposed by the min and max properties.
      void adjustLowValue​(double newValue)
      Adjusts lowValue to match newValue, or as closely as possible within the constraints imposed by the min and max properties.
      javafx.beans.property.DoubleProperty blockIncrementProperty()
      The amount by which to adjust the slider if the track of the slider is clicked.
      protected javafx.scene.control.Skin<?> createDefaultSkin()
      void decrementHighValue()
      Decrements the high value by the block increment amount.
      void decrementLowValue()
      Decrements the low value by the block increment amount.
      double getBlockIncrement()  
      static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getClassCssMetaData()  
      List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getControlCssMetaData()
      double getHighValue()
      Returns the current high value for the range slider.
      javafx.util.StringConverter<Number> getLabelFormatter()
      Gets the value of the property tickLabelFormatter.
      double getLowValue()
      Returns the current low value for the range slider.
      double getMajorTickUnit()  
      double getMax()  
      double getMin()  
      int getMinorTickCount()  
      javafx.geometry.Orientation getOrientation()  
      String getUserAgentStylesheet()
      protected String getUserAgentStylesheet​(Class<?> clazz, String fileName)
      A helper method that ensures that the resource based lookup of the user agent stylesheet only happens once.
      javafx.beans.property.BooleanProperty highValueChangingProperty()
      When true, indicates the current high value of this RangeSlider is changing.
      javafx.beans.property.DoubleProperty highValueProperty()
      The high value property represents the current position of the high value thumb, and is within the allowable range as specified by the min and max properties.
      void incrementHighValue()
      Increments the high value by the block increment amount.
      void incrementLowValue()
      Increments the low value by the block increment amount.
      boolean isHighValueChanging()
      Returns whether or not the high value of this RangeSlider is currently changing.
      boolean isLowValueChanging()
      Returns whether or not the low value of this RangeSlider is currently changing.
      boolean isShowTickLabels()  
      boolean isShowTickMarks()  
      boolean isSnapToTicks()  
      javafx.beans.property.ObjectProperty<javafx.util.StringConverter<Number>> labelFormatterProperty()
      StringConverter used to format tick mark labels.
      javafx.beans.property.BooleanProperty lowValueChangingProperty()
      When true, indicates the current low value of this RangeSlider is changing.
      javafx.beans.property.DoubleProperty lowValueProperty()
      The low value property represents the current position of the low value thumb, and is within the allowable range as specified by the min and max properties.
      javafx.beans.property.DoubleProperty majorTickUnitProperty()
      The unit distance between major tick marks.
      javafx.beans.property.DoubleProperty maxProperty()  
      javafx.beans.property.IntegerProperty minorTickCountProperty()
      The number of minor ticks to place between any two major ticks.
      javafx.beans.property.DoubleProperty minProperty()  
      javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> orientationProperty()
      The orientation of the Slider can either be horizontal or vertical.
      void setBlockIncrement​(double value)
      Sets the amount by which to adjust the slider if the track of the slider is clicked.
      void setHighValue​(double d)
      Sets the high value for the range slider, which may or may not be clamped to be within the allowable range as specified by the min and max properties.
      void setHighValueChanging​(boolean value)
      Call this when high low value is changing.
      void setLabelFormatter​(javafx.util.StringConverter<Number> value)
      Sets the value of the property tickLabelFormatter.
      void setLowValue​(double d)
      Sets the low value for the range slider, which may or may not be clamped to be within the allowable range as specified by the min and max properties.
      void setLowValueChanging​(boolean value)
      Call this when the low value is changing.
      void setMajorTickUnit​(double value)
      Sets the unit distance between major tick marks.
      void setMax​(double value)
      Sets the maximum value for this Slider.
      void setMin​(double value)
      Sets the minimum value for this Slider.
      void setMinorTickCount​(int value)
      Sets the number of minor ticks to place between any two major ticks.
      void setOrientation​(javafx.geometry.Orientation value)
      Sets the orientation of the Slider.
      void setShowTickLabels​(boolean value)
      Sets whether labels of tick marks should be shown or not.
      void setShowTickMarks​(boolean value)
      Specifies whether the Skin implementation should show tick marks.
      void setSnapToTicks​(boolean value)
      Sets the value of SnapToTicks.
      javafx.beans.property.BooleanProperty showTickLabelsProperty()
      Indicates that the labels for tick marks should be shown.
      javafx.beans.property.BooleanProperty showTickMarksProperty()  
      javafx.beans.property.BooleanProperty snapToTicksProperty()
      Indicates whether the lowValueProperty() value} / highValueProperty() value} of the Slider should always be aligned with the tick marks.
      • Methods inherited from class javafx.scene.control.Control

        computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
      • Methods inherited from class javafx.scene.layout.Region

        backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, 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

        getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, 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, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, 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, 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 interface javafx.css.Styleable

        getStyleableNode
    • Constructor Detail

      • RangeSlider

        public RangeSlider()
        Creates a new RangeSlider instance using default values of 0.0, 0.25, 0.75 and 1.0 for min/lowValue/highValue/max, respectively.
      • RangeSlider

        public RangeSlider​(double min,
                           double max,
                           double lowValue,
                           double highValue)
        Instantiates a default, horizontal RangeSlider with the specified min/max/low/high values.
        Parameters:
        min - The minimum allowable value that the RangeSlider will allow.
        max - The maximum allowable value that the RangeSlider will allow.
        lowValue - The initial value for the low value in the RangeSlider.
        highValue - The initial value for the high value in the RangeSlider.
    • Method Detail

      • getUserAgentStylesheet

        public String getUserAgentStylesheet()
        Overrides:
        getUserAgentStylesheet in class javafx.scene.layout.Region
      • createDefaultSkin

        protected javafx.scene.control.Skin<?> createDefaultSkin()
        Overrides:
        createDefaultSkin in class javafx.scene.control.Control
      • lowValueProperty

        public final javafx.beans.property.DoubleProperty lowValueProperty()
        The low value property represents the current position of the low value thumb, and is within the allowable range as specified by the min and max properties. By default this value is 0.
      • setLowValue

        public final void setLowValue​(double d)
        Sets the low value for the range slider, which may or may not be clamped to be within the allowable range as specified by the min and max properties.
      • getLowValue

        public final double getLowValue()
        Returns the current low value for the range slider.
      • lowValueChangingProperty

        public final javafx.beans.property.BooleanProperty lowValueChangingProperty()
        When true, indicates the current low value of this RangeSlider is changing. It provides notification that the low value is changing. Once the low value is computed, it is set back to false.
      • setLowValueChanging

        public final void setLowValueChanging​(boolean value)
        Call this when the low value is changing.
        Parameters:
        value - True if the low value is changing, false otherwise.
      • isLowValueChanging

        public final boolean isLowValueChanging()
        Returns whether or not the low value of this RangeSlider is currently changing.
      • highValueProperty

        public final javafx.beans.property.DoubleProperty highValueProperty()
        The high value property represents the current position of the high value thumb, and is within the allowable range as specified by the min and max properties. By default this value is 100.
      • setHighValue

        public final void setHighValue​(double d)
        Sets the high value for the range slider, which may or may not be clamped to be within the allowable range as specified by the min and max properties.
      • getHighValue

        public final double getHighValue()
        Returns the current high value for the range slider.
      • highValueChangingProperty

        public final javafx.beans.property.BooleanProperty highValueChangingProperty()
        When true, indicates the current high value of this RangeSlider is changing. It provides notification that the high value is changing. Once the high value is computed, it is set back to false.
      • setHighValueChanging

        public final void setHighValueChanging​(boolean value)
        Call this when high low value is changing.
        Parameters:
        value - True if the high value is changing, false otherwise.
      • isHighValueChanging

        public final boolean isHighValueChanging()
        Returns whether or not the high value of this RangeSlider is currently changing.
      • getLabelFormatter

        public final javafx.util.StringConverter<Number> getLabelFormatter()
        Gets the value of the property tickLabelFormatter.
        Returns:
        the value of the property tickLabelFormatter.
      • setLabelFormatter

        public final void setLabelFormatter​(javafx.util.StringConverter<Number> value)
        Sets the value of the property tickLabelFormatter.
        Parameters:
        value -
      • labelFormatterProperty

        public final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<Number>> labelFormatterProperty()
        StringConverter used to format tick mark labels. If null a default will be used.
        Returns:
        a Property containing the StringConverter.
      • adjustLowValue

        public void adjustLowValue​(double newValue)
        Adjusts lowValue to match newValue, or as closely as possible within the constraints imposed by the min and max properties. This function also takes into account snapToTicks, which is the main difference between adjustLowValue and setLowValue.
      • adjustHighValue

        public void adjustHighValue​(double newValue)
        Adjusts highValue to match newValue, or as closely as possible within the constraints imposed by the min and max properties. This function also takes into account snapToTicks, which is the main difference between adjustHighValue and setHighValue.
      • setMax

        public final void setMax​(double value)
        Sets the maximum value for this Slider.
        Parameters:
        value -
      • getMax

        public final double getMax()
        Returns:
        The maximum value of this slider. 100 is returned if the maximum value has never been set.
      • maxProperty

        public final javafx.beans.property.DoubleProperty maxProperty()
        Returns:
        A DoubleProperty representing the maximum value of this Slider. This must be a value greater than min.
      • setMin

        public final void setMin​(double value)
        Sets the minimum value for this Slider.
        Parameters:
        value -
      • getMin

        public final double getMin()
        Returns:
        the minimum value for this Slider. 0 is returned if the minimum has never been set.
      • minProperty

        public final javafx.beans.property.DoubleProperty minProperty()
        Returns:
        A DoubleProperty representing The minimum value of this Slider. This must be a value less than max.
      • setSnapToTicks

        public final void setSnapToTicks​(boolean value)
        Sets the value of SnapToTicks.
        Parameters:
        value -
        See Also:
        snapToTicksProperty()
      • isSnapToTicks

        public final boolean isSnapToTicks()
        Returns:
        the value of SnapToTicks.
        See Also:
        snapToTicksProperty()
      • snapToTicksProperty

        public final javafx.beans.property.BooleanProperty snapToTicksProperty()
        Indicates whether the lowValueProperty() value} / highValueProperty() value} of the Slider should always be aligned with the tick marks. This is honored even if the tick marks are not shown.
        Returns:
        A BooleanProperty.
      • setMajorTickUnit

        public final void setMajorTickUnit​(double value)
        Sets the unit distance between major tick marks.
        Parameters:
        value -
        See Also:
        majorTickUnitProperty()
      • getMajorTickUnit

        public final double getMajorTickUnit()
        Returns:
        The unit distance between major tick marks.
        See Also:
        majorTickUnitProperty()
      • majorTickUnitProperty

        public final javafx.beans.property.DoubleProperty majorTickUnitProperty()
        The unit distance between major tick marks. For example, if the min is 0 and the max is 100 and the majorTickUnit is 25, then there would be 5 tick marks: one at position 0, one at position 25, one at position 50, one at position 75, and a final one at position 100.

        This value should be positive and should be a value less than the span. Out of range values are essentially the same as disabling tick marks.

        Returns:
        A DoubleProperty
      • setMinorTickCount

        public final void setMinorTickCount​(int value)
        Sets the number of minor ticks to place between any two major ticks.
        Parameters:
        value -
        See Also:
        minorTickCountProperty()
      • getMinorTickCount

        public final int getMinorTickCount()
        Returns:
        The number of minor ticks to place between any two major ticks.
        See Also:
        minorTickCountProperty()
      • minorTickCountProperty

        public final javafx.beans.property.IntegerProperty minorTickCountProperty()
        The number of minor ticks to place between any two major ticks. This number should be positive or zero. Out of range values will disable disable minor ticks, as will a value of zero.
        Returns:
        An InterProperty
      • setBlockIncrement

        public final void setBlockIncrement​(double value)
        Sets the amount by which to adjust the slider if the track of the slider is clicked.
        Parameters:
        value -
        See Also:
        blockIncrementProperty()
      • getBlockIncrement

        public final double getBlockIncrement()
        Returns:
        The amount by which to adjust the slider if the track of the slider is clicked.
        See Also:
        blockIncrementProperty()
      • blockIncrementProperty

        public final javafx.beans.property.DoubleProperty blockIncrementProperty()
        The amount by which to adjust the slider if the track of the slider is clicked. This is used when manipulating the slider position using keys. If snapToTicks is true then the nearest tick mark to the adjusted value will be used.
        Returns:
        A DoubleProperty
      • setOrientation

        public final void setOrientation​(javafx.geometry.Orientation value)
        Sets the orientation of the Slider.
        Parameters:
        value -
      • getOrientation

        public final javafx.geometry.Orientation getOrientation()
        Returns:
        The orientation of the Slider. Orientation.HORIZONTAL is returned by default.
      • orientationProperty

        public final javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> orientationProperty()
        The orientation of the Slider can either be horizontal or vertical.
        Returns:
        An Objectproperty representing the orientation of the Slider.
      • setShowTickLabels

        public final void setShowTickLabels​(boolean value)
        Sets whether labels of tick marks should be shown or not.
        Parameters:
        value -
      • isShowTickLabels

        public final boolean isShowTickLabels()
        Returns:
        whether labels of tick marks are being shown.
      • showTickLabelsProperty

        public final javafx.beans.property.BooleanProperty showTickLabelsProperty()
        Indicates that the labels for tick marks should be shown. Typically a Skin implementation will only show labels if showTickMarks is also true.
        Returns:
        A BooleanProperty
      • setShowTickMarks

        public final void setShowTickMarks​(boolean value)
        Specifies whether the Skin implementation should show tick marks.
        Parameters:
        value -
      • isShowTickMarks

        public final boolean isShowTickMarks()
        Returns:
        whether the Skin implementation should show tick marks.
      • showTickMarksProperty

        public final javafx.beans.property.BooleanProperty showTickMarksProperty()
        Returns:
        A BooleanProperty that specifies whether the Skin implementation should show tick marks.
      • getClassCssMetaData

        public static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getClassCssMetaData()
        Returns:
        The CssMetaData associated with this class, which may include the CssMetaData of its super classes.
      • getControlCssMetaData

        public List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getControlCssMetaData()
        Overrides:
        getControlCssMetaData in class javafx.scene.control.Control
      • getUserAgentStylesheet

        protected final String getUserAgentStylesheet​(Class<?> clazz,
                                                      String fileName)
        A helper method that ensures that the resource based lookup of the user agent stylesheet only happens once. Caches the external form of the resource.
        Parameters:
        clazz - the class used for the resource lookup
        fileName - the name of the user agent stylesheet
        Returns:
        the external form of the user agent stylesheet (the path)