public void updateFeedback(Consumer<StackPane> consumer) { consumer.accept((StackPane) this.popupWindow.getScene().getRoot()); this.popupWindow.sizeToScene(); this.popupWindow.setX(this.screenX - this.popupWindow.getWidth() / 2); this.popupWindow.setY(this.screenY + 20); this.popupWindow.show(n.getScene().getWindow()); }
public void updateFeedback(Consumer<StackPane> consumer) { consumer.accept((StackPane) this.popupWindow.getScene().getRoot()); this.popupWindow.sizeToScene(); this.popupWindow.setX(this.screenX - this.popupWindow.getWidth() / 2); this.popupWindow.setY(this.screenY + 20); this.popupWindow.show(n.getScene().getWindow()); }
public DragFeedbackPopup(Node n) { this.n = n; this.popupWindow = new PopupWindow() { // Empty }; this.popupWindow.setAutoFix(false); this.popupWindow.setUserData("findNodeExclude"); //$NON-NLS-1$ // this.stage.setAlwaysOnTop(true); StackPane root = new StackPane(); root.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY))); // Scene value = new Scene(root); // value.setFill(Color.TRANSPARENT); // this.stage.setScene(value); this.popupWindow.getScene().getStylesheets().setAll(n.getScene().getStylesheets()); this.popupWindow.getScene().setRoot(root); }
public DragFeedbackPopup(Node n) { this.n = n; this.popupWindow = new PopupWindow() { // Empty }; this.popupWindow.setAutoFix(false); this.popupWindow.setUserData("findNodeExclude"); //$NON-NLS-1$ // this.stage.setAlwaysOnTop(true); StackPane root = new StackPane(); root.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY))); // Scene value = new Scene(root); // value.setFill(Color.TRANSPARENT); // this.stage.setScene(value); this.popupWindow.getScene().getStylesheets().setAll(n.getScene().getStylesheets()); this.popupWindow.getScene().setRoot(root); }
public TextViewerHoverManager(TextViewer textViewer) { this.textViewer = textViewer; this.popup = new PopupWindow() { }; this.popup.setAutoFix(false); this.popup.setAutoHide(false); this.textViewer.getTextWidget().sceneProperty().addListener( e -> { if( textViewer.getTextWidget().getScene() != null ) { popup.getScene().getStylesheets().setAll(textViewer.getTextWidget().getScene().getStylesheets()); } }); root = new BorderPane(); root.getStyleClass().add("styled-text-hover"); popup.getScene().setRoot(root); }
p.setPrefHeight(200); p.setPrefWidth(400); this.stage.getScene().addEventFilter(KeyEvent.KEY_TYPED, this::handleKeyTyped); this.stage.getScene().addEventFilter(KeyEvent.KEY_PRESSED, this::handleKeyPressed); this.stage.getScene().getStylesheets().addAll(this.viewer.getTextWidget().getScene().getStylesheets()); this.proposalList = new ListView<>(); this.proposalList.getStyleClass().add("content-proposal-list"); //$NON-NLS-1$ this.stage.getScene().setRoot(p); this.stage.focusedProperty().addListener((o) -> { if( this.stage != null && ! this.stage.isFocused() ) {