java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
io.github.palexdev.materialfx.controls.MFXStepperToggle
- All Implemented Interfaces:
Validated,Styleable,EventTarget,Skinnable
A
MFXStepperToggle is a special toggle that has 4 possible states.
In a MFXStepper these states are used as follows:
- NONE (when initialized)
- SELECTED (self explanatory)
- ERROR (when the validator's state is invalid)
- COMPLETED (when the validator's state in valid and the stepper goes to the next toggle)
EveryMFXStepperToggle has an icon, and a text which will be displayed in a label above or below the toggle
depending on the value of textPositionProperty().
They also specify the content to be shown in the MFXStepper when the toggle is selected, the content
can be any Node.
Validated control, meaning that by default the control offers a MFXValidator on which you can
add certain conditions/constraints (or even dependencies, other validators) that must be met in order for the state
to be COMPLETED and for the MFXStepper to go to the next toggle.-
Property Summary
PropertiesTypePropertyDescriptionSpecifies the icon shown in the circle of the toggle.Specifies the gap between the toggle's circle and the label.Specifies if a little error icon should be shown when the state is ERROR in the upper right corner of the toggle (default position defined in the skin).Specifies the radius of the toggle's circle.Specifies the state of the toggle.Specifies the stroke width of the toggle's circle.Specifies the position of the label.Specifies the text to be shown above or below the toggle.Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltipProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEvents class for MFXStepperToggles. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final PseudoClassprotected static final PseudoClassFields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHTFields inherited from interface io.github.palexdev.materialfx.validation.Validated
INVALID_PSEUDO_CLASS -
Constructor Summary
ConstructorsConstructorDescriptionMFXStepperToggle(String text) MFXStepperToggle(String text, Node icon) MFXStepperToggle(String text, Node icon, Node content) -
Method Summary
Modifier and TypeMethodDescriptionprotected Skin<?>List<CssMetaData<? extends Styleable,?>> static List<CssMetaData<? extends Styleable,?>> This method is necessary to get the bounds of the toggle's circle, which is used in theMFXStepperSkinto resize the progress bar properly.getIcon()Gets the value of the property icon.doubleGets the value of the property labelTextGap.doublegetSize()Gets the value of the property size.getState()Gets the value of the property state.doubleGets the value of the property strokeWidth.getText()Gets the value of the property text.Gets the value of the property textPosition.Specifies the icon shown in the circle of the toggle.booleanGets the value of the property showErrorIcon.Specifies the gap between the toggle's circle and the label.voidsetContent(Node content) Sets the content to be shown in the stepper when selected.voidSets the value of the property icon.voidsetLabelTextGap(double labelTextGap) Sets the value of the property labelTextGap.voidsetShowErrorIcon(boolean showErrorIcon) Sets the value of the property showErrorIcon.voidsetSize(double size) Sets the value of the property size.voidsetState(StepperToggleState state) Sets the value of the property state.voidsetStrokeWidth(double strokeWidth) Sets the value of the property strokeWidth.voidSets the value of the property text.voidsetTextPosition(TextPosition textPosition) Sets the value of the property textPosition.Specifies if a little error icon should be shown when the state is ERROR in the upper right corner of the toggle (default position defined in the skin).Specifies the radius of the toggle's circle.Specifies the state of the toggle.Specifies the stroke width of the toggle's circle.Specifies the position of the label.Specifies the text to be shown above or below the toggle.Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipPropertyMethods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNodeMethods inherited from interface io.github.palexdev.materialfx.validation.Validated
isValid, updateInvalid, validate
-
Property Details
-
text
Specifies the text to be shown above or below the toggle.- See Also:
-
icon
Specifies the icon shown in the circle of the toggle.- See Also:
-
state
Specifies the state of the toggle.- See Also:
-
showErrorIcon
Specifies if a little error icon should be shown when the state is ERROR in the upper right corner of the toggle (default position defined in the skin).- See Also:
-
labelTextGap
Specifies the gap between the toggle's circle and the label.- See Also:
-
textPosition
Specifies the position of the label. -
size
Specifies the radius of the toggle's circle.- See Also:
-
strokeWidth
Specifies the stroke width of the toggle's circle.- See Also:
-
-
Field Details
-
SELECTED_PSEUDO_CLASS
-
COMPLETED_PSEUDO_CLASS
-
-
Constructor Details
-
MFXStepperToggle
public MFXStepperToggle() -
MFXStepperToggle
-
MFXStepperToggle
-
MFXStepperToggle
-
-
Method Details
-
getValidator
- Specified by:
getValidatorin interfaceValidated- Returns:
- the
MFXValidatorinstance of this control
-
getGraphicBounds
This method is necessary to get the bounds of the toggle's circle, which is used in theMFXStepperSkinto resize the progress bar properly. -
getContent
- Returns:
- the content to be shown in the stepper when selected
-
setContent
Sets the content to be shown in the stepper when selected. -
getText
Gets the value of the property text.- Property description:
- Specifies the text to be shown above or below the toggle.
-
textProperty
Specifies the text to be shown above or below the toggle.- See Also:
-
setText
Sets the value of the property text.- Property description:
- Specifies the text to be shown above or below the toggle.
-
getIcon
Gets the value of the property icon.- Property description:
- Specifies the icon shown in the circle of the toggle.
-
iconProperty
Specifies the icon shown in the circle of the toggle.- See Also:
-
setIcon
Sets the value of the property icon.- Property description:
- Specifies the icon shown in the circle of the toggle.
-
getState
Gets the value of the property state.- Property description:
- Specifies the state of the toggle.
-
stateProperty
Specifies the state of the toggle.- See Also:
-
setState
Sets the value of the property state.- Property description:
- Specifies the state of the toggle.
-
isShowErrorIcon
public boolean isShowErrorIcon()Gets the value of the property showErrorIcon.- Property description:
- Specifies if a little error icon should be shown when the state is ERROR in the upper right corner of the toggle (default position defined in the skin).
-
showErrorIconProperty
Specifies if a little error icon should be shown when the state is ERROR in the upper right corner of the toggle (default position defined in the skin).- See Also:
-
setShowErrorIcon
public void setShowErrorIcon(boolean showErrorIcon) Sets the value of the property showErrorIcon.- Property description:
- Specifies if a little error icon should be shown when the state is ERROR in the upper right corner of the toggle (default position defined in the skin).
-
getLabelTextGap
public double getLabelTextGap()Gets the value of the property labelTextGap.- Property description:
- Specifies the gap between the toggle's circle and the label.
-
labelTextGapProperty
Specifies the gap between the toggle's circle and the label.- See Also:
-
setLabelTextGap
public void setLabelTextGap(double labelTextGap) Sets the value of the property labelTextGap.- Property description:
- Specifies the gap between the toggle's circle and the label.
-
getTextPosition
Gets the value of the property textPosition.- Property description:
- Specifies the position of the label.
-
textPositionProperty
Specifies the position of the label. -
setTextPosition
Sets the value of the property textPosition.- Property description:
- Specifies the position of the label.
-
getSize
public double getSize()Gets the value of the property size.- Property description:
- Specifies the radius of the toggle's circle.
-
sizeProperty
Specifies the radius of the toggle's circle.- See Also:
-
setSize
public void setSize(double size) Sets the value of the property size.- Property description:
- Specifies the radius of the toggle's circle.
-
getStrokeWidth
public double getStrokeWidth()Gets the value of the property strokeWidth.- Property description:
- Specifies the stroke width of the toggle's circle.
-
strokeWidthProperty
Specifies the stroke width of the toggle's circle.- See Also:
-
setStrokeWidth
public void setStrokeWidth(double strokeWidth) Sets the value of the property strokeWidth.- Property description:
- Specifies the stroke width of the toggle's circle.
-
getControlCssMetaDataList
-
createDefaultSkin
- Overrides:
createDefaultSkinin classControl
-
getControlCssMetaData
- Overrides:
getControlCssMetaDatain classControl
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheetin classRegion
-