public class PaginationSkin extends BehaviorSkinBase<Pagination,PaginationBehavior>
Modifier and Type | Class and Description |
---|---|
(package private) class |
PaginationSkin.IndicatorButton |
(package private) class |
PaginationSkin.NavigationControl |
private static class |
PaginationSkin.StyleableProperties |
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
PaginationSkin(Pagination pagination) |
Modifier and Type | Method and Description |
---|---|
private void |
animateClamping(boolean rightToLeft) |
private void |
animateSwitchPage() |
private DoubleProperty |
arrowButtonGapProperty() |
BooleanProperty |
arrowsVisibleProperty() |
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 . |
private boolean |
createPage(StackPane pane,
int index) |
static java.util.List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
java.util.List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
This method should delegate to
Node.getClassCssMetaData() so that
a Node's CssMetaData can be accessed without the need for reflection. |
private int |
getCurrentPageIndex() |
private int |
getMaxPageIndicatorCount() |
private int |
getPageCount() |
Side |
getPageInformationAlignment() |
protected void |
handleControlPropertyChanged(java.lang.String p)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
private void |
initializeSwipeAndTouchHandlers() |
boolean |
isArrowsVisible() |
boolean |
isPageInformationVisible() |
boolean |
isTooltipVisible() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
ObjectProperty<Side> |
pageInformationAlignmentProperty() |
BooleanProperty |
pageInformationVisibleProperty() |
protected java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
private void |
resetIndexes(boolean usePageIndex) |
protected void |
resetIndiciesAndNav() |
void |
selectNext() |
void |
selectPrevious() |
void |
setArrowsVisible(boolean value) |
void |
setPageInformationAlignment(Side value) |
void |
setPageInformationVisible(boolean value) |
void |
setTooltipVisible(boolean value) |
private void |
swapPanes() |
BooleanProperty |
tooltipVisibleProperty() |
dispose, getBehavior, registerChangeListener, unregisterChangeListener
computeBaselineOffset, computeMaxHeight, computeMaxWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
private static final Duration DURATION
private static final double SWIPE_THRESHOLD
private static final double TOUCH_THRESHOLD
private Pagination pagination
private StackPane currentStackPane
private StackPane nextStackPane
private Timeline timeline
private Rectangle clipRect
private PaginationSkin.NavigationControl navigation
private int fromIndex
private int previousIndex
private int currentIndex
private int toIndex
private int pageCount
private int maxPageIndicatorCount
private boolean animate
private double startTouchPos
private double lastTouchPos
private long startTouchTime
private long lastTouchTime
private double touchVelocity
private boolean touchThresholdBroken
private int touchEventId
private boolean nextPageReached
private boolean setInitialDirection
private int direction
private static final Interpolator interpolator
private int currentAnimatedIndex
private boolean hasPendingAnimation
private EventHandler<ActionEvent> swipeAnimationEndEventHandler
private EventHandler<ActionEvent> clampAnimationEndEventHandler
private final DoubleProperty arrowButtonGap
private BooleanProperty arrowsVisible
private BooleanProperty pageInformationVisible
private ObjectProperty<Side> pageInformationAlignment
private BooleanProperty tooltipVisible
private static final java.lang.Boolean DEFAULT_ARROW_VISIBLE
private static final java.lang.Boolean DEFAULT_PAGE_INFORMATION_VISIBLE
private static final Side DEFAULT_PAGE_INFORMATION_ALIGNMENT
private static final java.lang.Boolean DEFAULT_TOOLTIP_VISIBLE
public PaginationSkin(Pagination pagination)
protected void resetIndiciesAndNav()
public void selectNext()
public void selectPrevious()
private void initializeSwipeAndTouchHandlers()
private void resetIndexes(boolean usePageIndex)
private boolean createPage(StackPane pane, int index)
private int getPageCount()
private int getMaxPageIndicatorCount()
private int getCurrentPageIndex()
private void animateSwitchPage()
private void swapPanes()
private void animateClamping(boolean rightToLeft)
private DoubleProperty arrowButtonGapProperty()
public final void setArrowsVisible(boolean value)
public final boolean isArrowsVisible()
public final BooleanProperty arrowsVisibleProperty()
public final void setPageInformationVisible(boolean value)
public final boolean isPageInformationVisible()
public final BooleanProperty pageInformationVisibleProperty()
public final void setPageInformationAlignment(Side value)
public final Side getPageInformationAlignment()
public final ObjectProperty<Side> pageInformationAlignmentProperty()
public final void setTooltipVisible(boolean value)
public final boolean isTooltipVisible()
public final BooleanProperty tooltipVisibleProperty()
protected void handleControlPropertyChanged(java.lang.String p)
BehaviorSkinBase
handleControlPropertyChanged
in class BehaviorSkinBase<Pagination,PaginationBehavior>
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinWidth
in class SkinBase<Pagination>
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<Pagination>
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<Pagination>
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<Pagination>
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 void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class SkinBase<Pagination>
protected java.lang.Object queryAccessibleAttribute(AccessibleAttribute attribute, java.lang.Object... parameters)
queryAccessibleAttribute
in class SkinBase<Pagination>
Node.queryAccessibleAttribute(javafx.scene.AccessibleAttribute, java.lang.Object...)
public static java.util.List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public java.util.List<CssMetaData<? extends Styleable,?>> getCssMetaData()
Node.getClassCssMetaData()
so that
a Node's CssMetaData can be accessed without the need for reflection.getCssMetaData
in class SkinBase<Pagination>