public class ScrollPaneSkin extends BehaviorSkinBase<ScrollPane,ScrollPaneBehavior> implements TraverseListener
Modifier and Type | Field and Description |
---|---|
private ChangeListener<Bounds> |
boundsChangeListener |
(package private) Rectangle |
clipRect |
private double |
contentHeight |
private DoubleProperty |
contentPosX |
private DoubleProperty |
contentPosY |
(package private) KeyFrame |
contentsToViewKF1 |
(package private) KeyFrame |
contentsToViewKF2 |
(package private) KeyFrame |
contentsToViewKF3 |
(package private) Timeline |
contentsToViewTimeline |
private double |
contentWidth |
private StackPane |
corner |
private static double |
DEFAULT_EMBEDDED_SB_BREADTH |
private static double |
DEFAULT_MIN_SIZE |
private static double |
DEFAULT_PREF_SIZE
*
UI Subcomponents *
*
|
private static double |
DEFAULT_SB_BREADTH |
private boolean |
dragDetected |
protected ScrollBar |
hsb |
private double |
hsbHeight |
private boolean |
hsbvis |
private boolean |
mouseDown |
private double |
nodeHeight |
private InvalidationListener |
nodeListener |
private boolean |
nodeSizeInvalid |
private double |
nodeWidth |
(package private) double |
ohvalue |
(package private) double |
ovvalue |
private static double |
PAN_THRESHOLD |
private double |
posX |
private double |
posY |
(package private) double |
pressX |
(package private) double |
pressY |
private Cursor |
saveCursor |
(package private) KeyFrame |
sbTouchKF1 |
(package private) KeyFrame |
sbTouchKF2 |
(package private) Timeline |
sbTouchTimeline |
private Node |
scrollNode |
private boolean |
tempVisibility |
private boolean |
touchDetected |
private StackPane |
viewContent |
private StackPane |
viewRect |
protected ScrollBar |
vsb |
private boolean |
vsbvis |
private double |
vsbWidth |
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
ScrollPaneSkin(ScrollPane scrollpane)
*
Constructors *
*
|
Modifier and Type | Method and Description |
---|---|
private double |
computeHsbSizeHint(ScrollPane sp)
Computes the size that should be reserved for horizontal scrollbar in size hints (min/pref 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)
*
Layout *
*
|
private void |
computeScrollBarSize() |
private void |
computeScrollNodeSize(double contentWidth,
double contentHeight) |
private double |
computeVsbSizeHint(ScrollPane sp)
Computes the size that should be reserved for vertical scrollbar in size hints (min/pref width)
|
private DoubleProperty |
contentPosXProperty() |
private DoubleProperty |
contentPosYProperty() |
private boolean |
determineHorizontalSBVisible() |
private boolean |
determineVerticalSBVisible() |
private double |
getContentPosX() |
private double |
getContentPosY() |
protected void |
handleControlPropertyChanged(java.lang.String p)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
void |
hsbDecrement() |
void |
hsbIncrement() |
void |
hsbPageDecrement() |
void |
hsbPageIncrement() |
private void |
initialize() |
private boolean |
isReverseNodeOrientation() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
void |
onTraverse(Node n,
Bounds b) |
protected java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
private void |
resetClip() |
(package private) void |
scrollBoundsIntoView(Bounds b) |
private void |
setContentPosX(double value) |
private void |
setContentPosY(double value) |
protected void |
startContentsToViewport() |
protected void |
startSBReleasedAnimation() |
private void |
updateHorizontalSB() |
private double |
updatePosX() |
private double |
updatePosY() |
private void |
updateVerticalSB() |
void |
vsbDecrement() |
void |
vsbIncrement() |
void |
vsbPageDecrement() |
void |
vsbPageIncrement() |
dispose, getBehavior, registerChangeListener, unregisterChangeListener
computeBaselineOffset, computeMaxHeight, computeMaxWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
private static final double DEFAULT_PREF_SIZE
private static final double DEFAULT_MIN_SIZE
private static final double DEFAULT_SB_BREADTH
private static final double DEFAULT_EMBEDDED_SB_BREADTH
private static final double PAN_THRESHOLD
private Node scrollNode
private double nodeWidth
private double nodeHeight
private boolean nodeSizeInvalid
private double posX
private double posY
private boolean hsbvis
private boolean vsbvis
private double hsbHeight
private double vsbWidth
private StackPane viewRect
private StackPane viewContent
private double contentWidth
private double contentHeight
private StackPane corner
protected ScrollBar hsb
protected ScrollBar vsb
double pressX
double pressY
double ohvalue
double ovvalue
private Cursor saveCursor
private boolean dragDetected
private boolean touchDetected
private boolean mouseDown
Rectangle clipRect
private final InvalidationListener nodeListener
private final ChangeListener<Bounds> boundsChangeListener
Timeline sbTouchTimeline
KeyFrame sbTouchKF1
KeyFrame sbTouchKF2
Timeline contentsToViewTimeline
KeyFrame contentsToViewKF1
KeyFrame contentsToViewKF2
KeyFrame contentsToViewKF3
private boolean tempVisibility
private DoubleProperty contentPosX
private DoubleProperty contentPosY
public ScrollPaneSkin(ScrollPane scrollpane)
private void initialize()
protected void handleControlPropertyChanged(java.lang.String p)
BehaviorSkinBase
handleControlPropertyChanged
in class BehaviorSkinBase<ScrollPane,ScrollPaneBehavior>
void scrollBoundsIntoView(Bounds b)
public void onTraverse(Node n, Bounds b)
onTraverse
in interface TraverseListener
public void hsbIncrement()
public void hsbDecrement()
public void hsbPageIncrement()
public void hsbPageDecrement()
public void vsbIncrement()
public void vsbDecrement()
public void vsbPageIncrement()
public void vsbPageDecrement()
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
computePrefWidth
in class SkinBase<ScrollPane>
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<ScrollPane>
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 computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinWidth
in class SkinBase<ScrollPane>
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<ScrollPane>
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 insetprivate double computeHsbSizeHint(ScrollPane sp)
private double computeVsbSizeHint(ScrollPane sp)
protected void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class SkinBase<ScrollPane>
private void computeScrollNodeSize(double contentWidth, double contentHeight)
private boolean isReverseNodeOrientation()
private boolean determineHorizontalSBVisible()
private boolean determineVerticalSBVisible()
private void computeScrollBarSize()
private void updateHorizontalSB()
private void updateVerticalSB()
private double updatePosX()
private double updatePosY()
private void resetClip()
protected void startSBReleasedAnimation()
protected void startContentsToViewport()
private void setContentPosX(double value)
private double getContentPosX()
private DoubleProperty contentPosXProperty()
private void setContentPosY(double value)
private double getContentPosY()
private DoubleProperty contentPosYProperty()
protected java.lang.Object queryAccessibleAttribute(AccessibleAttribute attribute, java.lang.Object... parameters)
queryAccessibleAttribute
in class SkinBase<ScrollPane>
Node.queryAccessibleAttribute(javafx.scene.AccessibleAttribute, java.lang.Object...)