viewtify.ui.helper
ContextMenuHelper
<Self
>
Self
>AbstractComboBox
T
,Self
,W
UIButton
UICheckBox
UICheckSwitch
UIChoiceBox
T
UIColorPicker
UIComboBox
T
UIComboCheckBox
T
UIDatePicker
UIFontPicker
UIHBox
UIImage
UILabel
UIListView
E
UIProgressBar
UISlidePane
UISpinner
T
UISplitPane
UIStackPane
UITab
UITabPane
UITableView
RowV
UITextArea
UIText
V
UIToggleButton
UIToolBar
UITreeTableView
RowV
UIVBox
context
(ConsumerUIContextMenu
builder
)
Self
ConsumerUIContextMenu
builder
)Consumer builder |
A consumer that builds the UIContextMenu for the context menu. |
Self |
A chainable API for further configuration. |
Defines the context menu for the UI component. The menu is not generated until it is actually needed. This method allows you to specify a context menu using a builder function.
context
(Object
id
, ConsumerUIContextMenu
builder
)
Self
Object
id
, ConsumerUIContextMenu
builder
)Object id |
An identifier for the context menu. |
Consumer builder |
A consumer that builds the UIContextMenu for the context menu. |
Self |
A chainable API for further configuration. |
Defines the context menu with the specified ID for the UI component. The menu is not generated until it is actually needed. If the specified ID already exists, the menu will be overwritten instead of added. This method allows you to specify a context menu using a builder function.
context
(boolean
rebuildable
, ConsumerUIContextMenu
builder
)
Self
boolean
rebuildable
, ConsumerUIContextMenu
builder
)boolean rebuildable |
If true, the context menu will be generated on every popup. |
Consumer builder |
A consumer that builds the UIContextMenu for the context menu. |
Self |
A chainable API for further configuration. |
Define the context menu with the option to specify whether it should be generated lazily. This method allows you to specify a context menu using a builder function.
context
(Object
id
, boolean
rebuildable
, ConsumerUIContextMenu
builder
)
Self
Object
id
, boolean
rebuildable
, ConsumerUIContextMenu
builder
)Object id |
An identifier for the context menu. |
boolean rebuildable |
If true, the context menu will be generated on every popup. |
Consumer builder |
A consumer that builds the UIContextMenu for the context menu. |
Self |
A chainable API for further configuration. |
Define the context menu with the option to specify whether it should be generated lazily. If the specified ID already exists, the menu will be overwritten instead of added. This method allows you to specify a context menu using a builder function.
removeContext
()
Self
Self |
Chainable API. |
Deletes all context menus associated with the this instance.
removeContext
(Object
id
)
Self
Object
id
)Object id |
An identifier of context menu. |
Self |
Chainable API. |
Deletes all context menus associated with the specified ID.
showContext
()
Self
Self |
Show the associated context menu.
showContext
(javafx.geometry.Side
location
, double
dx
, double
dy
)
Self
javafx.geometry.Side
location
, double
dx
, double
dy
)javafx.geometry.Side location |
the side |
double dx |
the dx value for the x-axis |
double dy |
the dy value for the y-axis |
Self |
Shows the ContextMenu
relative to the side specified by the side
parameter,
and offset by the given dx
and dy
values for the x-axis and y-axis,
respectively. If there is not enough room, the menu is moved to the opposite side and the
offset is not applied.
To clarify the purpose of the side
parameter, consider that it is relative to the
anchor node. As such, a side
of TOP
would mean that the ContextMenu's bottom
left corner is set to the top left corner of the anchor.
This function is useful for finely tuning the position of a menu, relative to the parent node to ensure close alignment.
hideContext
()
Self
Self |
Hide the associated context menu.
toggleContext
()
Self
Self |
Show the associated context menu.
toggleContext
(javafx.geometry.Side
location
, double
dx
, double
dy
)
Self
javafx.geometry.Side
location
, double
dx
, double
dy
)javafx.geometry.Side location |
the side |
double dx |
the dx value for the x-axis |
double dy |
the dy value for the y-axis |
Self |
Toggle the context menu.
isContextShowing
()
boolean
boolean |
A result. |
Whether or not the context menu is showing (that is, open on the user's system). The context menu might be "showing", yet the user might not be able to see it due to the context menu being rendered behind another context menu or due to the context menu being positioned off the monitor.
behaveLikeButton
()
Self
Self |
Change the control of showing and hiding the context menu from right-click to left-click and ignore native context requesting.
enableContext
()
Self
Self |
Enable the context menu.
disableContext
()
Self
Self |
Enable the context menu.
enableNativeContextRequest
()
Self
Self |
Enable the context menu.
disableNativeContextRequest
()
Self
Self |
Disable the context menu.
hookContext
(kiss.WiseRunnable
beforeShowing
, kiss.WiseRunnable
afterHidden
)
Self
kiss.WiseRunnable
beforeShowing
, kiss.WiseRunnable
afterHidden
)kiss.WiseRunnable beforeShowing |
|
kiss.WiseRunnable afterHidden |
|
Self |
Hook context event.