java.lang.Object
io.github.palexdev.materialfx.skins.MFXContextMenuSkin
- All Implemented Interfaces:
Skin<MFXContextMenu>
Skin associated with every
MFXContextMenu by default.
This is very similar to MFXPopupSkin but there are two containers.
The top container is a MFXScrollPane, because sometimes context menus can contain lots of
items, but it is desirable to keep it under a certain height and make it scrollable. Then there's a
VBox containing all the items specified by MFXContextMenu.getItems(), this box is set as the content
of the scroll pane.
MFXPopup.contentProperty():
MFXContextMenu is a special case of MFXPopup. This skin is
responsible for setting the popup's content to the aforementioned scroll pane.
While it still allows to change the content whenever you want, it's nonsense, so
don't do it.
-
Constructor Details
-
MFXContextMenuSkin
-
-
Method Details
-
init
protected void init()Positions the popup. -
getSkinnable
- Specified by:
getSkinnablein interfaceSkin<MFXContextMenu>
-
getNode
- Specified by:
getNodein interfaceSkin<MFXContextMenu>
-
dispose
public void dispose()- Specified by:
disposein interfaceSkin<MFXContextMenu>
-