public class SeparatorSkin extends BehaviorSkinBase<Separator,BehaviorBase<Separator>>
| Modifier and Type | Field and Description |
|---|---|
private static double |
DEFAULT_LENGTH
Separator's have no intrinsic length, so we need to hard code some sort
of default preferred size when a separator is not otherwise being resized.
|
private Region |
line
The region to use for rendering the line.
|
IS_TOUCH_SUPPORTED| Constructor and Description |
|---|
SeparatorSkin(Separator separator)
Create a new SeparatorSkin.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeMaxHeight(double w,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Computes the maximum allowable height of the Skin, based on the provided
width.
|
protected double |
computeMaxWidth(double h,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Computes the maximum allowable width of the Skin, based on the provided
height.
|
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)
Computes the minimum allowable width of the Skin, based on the provided
height.
|
protected double |
computePrefHeight(double w,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred height of this
SkinBase. |
protected double |
computePrefWidth(double h,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred width of this
SkinBase. |
protected void |
handleControlPropertyChanged(java.lang.String p)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
protected void |
layoutChildren(double x,
double y,
double w,
double h)
We only need to deal with the single "line" child region.
|
dispose, getBehavior, registerChangeListener, unregisterChangeListenercomputeBaselineOffset, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpaceprivate static final double DEFAULT_LENGTH
private final Region line
public SeparatorSkin(Separator separator)
separator - not nullprotected void handleControlPropertyChanged(java.lang.String p)
BehaviorSkinBasehandleControlPropertyChanged in class BehaviorSkinBase<Separator,BehaviorBase<Separator>>protected void layoutChildren(double x,
double y,
double w,
double h)
Then position the line within the separator such that the alignment properties are honored.
layoutChildren in class SkinBase<Separator>protected double computeMinWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
SkinBasecomputeMinWidth in class SkinBase<Separator>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)
SkinBasecomputeMinHeight in class SkinBase<Separator>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 h,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
SkinBaseSkinBase. 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 SkinBase<Separator>h - 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 w,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
SkinBaseSkinBase. 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 SkinBase<Separator>w - 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 double computeMaxWidth(double h,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
SkinBasecomputeMaxWidth in class SkinBase<Separator>h - The height of the Skin, in case this value might dictate
the maximum width.topInset - the pixel snapped top insetrightInset - the pixel snapped right insetbottomInset - the pixel snapped bottom insetleftInset - the pixel snapped left insetprotected double computeMaxHeight(double w,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
SkinBasecomputeMaxHeight in class SkinBase<Separator>w - The width of the Skin, in case this value might dictate
the maximum height.topInset - the pixel snapped top insetrightInset - the pixel snapped right insetbottomInset - the pixel snapped bottom insetleftInset - the pixel snapped left inset