public class MenuBarSkin extends SkinBase<MenuBar>
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:
- MenuBar
- 
Property SummaryProperties Type Property Description ObjectProperty<Pos>containerAlignmentSpecifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).DoublePropertyspacingSpecifies the spacing between menu buttons on the MenuBar.
- 
Constructor SummaryConstructors Constructor Description MenuBarSkin(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 SummaryModifier and Type Method Description ObjectProperty<Pos>containerAlignmentProperty()Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).static List<CssMetaData<? extends Styleable,?>>getClassCssMetaData()Returns the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.PosgetContainerAlignment()Gets the value of the property containerAlignment.doublegetSpacing()Gets the value of the property spacing.voidsetContainerAlignment(Pos value)Sets the value of the property containerAlignment.static voidsetDefaultSystemMenuBar(MenuBar menuBar)Set the default system menu bar.voidsetSpacing(double value)Sets the value of the property spacing.DoublePropertyspacingProperty()Specifies the spacing between menu buttons on the MenuBar.Methods declared in class javafx.scene.control.SkinBasecomputeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getCssMetaData, 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, unregisterListChangeListenersMethods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface javafx.scene.control.Skindispose, getNode, getSkinnable
- 
Property Details- 
spacingSpecifies the spacing between menu buttons on the MenuBar.- See Also:
- getSpacing(),- setSpacing(double)
 
- 
containerAlignmentSpecifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).
 
- 
- 
Constructor Details- 
MenuBarSkinCreates 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- 
setDefaultSystemMenuBarSet 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
 
- 
setSpacingpublic final void setSpacing(double value)Sets the value of the property spacing.- Property description:
- Specifies the spacing between menu buttons on the MenuBar.
 
- 
getSpacingpublic final double getSpacing()Gets the value of the property spacing.- Property description:
- Specifies the spacing between menu buttons on the MenuBar.
 
- 
spacingPropertySpecifies the spacing between menu buttons on the MenuBar.- See Also:
- getSpacing(),- setSpacing(double)
 
- 
setContainerAlignmentSets the value of the property containerAlignment.- Property description:
- Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).
 
- 
getContainerAlignmentGets the value of the property containerAlignment.- Property description:
- Specifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).
 
- 
containerAlignmentPropertySpecifies the alignment of the menu buttons inside the MenuBar (by default it is Pos.TOP_LEFT).
- 
getClassCssMetaDataReturns 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
 
 
-