public class CheckBoxSkin extends LabeledSkinBase<CheckBox>
CheckBox
control.CheckBox
Modifier and Type | Field and Description |
---|---|
private <any> |
behavior |
private StackPane |
box
*
Private fields *
*
|
private StackPane |
innerbox |
ellipsisWidth, graphic, graphicPropertyChangedListener, invalidText, text, textWidth
Constructor and Description |
---|
CheckBoxSkin(CheckBox control)
Creates a new CheckBoxSkin 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) |
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 final StackPane box
private StackPane innerbox
private final <any> behavior
public CheckBoxSkin(CheckBox 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<CheckBox>
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<CheckBox>
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
computeMinHeight
in class LabeledSkinBase<CheckBox>
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
computePrefWidth
in class LabeledSkinBase<CheckBox>
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
computePrefHeight
in class LabeledSkinBase<CheckBox>
protected void layoutChildren(double x, double y, double w, double h)
layoutChildren
in class LabeledSkinBase<CheckBox>