Default skin implementation for the
- See Also:
Method SummaryModifier and TypeMethodDescription
(double x, double y, double w, double h)We only need to deal with the single "line" child region.
Methods declared in class javafx.scene.control.SkinBase
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, 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
layoutChildrenprotected void layoutChildren
(double x, double y, double w, double h)We only need to deal with the single "line" child region. The important thing here is that we want a horizontal separator to have a line which is as wide as the separator (less the left/right padding), but as thin as it can be (based on its own pref height). The same idea for a vertical separator. It should be as tall as the separator (less the top and bottom padding) but as thin as can be (the pref width of the line).
Then position the line within the separator such that the alignment properties are honored.