java.lang.Object
javafx.scene.control.MenuItem
javafx.scene.control.CustomMenuItem
atlantafx.base.controls.CaptionMenuItem
- All Implemented Interfaces:
javafx.css.Styleable
,javafx.event.EventTarget
public class CaptionMenuItem
extends javafx.scene.control.CustomMenuItem
A MenuItem that is intended to contain a caption for a group of menu items
that share a common purpose.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.StringProperty
Contains the title of the menu item.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
FieldsFields inherited from class javafx.scene.control.MenuItem
MENU_VALIDATION_EVENT
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty menu item.CaptionMenuItem
(@Nullable String text) Creates a CaptionMenuItem with the specified text as the title. -
Method Summary
Modifier and TypeMethodDescriptiongetTitle()
Gets the value of thetitle
property.void
Sets the value of thetitle
property.javafx.beans.property.StringProperty
Contains the title of the menu item.Methods inherited from class javafx.scene.control.CustomMenuItem
contentProperty, getContent, hideOnClickProperty, isHideOnClick, setContent, setHideOnClick
Methods inherited from class javafx.scene.control.MenuItem
acceleratorProperty, addEventFilter, 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, removeEventFilter, removeEventHandler, setAccelerator, setDisable, setGraphic, setId, setMnemonicParsing, setOnAction, setOnMenuValidation, setParentMenu, setParentPopup, setStyle, setText, setUserData, setVisible, styleProperty, textProperty, toString, visibleProperty
-
Property Details
-
title
public javafx.beans.property.StringProperty titlePropertyContains the title of the menu item.- See Also:
-
-
Field Details
-
title
protected final javafx.scene.control.Label title
-
-
Constructor Details
-
CaptionMenuItem
public CaptionMenuItem()Creates an empty menu item. -
CaptionMenuItem
Creates a CaptionMenuItem with the specified text as the title.
-
-
Method Details
-
titleProperty
public javafx.beans.property.StringProperty titleProperty()Contains the title of the menu item.- Returns:
- the
title
property - See Also:
-
getTitle
Gets the value of thetitle
property.- Property description:
- Contains the title of the menu item.
- Returns:
- the value of the
title
property - See Also:
-
setTitle
Sets the value of thetitle
property.- Property description:
- Contains the title of the menu item.
- Parameters:
text
- the value for thetitle
property- See Also:
-