APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.control.skin

public Class RadioButtonSkin

extends LabeledSkinBase<RadioButton>
Class Inheritance
Imports
com.sun.javafx.scene.control.behavior.BehaviorBase, .ToggleButtonBehavior, com.sun.javafx.scene.control.skin.Utils, javafx.scene.control.Control, .RadioButton, javafx.scene.layout.StackPane

Default skin implementation for the RadioButton control.
Since
9
See Also
RadioButton

Field Summary

Modifier and TypeField and Description
private final BehaviorBase<RadioButton>
private StackPane
radio

The radio contains the "dot", which is usually a circle

Inherited from javafx.scene.control.skin.LabeledSkinBase:
ellipsisWidthgraphicgraphicPropertyChangedListenerinvalidTexttexttextWidth

Constructor Summary

AccessConstructor and Description
public
RadioButtonSkin(RadioButton
The control that this skin should be installed onto.
control
)

Creates a new RadioButtonSkin instance, installing the necessary child nodes into the Control children list, as well as the necessary input mappings for handling key, mouse, etc events.

Method Summary

Modifier and TypeMethod and Description
protected double
computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

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)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinWidth.

Compute and return the minimum width of this Labeled.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase.

private static StackPane
public void
dispose()

Overrides javafx.scene.control.skin.LabeledSkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

protected void
layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

The Layout algorithm works like this: - Get the labeled w/h, graphic w/h, text w/h - Compute content w/h based on graphicVPos, graphicHPos, graphicTextGap, and graphic w/h and text w/h - (Note that the text content has been pre-truncated where necessary) - compute content x/y based on content w/h and labeled w/h and the labeled's hpos and vpos - position the graphic and text

protected void
updateChildren()

Overrides javafx.scene.control.skin.LabeledSkinBase.updateChildren.

Updates the children managed by LabeledSkinBase, which can be the Labeled graphic and/or a Text node.

Inherited from javafx.scene.control.skin.LabeledSkinBase:
bottomLabelPaddingcomputeBaselineOffsetcomputeMaxHeightcomputeMaxWidthisIgnoreGraphicisIgnoreTextlayoutLabelInArealayoutLabelInArealeftLabelPaddingmnemonicTargetChangedqueryAccessibleAttributerightLabelPaddingtopLabelPaddingupdateDisplayedText

Field Detail

behaviorback to summary
private final BehaviorBase<RadioButton> behavior
radioback to summary
private StackPane radio

The radio contains the "dot", which is usually a circle

Constructor Detail

RadioButtonSkinback to summary
public RadioButtonSkin(RadioButton control)

Creates a new RadioButtonSkin instance, installing the necessary child nodes into the Control children list, as well as the necessary input mappings for handling key, mouse, etc events.

Parameters
control:RadioButton

The control that this skin should be installed onto.

Method Detail

computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Doc from javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinWidthback to summary
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinWidth.

Doc from javafx.scene.control.skin.LabeledSkinBase.computeMinWidth.

Compute and return the minimum width of this Labeled. The minimum width is the smaller of the width of "..." and the width with the actual text. In this way, if the text width itself is smaller than the ellipsis then we should use that as the min width, otherwise the ellipsis needs to be the min width.

We use the same calculation here regardless of whether we are talking about a single or multiline labeled. So a multiline labeled may find that the width of the "..." is as small as it will ever get.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Doc from javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Calculates the preferred height of this 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.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Doc from javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Calculates the preferred width of this 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.

Annotations
@Override
createRadioback to summary
private static StackPane createRadio()
disposeback to summary
public void dispose()

Overrides javafx.scene.control.skin.LabeledSkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
layoutChildrenback to summary
protected void layoutChildren(final double x, final double y, final double w, final double h)

Overrides javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

Doc from javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

The Layout algorithm works like this: - Get the labeled w/h, graphic w/h, text w/h - Compute content w/h based on graphicVPos, graphicHPos, graphicTextGap, and graphic w/h and text w/h - (Note that the text content has been pre-truncated where necessary) - compute content x/y based on content w/h and labeled w/h and the labeled's hpos and vpos - position the graphic and text

Annotations
@Override
updateChildrenback to summary
protected void updateChildren()

Overrides javafx.scene.control.skin.LabeledSkinBase.updateChildren.

Doc from javafx.scene.control.skin.LabeledSkinBase.updateChildren.

Updates the children managed by LabeledSkinBase, which can be the Labeled graphic and/or a Text node. Only those nodes which actually must be used are used. For example, with a ContentDisplay of GRAPHIC_ONLY the text node is not added, and with a ContentDisplay of TEXT_ONLY, the graphic is not added.

Annotations
@Override