Default skin implementation for the
MenuBar control. In essence it is
a simple toolbar. For the time being there is no overflow behavior and we just
hide nodes which fall outside the bounds.- Since:
- 9
- See Also:
-
Property Summary
PropertiesTypePropertyDescriptionfinal ObjectProperty<Pos>Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).final DoublePropertySpecifies the spacing between menu buttons on the MenuBar. -
Constructor Summary
ConstructorsConstructorDescriptionMenuBarSkin(MenuBar control) Creates a new MenuBarSkin instance, installing the necessary child nodes into the Controlchildrenlist, as well as the necessary input mappings for handling key, mouse, etc events. -
Method Summary
Modifier and TypeMethodDescriptionfinal ObjectProperty<Pos>Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).static List<CssMetaData<? extends Styleable,?>> Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.final PosGets the value of thecontainerAlignmentproperty.final doubleGets the value of thespacingproperty.final voidsetContainerAlignment(Pos value) Sets the value of thecontainerAlignmentproperty.static voidsetDefaultSystemMenuBar(MenuBar menuBar) Set the default system menu bar.final voidsetSpacing(double value) Sets the value of thespacingproperty.final DoublePropertySpecifies the spacing between menu buttons on the MenuBar.Methods declared in class javafx.scene.control.SkinBase
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getCssMetaData, getNode, getSkinnable, layoutChildren, 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
-
Property Details
-
spacing
Specifies the spacing between menu buttons on the MenuBar.- See Also:
-
containerAlignment
Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).
-
-
Constructor Details
-
MenuBarSkin
Creates a new MenuBarSkin instance, installing the necessary child nodes into the Controlchildrenlist, as well as the necessary input mappings for handling key, mouse, etc events.- Parameters:
control- The control that this skin should be installed onto.
-
-
Method Details
-
setDefaultSystemMenuBar
Set the default system menu bar. This allows an application to keep menu in the system menu bar after the last Window is closed.- Parameters:
menuBar- the menu bar
-
setSpacing
public final void setSpacing(double value) Sets the value of thespacingproperty.- Property description:
- Specifies the spacing between menu buttons on the MenuBar.
- Parameters:
value- the value for thespacingproperty- See Also:
-
getSpacing
public final double getSpacing()Gets the value of thespacingproperty.- Property description:
- Specifies the spacing between menu buttons on the MenuBar.
- Returns:
- the value of the
spacingproperty - See Also:
-
spacingProperty
Specifies the spacing between menu buttons on the MenuBar.- Returns:
- the
spacingproperty - See Also:
-
setContainerAlignment
Sets the value of thecontainerAlignmentproperty.- Property description:
- Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).
- Parameters:
value- the value for thecontainerAlignmentproperty- See Also:
-
getContainerAlignment
Gets the value of thecontainerAlignmentproperty.- Property description:
- Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).
- Returns:
- the value of the
containerAlignmentproperty - See Also:
-
containerAlignmentProperty
Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).- Returns:
- the
containerAlignmentproperty - See Also:
-
getClassCssMetaData
Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.- Returns:
- the CssMetaData associated with this class, which may include the CssMetaData of its superclasses
-