Top Description Inners Fields Constructors Methods
javafx.scene.control

public Class Separator

extends Control
Class Inheritance
Imports
java.util.ArrayList, .Collections, .List, javafx.beans.property.ObjectProperty, javafx.beans.value.WritableValue, javafx.geometry.HPos, .Orientation, .VPos, javafx.css.StyleableObjectProperty, .CssMetaData, .PseudoClass, .Styleable, .StyleableProperty, javafx.css.converter.EnumConverter, javafx.scene.control.skin.SeparatorSkin

A horizontal or vertical separator line. The visual appearance of this separator can be controlled via CSS. A horizontal separator occupies the full horizontal space allocated to it (less padding), and a vertical separator occupies the full vertical space allocated to it (less padding). The halignment and valignment properties determine how the separator is positioned in the other dimension, for example, how a horizontal separator is positioned vertically within its allocated space.

The separator is horizontal (i.e. isVertical() == false) by default.

The style-class for this control is "separator".

The separator provides two pseudo-classes "horizontal" and "vertical" which are mutually exclusive. The "horizontal" pseudo-class applies if the separator is horizontal, and the "vertical" pseudo-class applies if the separator is vertical.

Separator sets focusTraversable to false.

Example:

 Button b0 = new Button("Button 0");
Button b1 = new Button("Button 1");
Button b2 = new Button("Button 2");
Button b3 = new Button("Button 3");
Separator separator = new Separator(Orientation.HORIZONTAL);
VBox vBox = new VBox(b0, b1, separator, b2, b3);
Image of the Separator control
Since
JavaFX 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final String
private ObjectProperty<HPos>
halignment

For vertical separators, specifies the horizontal position of the separator line within the separator control's space.

private static final PseudoClass
private ObjectProperty<Orientation>
orientation

The orientation of the Separator can either be horizontal or vertical.

private ObjectProperty<VPos>
valignment

For horizontal separators, specifies the vertical alignment of the separator line within the separator control's space.

private static final PseudoClass

Constructor Summary

AccessConstructor and Description
public
Separator()

Creates a new horizontal separator with halignment and valignment set to their respective CENTER values.

public
Separator(Orientation
Specifies whether the Separator instance is initially vertical or horizontal.
orientation
)

Creates a new separator with halignment and valignment set to their respective CENTER values.

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public static List<CssMetaData<? extends Styleable, ?>>

Returns:

the CssMetaData
getClassCssMetaData
()

Hides javafx.scene.control.Control.getClassCssMetaData.

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

protected List<CssMetaData<? extends Styleable, ?>>
getControlCssMetaData()

Overrides javafx.scene.control.Control.getControlCssMetaData.

Gets the unmodifiable list of the control's CSS-styleable properties.

public final HPos
protected Boolean
getInitialFocusTraversable()

Overrides javafx.scene.control.Control.getInitialFocusTraversable.

Returns the initial focus traversable state of this control, for use by the JavaFX CSS engine to correctly set its initial value.

public final Orientation
public final VPos
public final ObjectProperty<HPos>
public final ObjectProperty<Orientation>
public final void
public final void
public final void
public final ObjectProperty<VPos>
Inherited from javafx.scene.control.Control:
computeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontextMenuPropertyexecuteAccessibleActiongetBaselineOffsetgetContextMenugetControlChildrengetCssMetaDatagetSkingetTooltipisResizablelayoutChildrenloadSkinClassqueryAccessibleAttributesetContextMenusetSkinsetTooltipskinClassNamePropertyskinPropertytooltipProperty

Field Detail

DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS
halignmentback to summary
private ObjectProperty<HPos> halignment

For vertical separators, specifies the horizontal position of the separator line within the separator control's space. Ignored for horizontal separators.

HORIZONTAL_PSEUDOCLASS_STATEback to summary
private static final PseudoClass HORIZONTAL_PSEUDOCLASS_STATE
orientationback to summary
private ObjectProperty<Orientation> orientation

The orientation of the Separator can either be horizontal or vertical.

valignmentback to summary
private ObjectProperty<VPos> valignment

For horizontal separators, specifies the vertical alignment of the separator line within the separator control's space. Ignored for vertical separators.

VERTICAL_PSEUDOCLASS_STATEback to summary
private static final PseudoClass VERTICAL_PSEUDOCLASS_STATE

Constructor Detail

Separatorback to summary
public Separator()

Creates a new horizontal separator with halignment and valignment set to their respective CENTER values.

Separatorback to summary
public Separator(Orientation orientation)

Creates a new separator with halignment and valignment set to their respective CENTER values. The direction of the separator is specified by the vertical property.

Parameters
orientation:Orientation

Specifies whether the Separator instance is initially vertical or horizontal.

Method Detail

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
getClassCssMetaDataback to summary
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData()

Hides javafx.scene.control.Control.getClassCssMetaData.

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

Returns:List<CssMetaData<? extends Styleable, ?>>

the CssMetaData

Since
JavaFX 8.0
getControlCssMetaDataback to summary
protected List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData()

Overrides javafx.scene.control.Control.getControlCssMetaData.

Doc from javafx.scene.control.Control.getControlCssMetaData.

Gets the unmodifiable list of the control's CSS-styleable properties.

Returns:List<CssMetaData<? extends Styleable, ?>>

the unmodifiable list of the control's CSS-styleable properties

Annotations
@Override
Since
JavaFX 8.0
getHalignmentback to summary
public final HPos getHalignment()
getInitialFocusTraversableback to summary
protected Boolean getInitialFocusTraversable()

Overrides javafx.scene.control.Control.getInitialFocusTraversable.

Returns the initial focus traversable state of this control, for use by the JavaFX CSS engine to correctly set its initial value. This method is overridden as by default UI controls have focus traversable set to true, but that is not appropriate for this control.

Returns:Boolean

Doc from javafx.scene.control.Control.getInitialFocusTraversable.

the initial focus traversable state of this control

Annotations
@Override
Since
9
getOrientationback to summary
public final Orientation getOrientation()
getValignmentback to summary
public final VPos getValignment()
halignmentPropertyback to summary
public final ObjectProperty<HPos> halignmentProperty()
orientationPropertyback to summary
public final ObjectProperty<Orientation> orientationProperty()
setHalignmentback to summary
public final void setHalignment(HPos value)
setOrientationback to summary
public final void setOrientation(Orientation value)
setValignmentback to summary
public final void setValignment(VPos value)
valignmentPropertyback to summary
public final ObjectProperty<VPos> valignmentProperty()
javafx.scene.control back to summary

private Class Separator.StyleableProperties

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final CssMetaData<Separator, HPos>
private static final CssMetaData<Separator, Orientation>
private static final List<CssMetaData<? extends Styleable, ?>>
private static final CssMetaData<Separator, VPos>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HALIGNMENTback to summary
private static final CssMetaData<Separator, HPos> HALIGNMENT
ORIENTATIONback to summary
private static final CssMetaData<Separator, Orientation> ORIENTATION
STYLEABLESback to summary
private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES
VALIGNMENTback to summary
private static final CssMetaData<Separator, VPos> VALIGNMENT

Constructor Detail

StyleablePropertiesback to summary
private StyleableProperties()