public class SliderSkin extends BehaviorSkinBase<Slider,SliderBehavior>
Modifier and Type | Field and Description |
---|---|
private Point2D |
dragStart |
private double |
preDragThumbPos |
private boolean |
showTickMarks |
(package private) StringConverter<java.lang.Number> |
stringConverterWrapper |
private StackPane |
thumb |
private double |
thumbHeight |
private double |
thumbLeft |
private double |
thumbTop |
private double |
thumbWidth |
private NumberAxis |
tickLine
Track if slider is vertical/horizontal and cause re layout
|
private StackPane |
track |
private boolean |
trackClicked |
private double |
trackLength |
private double |
trackStart |
private double |
trackToTickGap |
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
SliderSkin(Slider slider) |
Modifier and Type | Method and Description |
---|---|
protected double |
computeMaxHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
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)
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)
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)
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)
Calculates the preferred height of this
SkinBase . |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred width of this
SkinBase . |
protected void |
handleControlPropertyChanged(java.lang.String p)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
private void |
initialize() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
(package private) double |
minTrackLength() |
(package private) void |
positionThumb(boolean animate)
Called when ever either min, max or value changes, so thumb's layoutX, Y is recomputed.
|
private void |
setShowTickMarks(boolean ticksVisible,
boolean labelsVisible) |
dispose, getBehavior, registerChangeListener, unregisterChangeListener
computeBaselineOffset, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
private NumberAxis tickLine
private double trackToTickGap
private boolean showTickMarks
private double thumbWidth
private double thumbHeight
private double trackStart
private double trackLength
private double thumbTop
private double thumbLeft
private double preDragThumbPos
private Point2D dragStart
private StackPane thumb
private StackPane track
private boolean trackClicked
StringConverter<java.lang.Number> stringConverterWrapper
public SliderSkin(Slider slider)
private void initialize()
private void setShowTickMarks(boolean ticksVisible, boolean labelsVisible)
protected void handleControlPropertyChanged(java.lang.String p)
BehaviorSkinBase
handleControlPropertyChanged
in class BehaviorSkinBase<Slider,SliderBehavior>
void positionThumb(boolean animate)
protected void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class SkinBase<Slider>
double minTrackLength()
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinWidth
in class SkinBase<Slider>
height
- The height of the Skin, in case this value might dictate
the minimum width.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinHeight
in class SkinBase<Slider>
width
- The width of the Skin, in case this value might dictate
the minimum height.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
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.computePrefWidth
in class SkinBase<Slider>
height
- the height that should be used if preferred width depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
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.computePrefHeight
in class SkinBase<Slider>
width
- the width that should be used if preferred height depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMaxWidth
in class SkinBase<Slider>
height
- The height of the Skin, in case this value might dictate
the maximum width.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMaxHeight
in class SkinBase<Slider>
width
- The width of the Skin, in case this value might dictate
the maximum height.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left inset