- 所有已实现的接口:
javafx.css.Styleable,javafx.event.EventTarget,javafx.scene.control.Skinnable
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:
- The 'lower value' thumb can not move past the 'higher value' thumb.
- Whereas the
Slidercontrol only has onevalueproperty, the RangeSlider has alow valueand ahigh valueproperty, not surprisingly represented by the 'low value' and 'high value' thumbs. - 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.
- 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.
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 theorientation 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.
- 另请参阅:
-
属性概要
属性类型属性说明final javafx.beans.property.DoublePropertyThe amount by which to adjust the slider if the track of the slider is clicked.final javafx.beans.property.BooleanPropertyWhen true, indicates the current high value of this RangeSlider is changing.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.ObjectProperty<javafx.util.StringConverter<Number>> StringConverter used to format tick mark labels.final javafx.beans.property.BooleanPropertyWhen true, indicates the current low value of this RangeSlider is changing.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyThe unit distance between major tick marks.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.IntegerPropertyThe number of minor ticks to place between any two major ticks.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> The orientation of theSlidercan either be horizontal or vertical.final javafx.beans.property.BooleanPropertyIndicates that the labels for tick marks should be shown.final javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyIndicates whether thelowValueProperty()value} /highValueProperty()value} of theSlidershould always be aligned with the tick marks.从类继承的属性 javafx.scene.control.Control
contextMenu, skin, tooltip从类继承的属性 javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width从类继承的属性 javafx.scene.Parent
needsLayout从类继承的属性 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 -
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private javafx.beans.property.DoublePropertyprivate static final String* Stylesheet Handling * *private final javafx.beans.property.DoublePropertyprivate javafx.beans.property.BooleanPropertyprivate static final javafx.css.PseudoClassprivate final javafx.beans.property.DoublePropertyprivate javafx.beans.property.BooleanPropertyprivate javafx.beans.property.DoublePropertyprivate javafx.beans.property.DoubleProperty* Properties copied from Slider (and slightly edited) * *private javafx.beans.property.DoublePropertyprivate javafx.beans.property.IntegerPropertyprivate javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> private javafx.beans.property.BooleanPropertyprivate javafx.beans.property.BooleanPropertyprivate javafx.beans.property.BooleanPropertyprivate Stringprivate final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<Number>> private static final javafx.css.PseudoClass从类继承的字段 javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE从类继承的字段 javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
构造器概要
构造器构造器说明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. -
方法概要
修饰符和类型方法说明voidadjustHighValue(double newValue) private voidvoidadjustLowValue(double newValue) private voidprivate voidEnsures that min is always 无效输入:'<' max, that value is always somewhere between the two, and that if snapToTicks is set then the value will always be set to align with a tick mark.final javafx.beans.property.DoublePropertyThe amount by which to adjust the slider if the track of the slider is clicked.private doubleclamp(double min, double value, double max) protected javafx.scene.control.Skin<?> voidDecrements thehigh valueby theblock incrementamount.voidDecrements thelow valueby theblock incrementamount.final doublestatic List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> final doubleReturns the current high value for the range slider.final javafx.util.StringConverter<Number> Gets the value of the property tickLabelFormatter.final doubleReturns the current low value for the range slider.final doublefinal doublegetMax()final doublegetMin()final intfinal javafx.geometry.Orientationfinal javafx.beans.property.BooleanPropertyWhen true, indicates the current high value of this RangeSlider is changing.final javafx.beans.property.DoublePropertyvoidIncrements thehigh valueby theblock incrementamount.voidIncrements thelow valueby theblock incrementamount.final booleanReturns whether or not the high value of this RangeSlider is currently changing.final booleanReturns whether or not the low value of this RangeSlider is currently changing.final booleanfinal booleanfinal booleanfinal javafx.beans.property.ObjectProperty<javafx.util.StringConverter<Number>> StringConverter used to format tick mark labels.final javafx.beans.property.BooleanPropertyWhen true, indicates the current low value of this RangeSlider is changing.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.DoublePropertyThe unit distance between major tick marks.final javafx.beans.property.DoublePropertyfinal javafx.beans.property.IntegerPropertyThe number of minor ticks to place between any two major ticks.final javafx.beans.property.DoublePropertyprivate doublenearest(double less, double value, double more) final javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> The orientation of theSlidercan either be horizontal or vertical.final voidsetBlockIncrement(double value) Sets the amount by which to adjust the slider if the track of the slider is clicked.final voidsetHighValue(double d) final voidsetHighValueChanging(boolean value) Call this when high low value is changing.final voidsetLabelFormatter(javafx.util.StringConverter<Number> value) Sets the value of the property tickLabelFormatter.final voidsetLowValue(double d) final voidsetLowValueChanging(boolean value) Call this when the low value is changing.final voidsetMajorTickUnit(double value) Sets the unit distance between major tick marks.final voidsetMax(double value) Sets the maximum value for this Slider.final voidsetMin(double value) Sets the minimum value for this Slider.final voidsetMinorTickCount(int value) Sets the number of minor ticks to place between any two major ticks.final voidsetOrientation(javafx.geometry.Orientation value) Sets the orientation of the Slider.final voidsetShowTickLabels(boolean value) Sets whether labels of tick marks should be shown or not.final voidsetShowTickMarks(boolean value) Specifies whether theSkinimplementation should show tick marks.final voidsetSnapToTicks(boolean value) Sets the value of SnapToTicks.final javafx.beans.property.BooleanPropertyIndicates that the labels for tick marks should be shown.final javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyIndicates whether thelowValueProperty()value} /highValueProperty()value} of theSlidershould always be aligned with the tick marks.private doublesnapValueToTicks(double d) 从类继承的方法 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从类继承的方法 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从类继承的方法 javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds从类继承的方法 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, focusVisibleProperty, focusWithinProperty, 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, 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从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 javafx.css.Styleable
getStyleableNode
-
属性详细资料
-
lowValue
public final javafx.beans.property.DoubleProperty lowValuePropertyThe low value property represents the current position of the low value thumb, and is within the allowable range as specified by theminandmaxproperties. By default this value is 0.- 另请参阅:
-
lowValueChanging
public final javafx.beans.property.BooleanProperty lowValueChangingPropertyWhen 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.- 另请参阅:
-
highValue
public final javafx.beans.property.DoubleProperty highValuePropertyThe high value property represents the current position of the high value thumb, and is within the allowable range as specified by theminandmaxproperties. By default this value is 100.- 另请参阅:
-
highValueChanging
public final javafx.beans.property.BooleanProperty highValueChangingPropertyWhen 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.- 另请参阅:
-
labelFormatter
public final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<Number>> labelFormatterPropertyStringConverter used to format tick mark labels. If null a default will be used.- 另请参阅:
-
max
public final javafx.beans.property.DoubleProperty maxProperty- 另请参阅:
-
min
public final javafx.beans.property.DoubleProperty minProperty- 另请参阅:
-
snapToTicks
public final javafx.beans.property.BooleanProperty snapToTicksPropertyIndicates whether thelowValueProperty()value} /highValueProperty()value} of theSlidershould always be aligned with the tick marks. This is honored even if the tick marks are not shown.- 另请参阅:
-
majorTickUnit
public final javafx.beans.property.DoubleProperty majorTickUnitPropertyThe unit distance between major tick marks. For example, if theminis 0 and themaxis 100 and themajorTickUnitis 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.
- 另请参阅:
-
minorTickCount
public final javafx.beans.property.IntegerProperty minorTickCountPropertyThe 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.- 另请参阅:
-
blockIncrement
public final javafx.beans.property.DoubleProperty blockIncrementPropertyThe 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. IfsnapToTicksis true then the nearest tick mark to the adjusted value will be used.- 另请参阅:
-
orientation
public final javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> orientationPropertyThe orientation of theSlidercan either be horizontal or vertical.- 另请参阅:
-
showTickLabels
public final javafx.beans.property.BooleanProperty showTickLabelsPropertyIndicates that the labels for tick marks should be shown. Typically aSkinimplementation will only show labels ifshowTickMarksis also true.- 另请参阅:
-
showTickMarks
public final javafx.beans.property.BooleanProperty showTickMarksProperty- 另请参阅:
-
-
字段详细资料
-
stylesheet
-
lowValue
private final javafx.beans.property.DoubleProperty lowValue -
lowValueChanging
private javafx.beans.property.BooleanProperty lowValueChanging -
highValue
private final javafx.beans.property.DoubleProperty highValue -
highValueChanging
private javafx.beans.property.BooleanProperty highValueChanging -
tickLabelFormatter
private final javafx.beans.property.ObjectProperty<javafx.util.StringConverter<Number>> tickLabelFormatter -
max
private javafx.beans.property.DoubleProperty max* Properties copied from Slider (and slightly edited) * * -
min
private javafx.beans.property.DoubleProperty min -
snapToTicks
private javafx.beans.property.BooleanProperty snapToTicks -
majorTickUnit
private javafx.beans.property.DoubleProperty majorTickUnit -
minorTickCount
private javafx.beans.property.IntegerProperty minorTickCount -
blockIncrement
private javafx.beans.property.DoubleProperty blockIncrement -
orientation
private javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> orientation -
showTickLabels
private javafx.beans.property.BooleanProperty showTickLabels -
showTickMarks
private javafx.beans.property.BooleanProperty showTickMarks -
DEFAULT_STYLE_CLASS
* Stylesheet Handling * *- 另请参阅:
-
VERTICAL_PSEUDOCLASS_STATE
private static final javafx.css.PseudoClass VERTICAL_PSEUDOCLASS_STATE -
HORIZONTAL_PSEUDOCLASS_STATE
private static final javafx.css.PseudoClass HORIZONTAL_PSEUDOCLASS_STATE
-
-
构造器详细资料
-
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.- 参数:
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.
-
-
方法详细资料
-
getUserAgentStylesheet
- 覆盖:
getUserAgentStylesheet在类中javafx.scene.layout.Region
-
createDefaultSkin
protected javafx.scene.control.Skin<?> createDefaultSkin()- 覆盖:
createDefaultSkin在类中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 theminandmaxproperties. By default this value is 0.- 返回:
lowValue属性- 另请参阅:
-
setLowValue
public final void setLowValue(double d) -
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.- 返回:
lowValueChanging属性- 另请参阅:
-
setLowValueChanging
public final void setLowValueChanging(boolean value) Call this when the low value is changing.- 参数:
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 theminandmaxproperties. By default this value is 100.- 返回:
highValue属性- 另请参阅:
-
setHighValue
public final void setHighValue(double d) -
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.- 返回:
highValueChanging属性- 另请参阅:
-
setHighValueChanging
public final void setHighValueChanging(boolean value) Call this when high low value is changing.- 参数:
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
Gets the value of the property tickLabelFormatter.- 返回:
- the value of the property tickLabelFormatter.
-
setLabelFormatter
Sets the value of the property tickLabelFormatter.- 参数:
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.- 返回:
- a Property containing the StringConverter.
- 另请参阅:
-
incrementLowValue
public void incrementLowValue()Increments thelow valueby theblock incrementamount. -
decrementLowValue
public void decrementLowValue()Decrements thelow valueby theblock incrementamount. -
incrementHighValue
public void incrementHighValue()Increments thehigh valueby theblock incrementamount. -
decrementHighValue
public void decrementHighValue()Decrements thehigh valueby theblock incrementamount. -
adjustLowValue
public void adjustLowValue(double newValue) AdjustslowValueto matchnewValue, or as closely as possible within the constraints imposed by theminandmaxproperties. This function also takes into accountsnapToTicks, which is the main difference betweenadjustLowValueandsetLowValue. -
adjustHighValue
public void adjustHighValue(double newValue) AdjustshighValueto matchnewValue, or as closely as possible within the constraints imposed by theminandmaxproperties. This function also takes into accountsnapToTicks, which is the main difference betweenadjustHighValueandsetHighValue. -
setMax
public final void setMax(double value) Sets the maximum value for this Slider.- 参数:
value-
-
getMax
public final double getMax()- 返回:
- 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()- 返回:
- 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.- 参数:
value-
-
getMin
public final double getMin()- 返回:
- the minimum value for this Slider. 0 is returned if the minimum has never been set.
-
minProperty
public final javafx.beans.property.DoubleProperty minProperty()- 返回:
- 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.- 参数:
value-- 另请参阅:
-
isSnapToTicks
public final boolean isSnapToTicks()- 返回:
- the value of SnapToTicks.
- 另请参阅:
-
snapToTicksProperty
public final javafx.beans.property.BooleanProperty snapToTicksProperty()Indicates whether thelowValueProperty()value} /highValueProperty()value} of theSlidershould always be aligned with the tick marks. This is honored even if the tick marks are not shown.- 返回:
- A BooleanProperty.
-
setMajorTickUnit
public final void setMajorTickUnit(double value) Sets the unit distance between major tick marks.- 参数:
value-- 另请参阅:
-
getMajorTickUnit
public final double getMajorTickUnit()- 返回:
- The unit distance between major tick marks.
- 另请参阅:
-
majorTickUnitProperty
public final javafx.beans.property.DoubleProperty majorTickUnitProperty()The unit distance between major tick marks. For example, if theminis 0 and themaxis 100 and themajorTickUnitis 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.
- 返回:
- A DoubleProperty
-
setMinorTickCount
public final void setMinorTickCount(int value) Sets the number of minor ticks to place between any two major ticks.- 参数:
value-- 另请参阅:
-
getMinorTickCount
public final int getMinorTickCount()- 返回:
- The number of minor ticks to place between any two major ticks.
- 另请参阅:
-
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.- 返回:
- 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.- 参数:
value-- 另请参阅:
-
getBlockIncrement
public final double getBlockIncrement()- 返回:
- The amount by which to adjust the slider if the track of the slider is clicked.
- 另请参阅:
-
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. IfsnapToTicksis true then the nearest tick mark to the adjusted value will be used.- 返回:
- A DoubleProperty
-
setOrientation
public final void setOrientation(javafx.geometry.Orientation value) Sets the orientation of the Slider.- 参数:
value-
-
getOrientation
public final javafx.geometry.Orientation getOrientation()- 返回:
- The orientation of the Slider.
Orientation.HORIZONTALis returned by default.
-
orientationProperty
public final javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> orientationProperty()The orientation of theSlidercan either be horizontal or vertical.- 返回:
- 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.- 参数:
value-
-
isShowTickLabels
public final boolean isShowTickLabels()- 返回:
- 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 aSkinimplementation will only show labels ifshowTickMarksis also true.- 返回:
- A BooleanProperty
- 另请参阅:
-
setShowTickMarks
public final void setShowTickMarks(boolean value) Specifies whether theSkinimplementation should show tick marks.- 参数:
value-
-
isShowTickMarks
public final boolean isShowTickMarks()- 返回:
- whether the
Skinimplementation should show tick marks.
-
showTickMarksProperty
public final javafx.beans.property.BooleanProperty showTickMarksProperty()- 返回:
- A BooleanProperty that specifies whether the
Skinimplementation should show tick marks.
-
adjustValues
private void adjustValues()Ensures that min is always 无效输入:'<' max, that value is always somewhere between the two, and that if snapToTicks is set then the value will always be set to align with a tick mark. -
adjustLowValues
private void adjustLowValues() -
snapValueToTicks
private double snapValueToTicks(double d) -
adjustHighValues
private void adjustHighValues() -
getClassCssMetaData
- 返回:
- The CssMetaData associated with this class, which may include the CssMetaData of its super classes.
-
getControlCssMetaData
- 覆盖:
getControlCssMetaData在类中javafx.scene.control.Control
-
clamp
private double clamp(double min, double value, double max) -
nearest
private double nearest(double less, double value, double more)
-