Module MaterialFX

Class MFXContextMenuItem

All Implemented Interfaces:
Styleable, EventTarget, Skinnable

public class MFXContextMenuItem extends Labeled
Implementation of a menu item for MFXContextMenu.

Extends Labeled and offers a new custom skin.

This control has three elements:

- The icon, specified by the Labeled.graphicProperty(), it is wrapped in a MFXIconWrapper with a default fixed size of 24 to ensure that all items are perfectly aligned. That means that setting big nodes WON'T WORK and after all as a design principle it's not recommended (which means, just don't do it), can be changed via CSS.

- The label showing the item's text

- Another label showing the specifies acceleratorProperty(). Note that the accelerator is just a String. No handlers will be added to the control. I think this is the best solution since handlers may also have some complex logic defined by the user.

Allows to easily specify a Tooltip with a supplier property, tooltipSupplierProperty(), and an action with onActionProperty().

A MFXContextMenuItem.Builder class is offered to easily build items with fluent api.