public class ScrollBarSkin extends BehaviorSkinBase<ScrollBar,ScrollBarBehavior>
Modifier and Type | Class and Description |
---|---|
private static class |
ScrollBarSkin.EndButton |
Modifier and Type | Field and Description |
---|---|
private ScrollBarSkin.EndButton |
decButton |
private static double |
DEFAULT_EMBEDDED_SB_BREADTH
*
Layout *
*
|
static int |
DEFAULT_LENGTH
*
UI Subcomponents *
*
|
static int |
DEFAULT_WIDTH |
private Point2D |
dragStart |
private ScrollBarSkin.EndButton |
incButton |
private double |
preDragThumbPos |
private StackPane |
thumb |
private double |
thumbLength |
private StackPane |
track |
private StackPane |
trackBackground |
private double |
trackLength |
private double |
trackPos |
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
ScrollBarSkin(ScrollBar scrollbar)
*
Constructors *
*
|
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 height,
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 . |
(package private) double |
getBreadth() |
Node |
getDecButton() |
Node |
getIncButton() |
Node |
getThumb() |
Node |
getTrack() |
protected void |
handleControlPropertyChanged(java.lang.String p)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
private void |
initialize()
Initializes the ScrollBarSkin.
|
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
(package private) double |
minThumbLength() |
(package private) double |
minTrackLength() |
(package private) void |
positionThumb()
Called when ever either min, max or value changes, so thumb's layoutX, Y is recomputed.
|
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
public static final int DEFAULT_LENGTH
public static final int DEFAULT_WIDTH
private StackPane thumb
private StackPane trackBackground
private StackPane track
private ScrollBarSkin.EndButton incButton
private ScrollBarSkin.EndButton decButton
private double trackLength
private double thumbLength
private double preDragThumbPos
private Point2D dragStart
private double trackPos
private static final double DEFAULT_EMBEDDED_SB_BREADTH
public ScrollBarSkin(ScrollBar scrollbar)
private void initialize()
protected void handleControlPropertyChanged(java.lang.String p)
BehaviorSkinBase
handleControlPropertyChanged
in class BehaviorSkinBase<ScrollBar,ScrollBarBehavior>
double getBreadth()
double minThumbLength()
double minTrackLength()
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinWidth
in class SkinBase<ScrollBar>
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<ScrollBar>
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<ScrollBar>
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 height, 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<ScrollBar>
height
- 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<ScrollBar>
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<ScrollBar>
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 insetvoid positionThumb()
protected void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class SkinBase<ScrollBar>
public Node getThumb()
public Node getTrack()
public Node getIncButton()
public Node getDecButton()