- All Implemented Interfaces:
MFXLabeled,Themable,Styleable,EventTarget,Skinnable,Toggle
Extends RadioButton, redefines the style class to "mfx-radio-button" for usage in CSS and
includes a RippleGenerator to generate ripple effects on click.
- contentDispositionProperty(): to control the radio position
- gapProperty(): to control the gap between the radio button and the text
- radioGapProperty(): to control the gap between the outer and inner circle
- radiusProperty(): to control the circles' radius
- textExpandProperty(): to control the text size and the checkbox layout (see documentation)
-
Property Summary
PropertiesTypePropertyDescriptionSpecifies how the control is positioned relative to its text.Specifies the spacing between the control and its text.Specifies the gap between the outer and the inner circles of the radio button.Specifies the radius of the radio button.When setting a specific size for the control (by using setPrefSize for example, and this is true for SceneBuilder too), this flag will tell the control's label to take all the space available.Properties inherited from class javafx.scene.control.ToggleButton
selected, toggleGroupProperties inherited from class javafx.scene.control.ButtonBase
armed, onActionProperties inherited from class javafx.scene.control.Labeled
alignment, contentDisplay, ellipsisString, font, graphic, graphicTextGap, labelPadding, lineSpacing, mnemonicParsing, textAlignment, textFill, textOverrun, text, underline, wrapTextProperties 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, focusVisible, focusWithin, 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 classes/interfaces inherited from interface io.github.palexdev.materialfx.controls.base.Themable
Themable.Helper -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifies how the control is positioned relative to its text.protected Skin<?>Specifies the spacing between the control and its text.Gets the value of thecontentDispositionproperty.List<CssMetaData<? extends Styleable,?>> static List<CssMetaData<? extends Styleable,?>> doublegetGap()Gets the value of thegapproperty.doubleGets the value of theradioGapproperty.doubleGets the value of theradiusproperty.getTheme()Implementations of this should return theThemeresponsible for styling themselves, most MaterialFX controls return one of the constants offered byStylesheets.booleanGets the value of thetextExpandproperty.Specifies the gap between the outer and the inner circles of the radio button.Specifies the radius of the radio button.booleanThis is the method responsible for SceneBuilder detection and integration.voidsetContentDisposition(ContentDisplay contentDisposition) Sets the value of thecontentDispositionproperty.voidsetGap(double gap) Sets the value of thegapproperty.voidsetRadioGap(double radioGap) Sets the value of theradioGapproperty.voidsetRadius(double radius) Sets the value of theradiusproperty.voidsetTextExpand(boolean textExpand) Sets the value of thetextExpandproperty.When setting a specific size for the control (by using setPrefSize for example, and this is true for SceneBuilder too), this flag will tell the control's label to take all the space available.toParent()Implementations should return theParentnode onto which themes and stylesheets will be applied.Methods inherited from class javafx.scene.control.RadioButton
fire, getInitialAlignment, queryAccessibleAttributeMethods inherited from class javafx.scene.control.ToggleButton
getToggleGroup, isSelected, selectedProperty, setSelected, setToggleGroup, toggleGroupPropertyMethods inherited from class javafx.scene.control.ButtonBase
arm, armedProperty, disarm, executeAccessibleAction, getOnAction, isArmed, onActionProperty, setOnActionMethods inherited from class javafx.scene.control.Labeled
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, getAlignment, getClassCssMetaData, getContentBias, getContentDisplay, getEllipsisString, getFont, getGraphic, getGraphicTextGap, getLabelPadding, getLineSpacing, getText, getTextAlignment, getTextFill, getTextOverrun, graphicProperty, graphicTextGapProperty, isMnemonicParsing, isUnderline, isWrapText, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, setAlignment, setContentDisplay, setEllipsisString, setFont, setGraphic, setGraphicTextGap, setLineSpacing, setMnemonicParsing, setText, setTextAlignment, setTextFill, setTextOverrun, setUnderline, setWrapText, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, toString, underlineProperty, wrapTextPropertyMethods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, 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, getUserAgentStylesheet, 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, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, 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, isFocusVisible, isFocusWithin, 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, 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 javafx.scene.control.Toggle
getProperties, getUserData, setUserData
-
Property Details
-
contentDisposition
- Specified by:
contentDispositionPropertyin interfaceMFXLabeled- Returns:
- the
contentDispositionproperty - See Also:
-
gap
- Specified by:
gapPropertyin interfaceMFXLabeled- Returns:
- the
gapproperty - See Also:
-
radioGap
Specifies the gap between the outer and the inner circles of the radio button. -
radius
Specifies the radius of the radio button.- See Also:
-
textExpand
- Specified by:
textExpandPropertyin interfaceMFXLabeled- Returns:
- the
textExpandproperty - See Also:
-
-
Constructor Details
-
MFXRadioButton
public MFXRadioButton() -
MFXRadioButton
-
-
Method Details
-
getContentDisposition
Gets the value of thecontentDispositionproperty.- Specified by:
getContentDispositionin interfaceMFXLabeled- Property description:
- Returns:
- the value of the
contentDispositionproperty - See Also:
-
contentDispositionProperty
Description copied from interface:MFXLabeledSpecifies how the control is positioned relative to its text.- Specified by:
contentDispositionPropertyin interfaceMFXLabeled- Returns:
- the
contentDispositionproperty - See Also:
-
setContentDisposition
Sets the value of thecontentDispositionproperty.- Specified by:
setContentDispositionin interfaceMFXLabeled- Property description:
- Parameters:
contentDisposition- the value for thecontentDispositionproperty- See Also:
-
getGap
public double getGap()Gets the value of thegapproperty.- Specified by:
getGapin interfaceMFXLabeled- Property description:
- Returns:
- the value of the
gapproperty - See Also:
-
gapProperty
Description copied from interface:MFXLabeledSpecifies the spacing between the control and its text.- Specified by:
gapPropertyin interfaceMFXLabeled- Returns:
- the
gapproperty - See Also:
-
setGap
public void setGap(double gap) Sets the value of thegapproperty.- Specified by:
setGapin interfaceMFXLabeled- Property description:
- Parameters:
gap- the value for thegapproperty- See Also:
-
getRadioGap
public double getRadioGap()Gets the value of theradioGapproperty.- Property description:
- Specifies the gap between the outer and the inner circles of the radio button.
- Returns:
- the value of the
radioGapproperty - See Also:
-
radioGapProperty
Specifies the gap between the outer and the inner circles of the radio button.- Returns:
- the
radioGapproperty - See Also:
-
setRadioGap
public void setRadioGap(double radioGap) Sets the value of theradioGapproperty.- Property description:
- Specifies the gap between the outer and the inner circles of the radio button.
- Parameters:
radioGap- the value for theradioGapproperty- See Also:
-
getRadius
public double getRadius()Gets the value of theradiusproperty.- Property description:
- Specifies the radius of the radio button.
- Returns:
- the value of the
radiusproperty - See Also:
-
radiusProperty
Specifies the radius of the radio button.- Returns:
- the
radiusproperty - See Also:
-
setRadius
public void setRadius(double radius) Sets the value of theradiusproperty.- Property description:
- Specifies the radius of the radio button.
- Parameters:
radius- the value for theradiusproperty- See Also:
-
isTextExpand
public boolean isTextExpand()Gets the value of thetextExpandproperty.- Specified by:
isTextExpandin interfaceMFXLabeled- Property description:
- Returns:
- the value of the
textExpandproperty - See Also:
-
textExpandProperty
Description copied from interface:MFXLabeledWhen setting a specific size for the control (by using setPrefSize for example, and this is true for SceneBuilder too), this flag will tell the control's label to take all the space available.This allows, in combination with the
MFXLabeled.contentDispositionProperty(), to layout the control's content in many interesting ways. When the text is expanded (this property is true) useLabeled.alignmentProperty()to position the text.- Specified by:
textExpandPropertyin interfaceMFXLabeled- Returns:
- the
textExpandproperty - See Also:
-
setTextExpand
public void setTextExpand(boolean textExpand) Sets the value of thetextExpandproperty.- Specified by:
setTextExpandin interfaceMFXLabeled- Property description:
- Parameters:
textExpand- the value for thetextExpandproperty- See Also:
-
getControlCssMetaDataList
-
toParent
Description copied from interface:ThemableImplementations should return theParentnode onto which themes and stylesheets will be applied. Most of the case its themselves. -
getTheme
Description copied from interface:ThemableImplementations of this should return theThemeresponsible for styling themselves, most MaterialFX controls return one of the constants offered byStylesheets. -
sceneBuilderIntegration
public boolean sceneBuilderIntegration()Description copied from interface:ThemableThis is the method responsible for SceneBuilder detection and integration. By default, this adds theThemereturned byThemable.getTheme()on theParentreturned byThemable.toParent().- Specified by:
sceneBuilderIntegrationin interfaceThemable- Returns:
- whether SceneBuilder was detected or not, allowing overrides of this to avoid calling the check again and just checking the return of this method
-
createDefaultSkin
- Overrides:
createDefaultSkinin classRadioButton
-
getControlCssMetaData
- Overrides:
getControlCssMetaDatain classLabeled
-