Class MFXLabeledSkinBase<C extends Labeled & MFXLabeled>
- All Implemented Interfaces:
Skin<C>
- Direct Known Subclasses:
MFXCheckboxSkin,MFXRadioButtonSkin,MFXToggleButtonSkin
Labeled and MFXLabeled.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds some common listeners for all skins extending this.protected doublecomputeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) protected doublecomputeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) protected abstract PaneTo use this skin, controls must be organized in a certain way.protected voidThis is responsible for managing theBorderPanewhen theMFXLabeled.contentDispositionProperty()and theMFXLabeled.gapProperty()change.protected voidThis method ensures that the control's pane is always correctly aligned with the text.Methods inherited from class javafx.scene.control.SkinBase
computeBaselineOffset, computeMinHeight, computePrefHeight, computePrefWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners
-
Field Details
-
topContainer
-
text
-
-
Constructor Details
-
MFXLabeledSkinBase
-
-
Method Details
-
getControlContainer
To use this skin, controls must be organized in a certain way.Two main nodes are needed: one is the text of course, the other one is a pane which contains all the other nodes. This is necessary for the
MFXLabeled.contentDispositionProperty()to work properly. This base skin defines a top container which is aBorderPane. At the center of the border pane there's always the text (exception being when content disposition is CENTER or GRAPHIC_ONLY), the other pane is the one that rotates depending on the content disposition property. -
addListeners
protected void addListeners()Adds some common listeners for all skins extending this.Note that this method is not called by the constructor of this class, this is to allow overriding and thus expand the behavior of this method. This should be called at the end of the constructor of the implementing skin.
-
initContainer
protected void initContainer()This is responsible for managing theBorderPanewhen theMFXLabeled.contentDispositionProperty()and theMFXLabeled.gapProperty()change.Note that the gap is set by using
BorderPane.setMargin(Node, Insets)on the text node. -
updateAlignment
protected void updateAlignment()This method ensures that the control's pane is always correctly aligned with the text. -
computeMinWidth
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMinWidthin classSkinBase<C extends Labeled & MFXLabeled>
-
computeMaxWidth
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxWidthin classSkinBase<C extends Labeled & MFXLabeled>
-
computeMaxHeight
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) - Overrides:
computeMaxHeightin classSkinBase<C extends Labeled & MFXLabeled>
-