Spec-Zone.ru › OpenJavaFX 17

Class SeparatorSkin

java.lang.Object
javafx.scene.control.SkinBase<Separator>
javafx.scene.control.skin.SeparatorSkin
All Implemented Interfaces:
Skin<Separator>
public class SeparatorSkin
extends SkinBase<Separator>
Default skin implementation for the Separator control.
Since:
9
See Also:
Separator

Constructor Summary

Constructors
Constructor Description
SeparatorSkin​(Separator control)
Creates a new SeparatorSkin instance, installing the necessary child nodes into the Control children list.

Method Summary

Modifier and Type Method Description
protected void layoutChildren​(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, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, 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

Methods declared in class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods declared in interface javafx.scene.control.Skin

dispose, getNode, getSkinnable

Constructor Details

SeparatorSkin

public SeparatorSkin(Separator control)
Creates a new SeparatorSkin instance, installing the necessary child nodes into the Control children list.
Parameters:
control - The control that this skin should be installed onto.

Method Details

layoutChildren

protected 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.

Overrides:
layoutChildren in class SkinBase<Separator>
Parameters:
x - the x position
y - the y position
w - the width
h - the height

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API