List of usage examples for javafx.stage Window isShowing
public final boolean isShowing()
From source file:org.pdfsam.ui.selection.LoadingStatusIndicator.java
/** * Show a password request right below the wrapped Control *//*from w w w . ja v a2 s . c om*/ public void showPasswordRequest() { Scene scene = this.getScene(); if (scene != null) { Window owner = scene.getWindow(); if (owner != null && owner.isShowing()) { Point2D nodeCoord = this.localToScene(this.getWidth() / 2, this.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); popup.showFor(descriptorProvider.getPdfDocumentDescriptor(), this, anchorX, anchorY); } } }