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); }
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); }
this.stage.setAutoFix(false); this.stage.setWidth(300); this.stage.setHeight(200);