public class SplitPaneSkin extends BehaviorSkinBase<SplitPane,BehaviorBase<SplitPane>>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SplitPaneSkin.Content |
(package private) class |
SplitPaneSkin.ContentDivider |
(package private) class |
SplitPaneSkin.PosPropertyListener |
Modifier and Type | Field and Description |
---|---|
private boolean |
checkDividerPos |
private ObservableList<SplitPaneSkin.ContentDivider> |
contentDividers |
private ObservableList<SplitPaneSkin.Content> |
contentRegions |
private boolean |
horizontal |
private int |
lastDividerUpdate |
private double |
previousSize |
private boolean |
resize |
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
SplitPaneSkin(SplitPane splitPane) |
Modifier and Type | Method and Description |
---|---|
private void |
addContent(int index,
Node n) |
private void |
addDivider(SplitPane.Divider d) |
private void |
checkDividerPosition(SplitPaneSkin.ContentDivider divider,
double newPos,
double oldPos) |
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 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 . |
private double |
distributeFrom(double size,
java.util.List<SplitPaneSkin.Content> available) |
private double |
distributeTo(java.util.List<SplitPaneSkin.Content> available,
double size) |
private double |
getAbsoluteDividerPos(SplitPaneSkin.ContentDivider divider) |
private SplitPaneSkin.Content |
getLeft(SplitPaneSkin.ContentDivider d) |
private SplitPaneSkin.Content |
getRight(SplitPaneSkin.ContentDivider d) |
private double |
getSize() |
protected void |
handleControlPropertyChanged(java.lang.String property)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
private void |
initializeContentListener() |
private void |
initializeDivderEventHandlers(SplitPaneSkin.ContentDivider divider) |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
private void |
layoutDividersAndContent(double width,
double height) |
private double |
posToDividerPos(SplitPaneSkin.ContentDivider divider,
double pos) |
private void |
removeAllDividers() |
private void |
removeContent(Node n) |
private void |
setAbsoluteDividerPos(SplitPaneSkin.ContentDivider divider,
double value) |
private void |
setAndCheckAbsoluteDividerPos(SplitPaneSkin.ContentDivider divider,
double value) |
private void |
setupContentAndDividerForLayout() |
private double |
totalMinSize() |
dispose, getBehavior, registerChangeListener, unregisterChangeListener
computeBaselineOffset, computeMaxHeight, computeMaxWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
private ObservableList<SplitPaneSkin.Content> contentRegions
private ObservableList<SplitPaneSkin.ContentDivider> contentDividers
private boolean horizontal
private double previousSize
private int lastDividerUpdate
private boolean resize
private boolean checkDividerPos
public SplitPaneSkin(SplitPane splitPane)
private void addContent(int index, Node n)
private void removeContent(Node n)
private void initializeContentListener()
private void checkDividerPosition(SplitPaneSkin.ContentDivider divider, double newPos, double oldPos)
private void addDivider(SplitPane.Divider d)
private void removeAllDividers()
private void initializeDivderEventHandlers(SplitPaneSkin.ContentDivider divider)
private SplitPaneSkin.Content getLeft(SplitPaneSkin.ContentDivider d)
private SplitPaneSkin.Content getRight(SplitPaneSkin.ContentDivider d)
protected void handleControlPropertyChanged(java.lang.String property)
BehaviorSkinBase
handleControlPropertyChanged
in class BehaviorSkinBase<SplitPane,BehaviorBase<SplitPane>>
private void setAbsoluteDividerPos(SplitPaneSkin.ContentDivider divider, double value)
private double getAbsoluteDividerPos(SplitPaneSkin.ContentDivider divider)
private double posToDividerPos(SplitPaneSkin.ContentDivider divider, double pos)
private double totalMinSize()
private double getSize()
private double distributeTo(java.util.List<SplitPaneSkin.Content> available, double size)
private double distributeFrom(double size, java.util.List<SplitPaneSkin.Content> available)
private void setupContentAndDividerForLayout()
private void layoutDividersAndContent(double width, double height)
protected void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class SkinBase<SplitPane>
private void setAndCheckAbsoluteDividerPos(SplitPaneSkin.ContentDivider divider, double value)
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
computeMinWidth
in class SkinBase<SplitPane>
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 SkinBase<SplitPane>
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 SkinBase<SplitPane>
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 SkinBase<SplitPane>
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 inset