/** * this method is used to add shadow effect to the node, * however the shadow is not real ( gets affected with node transformations) * <p> * use {@link #createMaterialNode(Node, int)} instead to generate a real shadow */ public static void setDepth(Node control, int level) { level = level < 0 ? 0 : level; level = level > 5 ? 5 : level; control.setEffect(new DropShadow(BlurType.GAUSSIAN, depth[level].getColor(), depth[level].getRadius(), depth[level].getSpread(), depth[level].getOffsetX(), depth[level].getOffsetY())); }
private void setFocusBorder() { InnerShadow innerFocus = new InnerShadow(); innerFocus.setColor((Color) innerFocusColorProperty().get()); innerFocus.setBlurType(BlurType.ONE_PASS_BOX); innerFocus.setRadius(6.5); innerFocus.setChoke(0.7); innerFocus.setOffsetX(0.0); innerFocus.setOffsetY(0.0); DropShadow outerFocus = new DropShadow(); outerFocus.setColor((Color) outerFocusColorProperty().get()); outerFocus.setBlurType(BlurType.ONE_PASS_BOX); outerFocus.setRadius(5.0); outerFocus.setSpread(0.6); outerFocus.setOffsetX(0.0); outerFocus.setOffsetY(0.0); outerFocus.setInput(innerFocus); for (Node child : getChildren()) { if (child instanceof StackPane) { child.setEffect(outerFocus); } } }
public static void pop(Node control) { control.setEffect(new DropShadow(BlurType.GAUSSIAN, Color.rgb(0, 0, 0, 0.26), 5, 0.05, 0, 1)); }
innerBar.arcHeightProperty().bind(width.divide(8)); DropShadow ds = new DropShadow(10, Color.WHITE); ds.setInput(new Glow(0.3)); ds.setWidth(50); backgroundBar.setEffect(ds); ds = new DropShadow(5, Color.GOLD); ds.setInput(new Glow(0.1)); innerBar.setEffect(ds);
public void setFill(Color color) { innerBar.setFill(color); DropShadow ds = new DropShadow(15, color); ds.setInput(new Glow(0.5)); innerBar.setEffect(ds); }
private void setSelectedFocusBorder() { InnerShadow innerFocus = new InnerShadow(); innerFocus.setColor((Color) innerFocusColorProperty().get()); innerFocus.setBlurType(BlurType.ONE_PASS_BOX); innerFocus.setRadius(6.5); innerFocus.setChoke(0.7); innerFocus.setOffsetX(0.0); innerFocus.setOffsetY(0.0); DropShadow outerFocus = new DropShadow(); outerFocus.setColor((Color) outerFocusColorProperty().get()); outerFocus.setBlurType(BlurType.ONE_PASS_BOX); outerFocus.setRadius(7.0); outerFocus.setSpread(0.7); outerFocus.setOffsetX(0.0); outerFocus.setOffsetY(0.0); outerFocus.setInput(innerFocus); for (Node child : getChildren()) { if (child instanceof StackPane) { child.setEffect(outerFocus); } } }
public static void pop(Node control) { control.setEffect(new DropShadow(BlurType.GAUSSIAN, Color.rgb(0, 0, 0, 0.26), 5, 0.05, 0, 1)); }
innerBar.arcHeightProperty().bind(width.divide(8)); DropShadow ds = new DropShadow(10, Color.WHITE); ds.setInput(new Glow(0.3)); ds.setWidth(50); backgroundBar.setEffect(ds); ds = new DropShadow(5, Color.GOLD); ds.setInput(new Glow(0.1)); innerBar.setEffect(ds);
public void setFill(Color color) { innerBar.setFill(color); DropShadow ds = new DropShadow(15, color); ds.setInput(new Glow(0.5)); innerBar.setEffect(ds); }
level = level < 0 ? 0 : level; level = level > 5 ? 5 : level; container.setEffect(new DropShadow(BlurType.GAUSSIAN, depth[level].getColor(), depth[level].getRadius(), depth[level].getSpread(), depth[level].getOffsetX(), depth[level].getOffsetY())); return container;
setEffect(new DropShadow(3, Color.BLACK));
/** * this method is used to add shadow effect to the node, * however the shadow is not real ( gets affected with node transformations) * <p> * use {@link #createMaterialNode(Node, int)} instead to generate a real shadow */ public static void setDepth(Node control, int level) { level = level < 0 ? 0 : level; level = level > 5 ? 5 : level; control.setEffect(new DropShadow(BlurType.GAUSSIAN, depth[level].getColor(), depth[level].getRadius(), depth[level].getSpread(), depth[level].getOffsetX(), depth[level].getOffsetY())); }
setEffect(new DropShadow(3, Color.BLACK));
level = level < 0 ? 0 : level; level = level > 5 ? 5 : level; container.setEffect(new DropShadow(BlurType.GAUSSIAN, depth[level].getColor(), depth[level].getRadius(), depth[level].getSpread(), depth[level].getOffsetX(), depth[level].getOffsetY())); return container;
/** * 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(); }
dsFocused = new DropShadow(BlurType.THREE_PASS_BOX, Color.BLACK, SHADOW_WIDTH, 0.1, 0, 0); dsNotFocused = new DropShadow(BlurType.THREE_PASS_BOX, Color.DARKGREY, SHADOW_WIDTH, 0, 0, 0);
(ObservableValue<? extends Boolean> ov, Boolean oldValue, Boolean newValue) -> { if (newValue) { DropShadow shadow = new DropShadow(20, Color.WHITE); Glow effect = new Glow(0.5);