javafx.stage.Window.isShowing()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(165)

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

Window.isShowing介绍

暂无

代码示例

代码示例来源:origin: torakiki/pdfsam

@Override
  public void handle(KeyEvent t) {
    if (window.isShowing() && ESCAPE_COMBO.match(t)) {
      window.hide();
    }
  }
}

代码示例来源:origin: torakiki/pdfsam

private void showPasswordFieldPopup() {
  Scene scene = this.getScene();
  if (scene != null) {
    Window owner = scene.getWindow();
    if (owner != null && owner.isShowing()) {
      Point2D nodeCoord = encryptionIndicator.localToScene(encryptionIndicator.getWidth() / 2,
          encryptionIndicator.getHeight() / 1.5);
      double anchorX = Math.round(owner.getX() + scene.getX() + nodeCoord.getX() + 2);
      double anchorY = Math.round(owner.getY() + scene.getY() + nodeCoord.getY() + 2);
      passwordPopup.showFor(this, descriptor, anchorX, anchorY);
    }
  }
}

代码示例来源:origin: torakiki/pdfsam

@EventListener
public void showPasswordFieldPopup(ShowPasswordFieldPopupRequest request) {
  Scene scene = this.getScene();
  if (scene != null) {
    Window owner = scene.getWindow();
    if (owner != null && owner.isShowing()) {
      Point2D nodeCoord = request.getRequestingNode().localToScene(request.getRequestingNode().getWidth() / 2,
          request.getRequestingNode().getHeight() / 1.5);
      double anchorX = Math.round(owner.getX() + scene.getX() + nodeCoord.getX() + 2);
      double anchorY = Math.round(owner.getY() + scene.getY() + nodeCoord.getY() + 2);
      passwordPopup.showFor(this, request.getPdfDescriptor(), anchorX, anchorY);
    }
  }
}

代码示例来源:origin: torakiki/pdfsam

private ErrorTooltipManager(String message) {
  require(isNotBlank(message), "Tooltip message cannot be blank");
  this.tooltip = new Tooltip(message);
  this.tooltip.getStyleClass().add(ERROR_TOOLTIP_CLASS);
  hideTimer.getKeyFrames().add(new KeyFrame(new Duration(5000)));
  hideTimer.setOnFinished(e -> {
    tooltip.hide();
    ErrorTooltipManager.this.active = false;
  });
  activationTimer.getKeyFrames().add(new KeyFrame(new Duration(250)));
  activationTimer.setOnFinished(e -> {
    if (!ErrorTooltipManager.this.active) {
      Scene scene = getScene();
      if (scene != null) {
        Window owner = scene.getWindow();
        if (owner != null && owner.isShowing() && ValidableTextField.this.isVisible()) {
          Point2D where = getDisplayCoordiantes(owner, scene);
          tooltip.show(ValidableTextField.this, where.getX(), where.getY());
          ErrorTooltipManager.this.active = true;
          hideTimer.playFromStart();
        }
      }
    }
  });
}

代码示例来源:origin: org.codehaus.griffon/griffon-javafx

@Override
protected boolean isWindowVisible(@Nonnull Window window) {
  requireNonNull(window, ERROR_WINDOW_NULL);
  return window.isShowing();
}

代码示例来源:origin: org.codehaus.griffon/griffon-javafx

public void handleClose(@Nonnull Window widget) {
  if (getApplication().getPhase() == ApplicationPhase.SHUTDOWN) {
    return;
  }
  List<Window> visibleWindows = new ArrayList<>();
  for (Window window : getWindows()) {
    if (window.isShowing()) {
      visibleWindows.add(window);
    }
  }
  if (isAutoShutdown() && visibleWindows.size() <= 1 && visibleWindows.contains(widget) && !getApplication().shutdown()) {
    show(widget);
  }
}

代码示例来源:origin: us.ihmc/robot-environment-awareness

public UIConnectionHandler(Window mainWindow, REAUIMessager uiMessager)
{
 this.mainWindow = mainWindow;
 this.uiMessager = uiMessager;
 uiMessager.registerModuleMessagerStateListener(isMessagerOpen -> {
   if (isMessagerOpen)
    new Thread(() -> {
      // It seems like the main window has to be up to have access to the communication.
      while (!mainWindow.isShowing())
       ThreadTools.sleep(100);
      refreshUIControls();
    }, "REAUIConnectionHandler").start();
   else
    displayWarning();
 });
}

相关文章