- java.lang.Object
-
- javafx.scene.control.MenuItem
-
- javafx.scene.control.CustomMenuItem
-
- javafx.scene.control.SeparatorMenuItem
-
- All Implemented Interfaces:
-
Styleable,EventTarget
public class SeparatorMenuItem extends CustomMenuItem
A
MenuItemthat as the name suggests allows for a horizontal Separator to be embedded within it, by assigning aSeparatorto thecontentproperty of theCustomMenuItemThis is provided for convenience as groups ofmenuitemscan be separated by a separator. Instead of a creating aCustomMenuItemfor this purpose, the user can use this class as indicated below.SeparatorMenuItem separatorMenuItem = new SeparatorMenuItem();- Since:
- JavaFX 2.0
- See Also:
-
CustomMenuItem,MenuItem,Menu
-
Property Summary
-
Properties inherited from class javafx.scene.control.CustomMenuItem
content, hideOnClick
-
Properties inherited from class javafx.scene.control.MenuItem
accelerator, disable, graphic, id, mnemonicParsing, onAction, onMenuValidation, parentMenu, parentPopup, style, text, visible
-
-
Field Summary
-
Fields inherited from class javafx.scene.control.MenuItem
MENU_VALIDATION_EVENT
-
-
Constructor Summary
Constructors Constructor Description SeparatorMenuItem()Creates a default SeparatorMenuItem instance.
-
Method Summary
-
Methods inherited from class javafx.scene.control.CustomMenuItem
contentProperty, getContent, hideOnClickProperty, isHideOnClick, setContent, setHideOnClick
-
Methods inherited from class javafx.scene.control.MenuItem
acceleratorProperty, addEventHandler, buildEventDispatchChain, disableProperty, fire, getAccelerator, getCssMetaData, getGraphic, getId, getOnAction, getOnMenuValidation, getParentMenu, getParentPopup, getProperties, getPseudoClassStates, getStyle, getStyleableNode, getStyleableParent, getStyleClass, getText, getTypeSelector, getUserData, graphicProperty, idProperty, isDisable, isMnemonicParsing, isVisible, mnemonicParsingProperty, onActionProperty, onMenuValidationProperty, parentMenuProperty, parentPopupProperty, removeEventHandler, setAccelerator, setDisable, setGraphic, setId, setMnemonicParsing, setOnAction, setOnMenuValidation, setParentMenu, setParentPopup, setStyle, setText, setUserData, setVisible, styleProperty, textProperty, toString, visibleProperty
-
-
Constructor Detail
-
SeparatorMenuItem
public SeparatorMenuItem()
Creates a default SeparatorMenuItem instance.
-
© 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.