Top Inners Fields Constructors Methods
impl.org.controlsfx.skin

public Class RangeSliderSkin

extends SkinBase<RangeSlider>
Class Inheritance
Imports
impl.org.controlsfx.ImplUtils, javafx.beans.binding.ObjectBinding, javafx.event.EventHandler, javafx.geometry.NodeOrientation, .Orientation, .Point2D, .Side, javafx.scene.Cursor, javafx.scene.chart.NumberAxis, javafx.scene.control.Skin, .SkinBase, javafx.scene.input.KeyCode, .KeyEvent, .MouseEvent, javafx.scene.layout.StackPane, javafx.util.Callback, org.controlsfx.control.RangeSlider, org.controlsfx.tools.Utils

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
private static class

Field Summary

Modifier and TypeField and Description
private RangeSliderSkin.FocusedChild
private RangeSliderSkin.ThumbPane
private RangeSliderSkin.ThumbPane
private double
private Orientation
private double
private Point2D
private StackPane
private double
private double
private Callback<Void, RangeSliderSkin.FocusedChild>
selectedValue

State and Functions *

private boolean
private double
private double
private NumberAxis
tickLine

Track if slider is vertical/horizontal and cause re layout

private StackPane
private double
private double
private double

Constructor Summary

AccessConstructor and Description
public
RangeSliderSkin(final RangeSlider rangeSlider)

Method Summary

Modifier and TypeMethod and Description
private double
protected double
computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

protected double
computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxWidth.

Computes the maximum allowable width of the Skin, based on the provided height.

protected double
computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

protected double
computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase.

private void
private void
private void
end()

private double
getMaxMinusMinNoZero()

Returns: the difference between max and min, but if they have the same value, 1 is returned instead of 0 because otherwise the division where it can be used will return Nan.

private void
highThumbDragged(MouseEvent e, double position)

private void
highThumbPressed(MouseEvent e, double position)

private void
pack-priv void
home()

private void
private void
private void
private void
private boolean
protected void
layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

public void
lowThumbDragged(MouseEvent e, double
The mouse position on track with 0.0 being beginning of track and 1.0 being the end
position
)

public void
lowThumbPressed(MouseEvent e, double
The mouse position on track with 0.0 being beginning of track and 1.0 being the end
position
)

public void
lowThumbReleased(MouseEvent e)

When lowThumb is released lowValueChanging should be set to false.

private double
private void
moveRange(double position)

private void
positionHighThumb()

Called when ever either min, max or highValue changes, so highthumb's layoutX, Y is recomputed.

private void
positionLowThumb()

Called when ever either min, max or lowValue changes, so lowthumb's layoutX, Y is recomputed.

private void
rtl(RangeSlider node, Runnable rtlMethod, Runnable nonRtlMethod)

public void
private void
setShowTickMarks(boolean ticksVisible, boolean labelsVisible)

When ticks or labels are changing of visibility, we compute the new visibility and add the necessary objets.

private double
snapValueToTicks(double d)

private void
trackPress(MouseEvent e, double
The mouse position on track with 0.0 being beginning of track and 1.0 being the end
position
)

Invoked by the RangeSlider Skin implementation whenever a mouse press occurs on the "track" of the slider.

public void
trackRelease(MouseEvent e, double position)

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetconsumeMouseEventsdisposeexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

currentFocusback to summary
private RangeSliderSkin.FocusedChild currentFocus
highThumbback to summary
private RangeSliderSkin.ThumbPane highThumb
lowThumbback to summary
private RangeSliderSkin.ThumbPane lowThumb
lowThumbPosback to summary
private double lowThumbPos
orientationback to summary
private Orientation orientation
preDragPosback to summary
private double preDragPos
preDragThumbPointback to summary
private Point2D preDragThumbPoint
rangeBarback to summary
private StackPane rangeBar
rangeEndback to summary
private double rangeEnd
rangeStartback to summary
private double rangeStart
selectedValueback to summary
private Callback<Void, RangeSliderSkin.FocusedChild> selectedValue

State and Functions *

showTickMarksback to summary
private boolean showTickMarks
thumbHeightback to summary
private double thumbHeight
thumbWidthback to summary
private double thumbWidth
tickLineback to summary
private NumberAxis tickLine

Track if slider is vertical/horizontal and cause re layout

trackback to summary
private StackPane track
trackLengthback to summary
private double trackLength
trackStartback to summary
private double trackStart
trackToTickGapback to summary
private double trackToTickGap

Constructor Detail

RangeSliderSkinback to summary
public RangeSliderSkin(final RangeSlider rangeSlider)

Method Detail

computeIncrementback to summary
private double computeIncrement()
computeMaxHeightback to summary
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Doc from javafx.scene.control.SkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMaxWidthback to summary
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxWidth.

Doc from javafx.scene.control.SkinBase.computeMaxWidth.

