- All Implemented Interfaces:
Skin<MFXStepper>
Skin associated with every MFXStepper.
It is basically a BorderPane with three sections: top, center, bottom.
At the top there is the HBox that contains the MFXStepperToggles and the progress bar
which is realized by using a group and two rectangles. One rectangle is for the background/track and the other is the progress/bar.
The bar is manually adjusted according to the current selected toggle, its width is set using MFXStepperToggle.getGraphicBounds()
(+10 to ensure that there's no white space between the bar and the toggle).
At the center there is a StackPane, it is the content pane namely the node that
will contain the content specifies by each stepper toggle. The style class is set to "content-pane".
At the bottom there is the HBox that contains the previous and next buttons. The style class is set to "buttons-box".
Parent.needsLayoutProperty().
When it changes the progress must be computed again with computeProgress().
A workaround is also needed in case the progress bar is animated and the layout changes. Without the workaround the
progress bar layout is re-computed by using the animation so the reposition process is not instantaneous.
To fix this annoying UI issue a boolean flag (buttonWasPressed) is set to true only when buttons are pressed and then set to false right after the layout update,
so every layout change is done without playing the animation.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RectanglebuildRectangle(String styleClass) Responsible for building the track and the bar for the progress bar.protected doublecomputeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) voiddispose()protected voidlayoutChildren(double x, double y, double w, double h) Methods inherited from class javafx.scene.control.SkinBase
computeBaselineOffset, computePrefHeight, computePrefWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners
-
Constructor Details
-
MFXStepperSkin
-
-
Method Details
-
buildRectangle
Responsible for building the track and the bar for the progress bar. -
computeMinWidth
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMinWidthin classSkinBase<MFXStepper>
-
computeMinHeight
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMinHeightin classSkinBase<MFXStepper>
-
computeMaxWidth
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxWidthin classSkinBase<MFXStepper>
-
computeMaxHeight
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxHeightin classSkinBase<MFXStepper>
-
dispose
public void dispose()- Specified by:
disposein interfaceSkin<MFXStepper>- Overrides:
disposein classSkinBase<MFXStepper>
-
layoutChildren
protected void layoutChildren(double x, double y, double w, double h) - Overrides:
layoutChildrenin classSkinBase<MFXStepper>
-