本文整理了Java中javafx.event.Event.consume()
方法的一些代码示例,展示了Event.consume()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.consume()
方法的具体详情如下:
包路径:javafx.event.Event
类名称:Event
方法名:consume
暂无
代码示例来源:origin: org.fxmisc.wellbehaved/wellbehavedfx
@Override
default void handle(T event) {
switch(process(event)) {
case CONSUME: event.consume(); break;
case PROCEED: /* do nothing */ break;
case IGNORE: /* do nothing */ break;
}
}
}
代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx
public EventHandler<Event> createOnCloseRequestHandler(Tab tab, FXDockableEntry dockableEntry, DockingAreaPane dockingAreaPane) {
return event -> {
final FXDockableData dockableData = dockableEntry.getDockableData();
LOG.debug("Closing tab: {} ...", dockableData.getTitle());
closeRequest = new CloseRequest();
DockableCloseRequestEvent dockableCloseRequestEvent = new DockableCloseRequestEvent(dockableEntry, dockingAreaPane, dockingAreaPane);
dockingAreaPane.fireEvent(dockableCloseRequestEvent);
if (closeRequest.isStopClosingTab()) {
event.consume();
LOG.debug("onCloseRequest event consumed for: {}", dockableData.getTitle());
}
closeRequest = null;
};
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* One click select, 2 clicks other.
*
* @param event
*/
public void handleRowSelection(Event event) {
if (checkBox.isVisible()) {
if (((MouseEvent) event).getClickCount() == 1 && !event.isConsumed()) {
final boolean selected = !checkBox.isSelected();
checkBox.setSelected(selected);
event.consume();
}
}
}
代码示例来源:origin: PhoenicisOrg/phoenicis
protected void setNextButtonAction(EventHandler<MouseEvent> nextButtonAction) {
nextButton.setOnMouseClicked(event -> {
nextButton.setDisable(true);
nextButtonAction.handle(event);
});
this.getParent().setOnCloseRequest(event -> {
if (this.messageWaitingForResponse != null) {
this.messageWaitingForResponse.sendCancelSignal();
}
event.consume();
});
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
ev.consume();
String actionName = actionComponent.getPropertyValue("action");
String args = actionComponent.getPropertyValue("args");
内容来源于网络,如有侵权,请联系作者删除!