public class CheckBoxSkin extends LabeledSkinBase<CheckBox,ButtonBehavior<CheckBox>>
Modifier and Type | Field and Description |
---|---|
private StackPane |
box |
private StackPane |
innerbox |
bindings, ellipsisWidth, graphic, graphicPropertyChangedListener, invalidText, mnemonic_underscore, text, textWidth
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
CheckBoxSkin(CheckBox checkbox) |
Modifier and Type | Method and Description |
---|---|
protected double |
computeMinHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
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)
Compute and return the minimum width of this Labeled.
|
protected double |
computePrefHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred height of this
SkinBase . |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred width of this
SkinBase . |
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, handleControlPropertyChanged, isIgnoreGraphic, isIgnoreText, layoutLabelInArea, layoutLabelInArea, leftLabelPadding, mnemonicTargetChanged, queryAccessibleAttribute, rightLabelPadding, topLabelPadding, updateDisplayedText
dispose, getBehavior, registerChangeListener, unregisterChangeListener
consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
public CheckBoxSkin(CheckBox checkbox)
protected void updateChildren()
LabeledSkinBase
updateChildren
in class LabeledSkinBase<CheckBox,ButtonBehavior<CheckBox>>
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
LabeledSkinBase
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,ButtonBehavior<CheckBox>>
height
- The height of the Skin, in case this value might dictate
the minimum width.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinHeight
in class LabeledSkinBase<CheckBox,ButtonBehavior<CheckBox>>
width
- The width of the Skin, in case this value might dictate
the minimum height.topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
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.computePrefWidth
in class LabeledSkinBase<CheckBox,ButtonBehavior<CheckBox>>
height
- the height that should be used if preferred width depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
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.computePrefHeight
in class LabeledSkinBase<CheckBox,ButtonBehavior<CheckBox>>
width
- the width that should be used if preferred height depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected void layoutChildren(double x, double y, double w, double h)
LabeledSkinBase
layoutChildren
in class LabeledSkinBase<CheckBox,ButtonBehavior<CheckBox>>