rectangle.setMouseTransparent(true); rectangle.setDepthTest(DepthTest.DISABLE); root.getChildren().add(rectangle); rectangle.setMouseTransparent(false); box.setCursor(Cursor.MOVE); box.startFullDrag(); rectangle.setMouseTransparent(true); box.setCursor(Cursor.DEFAULT); });
rect.setMouseTransparent(true);
/** * Styles the selected and unselected area. */ private void styleAreas() { selectedArea.fillProperty().bind(getSkinnable().selectionAreaFillProperty()); selectedArea.strokeProperty().bind(getSkinnable().selectionBorderPaintProperty()); selectedArea.strokeWidthProperty().bind(getSkinnable().selectionBorderWidthProperty()); selectedArea.setStrokeType(StrokeType.OUTSIDE); // if the control's layout depends on this rectangle, // the stroke's width messes up the layout if the selection is on the pane's edge selectedArea.setManaged(false); selectedArea.setMouseTransparent(true); unselectedArea.setFill(Color.TRANSPARENT); unselectedArea.strokeProperty().bind(getSkinnable().unselectedAreaFillProperty()); unselectedArea.strokeWidthProperty().bind( Bindings.max(getSkinnable().widthProperty(), getSkinnable().heightProperty())); unselectedArea.setStrokeType(StrokeType.OUTSIDE); // this call is crucial! it prevents the enormous unselected area from messing up the layout unselectedArea.setManaged(false); unselectedArea.setMouseTransparent(true); }
/** * Prepare Stage for dock feedback display */ void buildDockFeedbackStage() { dockFeedbackPopup = new Stage(StageStyle.TRANSPARENT); dockFeedback = new Rectangle(0, 0, 100, 100); dockFeedback.setArcHeight(10); dockFeedback.setArcWidth(10); dockFeedback.setFill(Color.TRANSPARENT); dockFeedback.setStroke(Color.BLACK); dockFeedback.setStrokeWidth(2); dockFeedback.setCache(true); dockFeedback.setCacheHint(CacheHint.SPEED); dockFeedback.setEffect(new DropShadow(BlurType.TWO_PASS_BOX, Color.BLACK, 10, 0.2, 3, 3)); dockFeedback.setMouseTransparent(true); BorderPane borderpane = new BorderPane(); borderpane.setStyle("-fx-background-color:transparent"); // J8 borderpane.setCenter(dockFeedback); Scene scene = new Scene(borderpane); scene.setFill(Color.TRANSPARENT); dockFeedbackPopup.setScene(scene); dockFeedbackPopup.sizeToScene(); }
shadowRectangle.setMouseTransparent(true); backgroundRect.setMouseTransparent(true);
selectRect.setMouseTransparent( true ); selectRect.setOpacity( 0.3 ); selectRect.setStroke( Color.rgb( 0, 0x29, 0x66 ) );