Computes the maximum allowable width of the Skin, based on the provided height.

Annotations
@Override
computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinWidthback to summary
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Doc from javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Doc from javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase. The default implementation calculates this height as the height of the area occupied by its managed children when they are positioned at their current positions at their preferred heights.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Doc from javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase. The default implementation calculates this width as the width of the area occupied by its managed children when they are positioned at their current positions at their preferred widths.

Annotations
@Override
confirmRangeback to summary
private void confirmRange()
decrementValueback to summary
private void decrementValue()
endback to summary
private void end()
getMaxMinusMinNoZeroback to summary
private double getMaxMinusMinNoZero()
Returns:double

the difference between max and min, but if they have the same value, 1 is returned instead of 0 because otherwise the division where it can be used will return Nan.

highThumbDraggedback to summary
private void highThumbDragged(MouseEvent e, double position)
highThumbPressedback to summary
private void highThumbPressed(MouseEvent e, double position)
highThumbReleasedback to summary
private void highThumbReleased(MouseEvent e)
homeback to summary
pack-priv void home()
incrementValueback to summary
private void incrementValue()
initFirstThumbback to summary
private void initFirstThumb()
initRangeBarback to summary
private void initRangeBar()
initSecondThumbback to summary
private void initSecondThumb()
isHorizontalback to summary
private boolean isHorizontal()
layoutChildrenback to summary
protected void layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Doc from javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

Annotations
@Override
lowThumbDraggedback to summary
public void lowThumbDragged(MouseEvent e, double position)
Parameters
position:double

The mouse position on track with 0.0 being beginning of track and 1.0 being the end

lowThumbPressedback to summary
public void lowThumbPressed(MouseEvent e, double position)
Parameters
position:double

The mouse position on track with 0.0 being beginning of track and 1.0 being the end

lowThumbReleasedback to summary
public void lowThumbReleased(MouseEvent e)

When lowThumb is released lowValueChanging should be set to false.

minTrackLengthback to summary
private double minTrackLength()
moveRangeback to summary
private void moveRange(double position)
positionHighThumbback to summary
private void positionHighThumb()

Called when ever either min, max or highValue changes, so highthumb's layoutX, Y is recomputed.

positionLowThumbback to summary
private void positionLowThumb()

Called when ever either min, max or lowValue changes, so lowthumb's layoutX, Y is recomputed.

rtlback to summary
private void rtl(RangeSlider node, Runnable rtlMethod, Runnable nonRtlMethod)
setSelectedValueback to summary
public void setSelectedValue(Callback<Void, RangeSliderSkin.FocusedChild> c)
setShowTickMarksback to summary
private void setShowTickMarks(boolean ticksVisible, boolean labelsVisible)

When ticks or labels are changing of visibility, we compute the new visibility and add the necessary objets. After this method, we must be sure to add the high Thumb and the rangeBar.

snapValueToTicksback to summary
private double snapValueToTicks(double d)
trackPressback to summary
private void trackPress(MouseEvent e, double position)

Invoked by the RangeSlider Skin implementation whenever a mouse press occurs on the "track" of the slider. This will cause the thumb to be moved by some amount.

Parameters
position:double

The mouse position on track with 0.0 being beginning of track and 1.0 being the end

trackReleaseback to summary
public void trackRelease(MouseEvent e, double position)
impl.org.controlsfx.skin back to summary

public final Enum RangeSliderSkin.FocusedChild

extends Enum<RangeSliderSkin.FocusedChild>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final RangeSliderSkin.FocusedChild
public static final RangeSliderSkin.FocusedChild
public static final RangeSliderSkin.FocusedChild
public static final RangeSliderSkin.FocusedChild

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static RangeSliderSkin.FocusedChild
public static RangeSliderSkin.FocusedChild[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HIGH_THUMBback to summary
public static final RangeSliderSkin.FocusedChild HIGH_THUMB
LOW_THUMBback to summary
public static final RangeSliderSkin.FocusedChild LOW_THUMB
NONEback to summary
public static final RangeSliderSkin.FocusedChild NONE
RANGE_BARback to summary
public static final RangeSliderSkin.FocusedChild RANGE_BAR

Constructor Detail

FocusedChildback to summary
private FocusedChild()

Method Detail

valueOfback to summary
public static RangeSliderSkin.FocusedChild valueOf(String name)
valuesback to summary
public static RangeSliderSkin.FocusedChild[] values()
impl.org.controlsfx.skin back to summary

private Class RangeSliderSkin.ThumbPane

extends StackPane
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
setFocus(boolean value)

Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginlayoutChildrenrequestLayoutsetAlignmentsetAlignmentsetMargin

Constructor Detail

ThumbPaneback to summary
private ThumbPane()

Method Detail

setFocusback to summary
public void setFocus(boolean value)