public class RadioButtonSkin extends LabeledSkinBase<RadioButton>
RadioButton
control.RadioButton
Modifier and Type | Field and Description |
---|---|
private <any> |
behavior |
private StackPane |
radio
The radio contains the "dot", which is usually a circle
|
ellipsisWidth, graphic, graphicPropertyChangedListener, invalidText, text, textWidth
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
protected double |
computeMinHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
protected double |
computeMinWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Compute and return the minimum width of this Labeled.
|
protected double |
computePrefHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
private static StackPane |
createRadio()
*
Private implementation *
*
|
void |
dispose() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
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()
Updates the children managed by LabeledSkinBase, which can be the Labeled
graphic and/or a Text node.
|
bottomLabelPadding, computeBaselineOffset, computeMaxHeight, computeMaxWidth, isIgnoreGraphic, isIgnoreText, layoutLabelInArea, layoutLabelInArea, leftLabelPadding, mnemonicTargetChanged, queryAccessibleAttribute, rightLabelPadding, topLabelPadding, updateDisplayedText
private StackPane radio
private final <any> behavior
public RadioButtonSkin(RadioButton control)
children
list, as
well as the necessary input mappings for handling key, mouse, etc events.control
- The control that this skin should be installed onto.public void dispose()
protected void updateChildren()
updateChildren
in class LabeledSkinBase<RadioButton>
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
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.
computeMinWidth
in class LabeledSkinBase<RadioButton>
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
computeMinHeight
in class LabeledSkinBase<RadioButton>
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
computePrefWidth
in class LabeledSkinBase<RadioButton>
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
computePrefHeight
in class LabeledSkinBase<RadioButton>
protected void layoutChildren(double x, double y, double w, double h)
layoutChildren
in class LabeledSkinBase<RadioButton>
private static StackPane createRadio()