/* */ public WCRectangle getViewBounds() /* */ { /* 71 */ WebView localWebView = this.accessor.getView(); /* 72 */ Window localWindow = null; /* 73 */ if ((localWebView != null) && (localWebView.getScene() != null) && ((localWindow = localWebView.getScene().getWindow()) != null)) /* */ { /* 77 */ return new WCRectangle( (float) localWindow.getX(), (float) localWindow.getY(), (float) localWindow.getWidth(), (float) localWindow.getHeight()); /* */ } /* */ /* 81 */ return null; /* */ }
/* */ public String chooseFile(String paramString) /* */ { /* 124 */ Window localWindow = null; /* 125 */ WebView localWebView = this.accessor.getView(); /* 126 */ if ((localWebView != null) && (localWebView.getScene() != null)) { /* 127 */ localWindow = localWebView.getScene().getWindow(); /* */ } /* */ /* 130 */ if (this.chooser == null) { /* 131 */ this.chooser = new FileChooser(); /* */ } /* */ /* 135 */ if (paramString != null) { /* 136 */ localFile = new File(paramString); /* 137 */ while ((localFile != null) && (!localFile.isDirectory())) { /* 138 */ localFile = localFile.getParentFile(); /* */ } /* 140 */ this.chooser.setInitialDirectory(localFile); /* */ } /* 142 */ File localFile = this.chooser.showOpenDialog(localWindow); /* 143 */ return localFile != null ? localFile.getAbsolutePath() : null; /* */ }
/* */ public WCPoint screenToWindow(WCPoint paramWCPoint) { /* 108 */ WebView localWebView = this.accessor.getView(); /* 109 */ Scene localScene = localWebView.getScene(); /* 110 */ Window localWindow = null; /* */ /* 112 */ if ((localScene != null) && ((localWindow = localScene.getWindow()) != null)) /* */ { /* 115 */ Point2D localPoint2D = localWebView.sceneToLocal( paramWCPoint.getX() - localWindow.getX() - localScene.getX(), paramWCPoint.getY() - localWindow.getY() - localScene.getY()); /* */ /* 118 */ return new WCPoint((float) localPoint2D.getX(), (float) localPoint2D.getY()); /* */ } /* 120 */ return new WCPoint(0.0F, 0.0F); /* */ }
/* */ public WCPoint windowToScreen(WCPoint paramWCPoint) /* */ { /* 125 */ WebView localWebView = this.accessor.getView(); /* 126 */ Scene localScene = localWebView.getScene(); /* 127 */ Window localWindow = null; /* */ /* 129 */ if ((localScene != null) && ((localWindow = localScene.getWindow()) != null)) /* */ { /* 132 */ Point2D localPoint2D = localWebView.localToScene(paramWCPoint.getX(), paramWCPoint.getY()); /* 133 */ return new WCPoint( (float) (localPoint2D.getX() + localScene.getX() + localWindow.getX()), (float) (localPoint2D.getY() + localScene.getY() + localWindow.getY())); /* */ } /* */ /* 136 */ return new WCPoint(0.0F, 0.0F); /* */ }
@FXML protected void handleClose(ActionEvent event) { logger.debug("Closing help window"); helpWebView.getScene().getWindow().hide(); }