javafx.event.Event.isConsumed()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中javafx.event.Event.isConsumed()方法的一些代码示例,展示了Event.isConsumed()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.isConsumed()方法的具体详情如下:
包路径:javafx.event.Event
类名称:Event
方法名:isConsumed

Event.isConsumed介绍

暂无

代码示例

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

/**
   * Loop over all event handlers and delegate the event to each one of them.
   * If the event is consumed by one eventhandler the loop is broken.
   * @param t event.
   */
  @Override
  public void handle(T t) {
    for (EventHandler<T> eventHandler : eventHandlers) {
      if (!t.isConsumed()) {
        eventHandler.handle(t);
      } else {
        break;
      }
    }
  }
}

代码示例来源: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: com.nexitia.emaginplatform/emagin-jfxcore-engine

@Override
protected Void call() throws Exception {
 boolean consumed = ev.isConsumed();

相关文章