use of javafx.scene.input.ContextMenuEvent in project completable-reactor by ru-fix.
the class TransitionLine method initializePopupMenu.
void initializePopupMenu() {
val contextMenu = buildTooltipContent();
EventHandler<ContextMenuEvent> contextMenuHandler = contextMenuEvent -> {
contextMenu.show(line, contextMenuEvent.getScreenX(), contextMenuEvent.getScreenY());
contextMenuEvent.consume();
};
labelsPane.setOnContextMenuRequested(contextMenuHandler);
pointer.setOnContextMenuRequested(contextMenuHandler);
line.setOnContextMenuRequested(contextMenuHandler);
menuArea.setOnContextMenuRequested(contextMenuHandler);
}
Aggregations