當前位置: 首頁>>代碼示例>>Java>>正文


Java DropShadow.setInput方法代碼示例

本文整理匯總了Java中javafx.scene.effect.DropShadow.setInput方法的典型用法代碼示例。如果您正苦於以下問題:Java DropShadow.setInput方法的具體用法?Java DropShadow.setInput怎麽用?Java DropShadow.setInput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.effect.DropShadow的用法示例。


在下文中一共展示了DropShadow.setInput方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setSelectedFocusBorder

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void setSelectedFocusBorder() {
    InnerShadow innerFocus = new InnerShadow();
    innerFocus.setColor(Color.rgb(104, 155, 201, 0.7));
    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.rgb(104, 155, 201));
    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);
        }
    }
}
 
開發者ID:cis422s14team5,項目名稱:WatchlistPro,代碼行數:25,代碼來源:AquaCheckBoxSkin.java

示例2: setFocusBorder

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void setFocusBorder() {
    InnerShadow innerFocus = new InnerShadow();
    innerFocus.setColor(Color.rgb(104, 155, 201));
    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.rgb(104, 155, 201));
    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);
        }
    }
}
 
開發者ID:cis422s14team5,項目名稱:WatchlistPro,代碼行數:25,代碼來源:AquaCheckBoxSkin.java

示例3: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    frame = new Region();
    frame.setOpacity(getSkinnable().isFrameVisible() ? 1 : 0);

    led = new Region();
    led.setStyle("-led-color: " + Util.colorToCss((Color) getSkinnable().getLedColor()) + ";");

    innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), 8, 0d, 0d, 0d);

    glow = new DropShadow(BlurType.TWO_PASS_BOX, (Color) getSkinnable().getLedColor(), 20, 0d, 0d, 0d);
    glow.setInput(innerShadow);

    highlight = new Region();

    // Set the appropriate style classes
    changeStyle();

    // Add all nodes
    getChildren().setAll(frame, led, highlight);
}
 
開發者ID:HanSolo,項目名稱:Enzo,代碼行數:21,代碼來源:LedSkin.java

示例4: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    frame = new Region();
    frame.getStyleClass().setAll("frame");
    frame.setOpacity(getSkinnable().isFrameVisible() ? 1 : 0);

    led = new Region();
    led.getStyleClass().setAll("main");
    led.setStyle("-led-color: " + (getSkinnable().getLedColor()).toString().replace("0x", "#") + ";");

    innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), 8, 0d, 0d, 0d);

    glow = new DropShadow(BlurType.TWO_PASS_BOX, (Color) getSkinnable().getLedColor(), 20, 0d, 0d, 0d);
    glow.setInput(innerShadow);

    highlight = new Region();
    highlight.getStyleClass().setAll("highlight");

    getChildren().addAll(frame, led, highlight);
}
 
開發者ID:HanSolo,項目名稱:JFX8CustomControls,代碼行數:20,代碼來源:LedSkin.java

示例5: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    frame = new Region();
    frame.getStyleClass().setAll("frame");
    frame.setOpacity(isFrameVisible() ? 1 : 0);

    led = new Region();
    led.getStyleClass().setAll("main");
    led.setStyle("-led-color: " + (getLedColor()).toString().replace("0x", "#") + ";");

    innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), 8, 0d, 0d, 0d);

    glow = new DropShadow(BlurType.TWO_PASS_BOX, getLedColor(), 20, 0d, 0d, 0d);
    glow.setInput(innerShadow);

    highlight = new Region();
    highlight.getStyleClass().setAll("highlight");

    // Add all nodes
    getChildren().addAll(frame, led, highlight);
}
 
開發者ID:HanSolo,項目名稱:JFX8CustomControls,代碼行數:21,代碼來源:Led.java

示例6: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    // Set initial size
    if (Double.compare(getWidth(), 0) <= 0 || Double.compare(getHeight(), 0) <= 0 ||
        Double.compare(getPrefWidth(), 0) <= 0 || Double.compare(getPrefHeight(), 0) <= 0) {
        setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
    }

    // Apply the base CSS style class to the control
    getStyleClass().add("led");

    // Create the needed nodes and apply their CSS style classes
    frame = new Region();
    frame.getStyleClass().setAll("frame");

    main = new Region();
    main.getStyleClass().setAll("main");

    // We handle effects in code because we have to chain them and
    // we need to calculate the shadow spread dependent of the size
    innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), 8, 0, 0, 0);

    glow = new DropShadow(BlurType.TWO_PASS_BOX, getColor(), 20, 0, 0, 0);
    glow.setInput(innerShadow);

    highlight = new Region();
    highlight.getStyleClass().setAll("highlight");

    // Add all nodes
    getChildren().addAll(frame, main, highlight);
}
 
開發者ID:HanSolo,項目名稱:hol1634,代碼行數:31,代碼來源:Led.java

示例7: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    if (Double.compare(control.getPrefWidth(), 0.0) <= 0 || Double.compare(control.getPrefHeight(), 0.0) <= 0 ||
        Double.compare(control.getWidth(), 0.0) <= 0 || Double.compare(control.getHeight(), 0.0) <= 0) {
        if (control.getPrefWidth() > 0 && control.getPrefHeight() > 0) {
            control.setPrefSize(control.getPrefWidth(), control.getPrefHeight());
        } else {
            control.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        }
    }

    frame = new Region();
    frame.getStyleClass().setAll("frame");

    main = new Region();
    main.getStyleClass().setAll("main");
    main.setStyle(String.join("", "-color: ", control.getColor().toString().replace("0x", "#"), ";"));

    innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), 8, 0, 0, 0);

    glow = new DropShadow(BlurType.TWO_PASS_BOX, control.getColor(), 20, 0, 0, 0);
    glow.setInput(innerShadow);

    highlight = new Region();
    highlight.getStyleClass().setAll("highlight");

    getChildren().addAll(frame, main, highlight);
}
 
開發者ID:HanSolo,項目名稱:hol1634,代碼行數:28,代碼來源:LedSkin.java

示例8: aimedLightningBolt

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public void aimedLightningBolt(Entity source, Point2D target) {
    Entity e = new Entity(Type.ENEMY_PROJECTILE);
    e.setProperty(Property.SUB_TYPE, Element.LIGHTNING);
    e.addControl(new PhysicsControl(consApp.physics));
    e.addFXGLEventHandler(Event.COLLIDED_PLATFORM, event -> {
        consApp.getSceneManager().removeEntity(e);
    });
    e.addFXGLEventHandler(Event.DEATH, event -> {
        consApp.getSceneManager().removeEntity(event.getTarget());
    });

    e.setVisible(false);
    e.setCollidable(false);
    Group g = new Group();
    e.addControl(new PhysicsControl(consApp.physics));
    LightningControl lc = new LightningControl(g);
    e.addControl(lc);
    e.setPosition(0, 0);

    g.getChildren().addAll(createBolt(new Point2D(target.getX(), -200), target, 5));
    e.setGraphics(g);

    DropShadow shadow = new DropShadow(20, Color.PURPLE);
    shadow.setInput(new Glow(0.7));
    g.setEffect(shadow);
    e.setProperty(Property.ENABLE_GRAVITY, false);

    consApp.getTimerManager().runOnceAfter(() -> {
        consApp.soundManager.playSFX(FileNames.LIGHTNING_DRUM);
    }, Config.LIGHTNING_DELAY.divide(2));

    consApp.getSceneManager().addEntities(e);
}
 
開發者ID:AlmasB,項目名稱:Consume,代碼行數:34,代碼來源:ConsumeController.java

示例9: MenuButton

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public MenuButton(String name) {
    text = new Text(name);
    text.setFont(text.getFont().font(20));
    text.setFill(Color.WHITE);

    Rectangle bg = new Rectangle(250, 30);
    bg.setOpacity(0.6);
    bg.setFill(Color.BLACK);
    bg.setEffect(new GaussianBlur(3.5));

    setAlignment(Pos.CENTER_LEFT);
    setRotate(-0.5);
    getChildren().addAll(bg, text);

    setOnMouseEntered(event -> {
        bg.setTranslateX(10);
        text.setTranslateX(10);
        bg.setFill(Color.WHITE);
        text.setFill(Color.BLACK);
    });

    setOnMouseExited(event -> {
        bg.setTranslateX(0);
        text.setTranslateX(0);
        bg.setFill(Color.BLACK);
        text.setFill(Color.WHITE);
    });

    DropShadow drop = new DropShadow(50, Color.WHITE);
    drop.setInput(new Glow());

    setOnMousePressed(event -> setEffect(drop));
    setOnMouseReleased(event -> setEffect(null));
}
 
開發者ID:AlmasB,項目名稱:FXTutorials,代碼行數:35,代碼來源:GameMenuDemo.java

示例10: gaussianBlur

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private Node gaussianBlur() {
    Text t2 = new Text();
    t2.setX(10.0f);
    t2.setY(250.0f);
    t2.setCache(true);
    t2.setText("Gaussian Blur");
    t2.setFill(Color.RED);
    t2.setFont(Font.font("null", FontWeight.BOLD, 36));
    
    DropShadow shadow = new DropShadow();
    shadow.setOffsetY(3.0);
    shadow.setOffsetX(3.0);
    shadow.setColor(Color.GRAY);
    shadow.setInput(new GaussianBlur());
    
    Reflection rf = new Reflection();
    rf.setFraction(1.5);
    rf.setInput(shadow);
    
    t2.setEffect(rf);
    return t2;
}
 
開發者ID:SaiPradeepDandem,項目名稱:javafx-demos,代碼行數:23,代碼來源:BlurEffectDemo.java

示例11: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    size   = getSkinnable().getPrefWidth() < getSkinnable().getPrefHeight() ? getSkinnable().getPrefWidth() : getSkinnable().getPrefHeight();

    frame = new Circle(0.5 * size, 0.5 * size, 0.5 * size);
    frame.setStroke(null);
    frame.setVisible(getSkinnable().isFrameVisible());

    main = new Circle(0.5 * size, 0.5 * size, 0.36 * size);
    main.setStroke(null);

    innerShadow = new InnerShadow();
    innerShadow.setRadius(0.090 * main.getLayoutBounds().getWidth());
    innerShadow.setColor(Color.BLACK);
    innerShadow.setBlurType(BlurType.GAUSSIAN);
    innerShadow.setInput(null);

    glow = new DropShadow();
    glow.setRadius(0.45 * main.getLayoutBounds().getWidth());
    glow.setColor((Color) getSkinnable().getLedColor());
    glow.setBlurType(BlurType.GAUSSIAN);
    glow.setInput(innerShadow);

    highlight = new Circle(0.5 * size, 0.5 * size, 0.29 * size);
    highlight.setStroke(null);

    getChildren().setAll(frame, main, highlight);
}
 
開發者ID:HanSolo,項目名稱:JFX8CustomControls,代碼行數:28,代碼來源:LedSkin.java

示例12: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    dropShadow  = new DropShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), PREFERRED_WIDTH * 0.016, 0.0, 0, PREFERRED_WIDTH * 0.028);
    highlight   = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(255, 255, 255, 0.2), PREFERRED_WIDTH * 0.008, 0.0, 0, PREFERRED_WIDTH * 0.008);
    innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.2), PREFERRED_WIDTH * 0.008, 0.0, 0, -PREFERRED_WIDTH * 0.008);
    highlight.setInput(innerShadow);
    dropShadow.setInput(highlight);

    barArc = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.46, PREFERRED_HEIGHT * 0.46, BAR_START_ANGLE, 0);
    barArc.setType(ArcType.OPEN);
    barArc.setStrokeLineCap(StrokeLineCap.ROUND);
    barArc.setFill(null);
    barArc.setStroke(barColor.get());

    double center = PREFERRED_WIDTH * 0.5;
    ring = Shape.subtract(new Circle(center, center, PREFERRED_WIDTH * 0.42),
                          new Circle(center, center, PREFERRED_WIDTH * 0.3));
    ring.setFill(color.get());
    ring.setEffect(dropShadow);

    mainCircle = new Circle();
    mainCircle.setFill(color.get().darker().darker());

    text = new Text(String.format(Locale.US, formatString, getTargetValue()));
    text.setFill(Color.WHITE);
    text.setTextOrigin(VPos.CENTER);

    indicatorRotate = new Rotate(-ANGLE_RANGE *  0.5, center, center);

    indicatorGlow        = new DropShadow(BlurType.TWO_PASS_BOX, getIndicatorColor(), PREFERRED_WIDTH * 0.02, 0.0, 0, 0);
    indicatorInnerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.5), PREFERRED_WIDTH * 0.008, 0.0, 0, PREFERRED_WIDTH * 0.008);
    indicatorHighlight   = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(255, 255, 255, 0.35), PREFERRED_WIDTH * 0.008, 0.0, 0, -PREFERRED_WIDTH * 0.008);
    indicatorHighlight.setInput(indicatorInnerShadow);

    indicator = new Circle();
    indicator.setFill(color.get().darker());
    indicator.setStroke(color.get().darker().darker());
    indicator.setMouseTransparent(true);
    indicator.getTransforms().add(indicatorRotate);

    Group indicatorGroup = new Group(indicator);
    indicatorGroup.setEffect(indicatorHighlight);

    symbol = new Region();
    symbol.getStyleClass().setAll("symbol");
    symbol.setCacheHint(CacheHint.SPEED);

    icon = new FontIcon();
    icon.setTextOrigin(VPos.CENTER);

    iconPane = new StackPane(symbol, icon);

    pane = new Pane(barArc, ring, mainCircle, text, indicatorGroup, iconPane);
    pane.setPrefSize(PREFERRED_HEIGHT, PREFERRED_HEIGHT);
    pane.setBackground(new Background(new BackgroundFill(color.get().darker(), new CornerRadii(1024), Insets.EMPTY)));
    pane.setEffect(highlight);

    getChildren().setAll(pane);
}
 
開發者ID:HanSolo,項目名稱:regulators,代碼行數:59,代碼來源:Regulator.java

示例13: initGraphics

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
private void initGraphics() {
    dropShadow  = new DropShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.65), PREFERRED_WIDTH * 0.016, 0.0, 0, PREFERRED_WIDTH * 0.028);
    highlight   = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(255, 255, 255, 0.2), PREFERRED_WIDTH * 0.008, 0.0, 0, PREFERRED_WIDTH * 0.008);
    innerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.2), PREFERRED_WIDTH * 0.008, 0.0, 0, -PREFERRED_WIDTH * 0.008);
    highlight.setInput(innerShadow);
    dropShadow.setInput(highlight);

    Stop[] stops = {
        new Stop(0.0, Color.rgb(135, 255, 190)),
        new Stop(0.125, Color.rgb(254, 190, 106)),
        new Stop(0.389, Color.rgb(252, 84, 68)),
        new Stop(0.611, Color.rgb(99, 195, 255)),
        new Stop(1.0, Color.rgb(125, 255, 190))
    };

    barGradient = new ConicalGradient(stops);

    barArc = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.46, PREFERRED_HEIGHT * 0.46, BAR_START_ANGLE, 0);
    barArc.setType(ArcType.OPEN);
    barArc.setStrokeLineCap(StrokeLineCap.ROUND);
    barArc.setFill(null);
    barArc.setStroke(barGradient.getImagePattern(new Rectangle(0, 0, PREFERRED_WIDTH, PREFERRED_HEIGHT)));

    overlayBarArc = new Arc(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.46, PREFERRED_HEIGHT * 0.46, BAR_START_ANGLE, 0);
    overlayBarArc.setType(ArcType.OPEN);
    overlayBarArc.setStrokeLineCap(StrokeLineCap.ROUND);
    overlayBarArc.setFill(null);
    overlayBarArc.setStroke(Color.rgb(0, 0, 0, 0.3));
    overlayBarArc.setVisible((int) targetValue.get() != (int) currentValue.get());

    double center = PREFERRED_WIDTH * 0.5;
    ring = Shape.subtract(new Circle(center, center, PREFERRED_WIDTH * 0.42),
                          new Circle(center, center, PREFERRED_WIDTH * 0.3));
    ring.setFill(color.get());
    ring.setEffect(dropShadow);

    mainCircle = new Circle();
    mainCircle.setFill(color.get().darker().darker());

    text = new Text(String.format(Locale.US, formatString, currentValue.get()));
    text.setFill(textColor.get());
    text.setTextOrigin(VPos.CENTER);

    targetText = new Text(String.format(Locale.US, formatString, targetValue.get()));
    targetText.setFill(textColor.get().darker());
    targetText.setTextOrigin(VPos.CENTER);
    targetText.setVisible((int) targetValue.get() != (int) currentValue.get());

    indicatorRotate = new Rotate(-ANGLE_RANGE *  0.5, center, center);

    indicatorGlow        = new DropShadow(BlurType.TWO_PASS_BOX, getIndicatorColor(), PREFERRED_WIDTH * 0.02, 0.0, 0, 0);
    indicatorInnerShadow = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(0, 0, 0, 0.5), PREFERRED_WIDTH * 0.008, 0.0, 0, PREFERRED_WIDTH * 0.008);
    indicatorHighlight   = new InnerShadow(BlurType.TWO_PASS_BOX, Color.rgb(255, 255, 255, 0.35), PREFERRED_WIDTH * 0.008, 0.0, 0, -PREFERRED_WIDTH * 0.008);
    indicatorHighlight.setInput(indicatorInnerShadow);

    indicator = new Circle();
    indicator.setFill(color.get().darker());
    indicator.setStroke(color.get().darker().darker());
    indicator.setMouseTransparent(true);
    indicator.getTransforms().add(indicatorRotate);

    Group indicatorGroup = new Group(indicator);
    indicatorGroup.setEffect(indicatorHighlight);

    symbol = new Region();
    symbol.getStyleClass().setAll("symbol");
    symbol.setCacheHint(CacheHint.SPEED);

    icon = new FontIcon();
    icon.setTextOrigin(VPos.CENTER);

    iconPane = new StackPane(symbol, icon);

    pane = new Pane(barArc, overlayBarArc, ring, mainCircle, text, targetText, indicatorGroup, iconPane);
    pane.setPrefSize(PREFERRED_HEIGHT, PREFERRED_HEIGHT);
    pane.setBackground(new Background(new BackgroundFill(color.get().darker(), new CornerRadii(1024), Insets.EMPTY)));
    pane.setEffect(highlight);

    getChildren().setAll(pane);
}
 
開發者ID:HanSolo,項目名稱:regulators,代碼行數:81,代碼來源:FeedbackRegulator.java

示例14: setFill

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public void setFill(Color color) {
    innerBar.setFill(color);
    DropShadow ds = new DropShadow(15, color);
    ds.setInput(new Glow(0.5));
    innerBar.setEffect(ds);
}
 
開發者ID:AlmasB,項目名稱:FXGL,代碼行數:7,代碼來源:ProgressBar.java

示例15: QuarterCircle

import javafx.scene.effect.DropShadow; //導入方法依賴的package包/類
public QuarterCircle(String name) {
    Circle circle = new Circle(50);
    circle.setFill(null);
    circle.setStroke(Color.BLACK);
    circle.setStrokeWidth(30);

    Rectangle rect = new Rectangle(200, 100);
    rect.setTranslateX(-100);

    shape = Shape.subtract(circle, rect);

    rect = new Rectangle(100, 100);
    rect.setTranslateY(-100);

    shape = Shape.subtract(shape, rect);
    shape.setRotate(45);
    shape.setStroke(Color.BLACK);

    text = new Text(name);
    text.setFill(Color.WHITE);

    setOpacity(0.6);

    getChildren().addAll(shape, text);

    LinearGradient gradient = new LinearGradient(1, 1, 0.2, 0.2, true, CycleMethod.NO_CYCLE, new Stop[] {
            new Stop(0.3, Color.GOLD),
            new Stop(0.9, Color.BLACK)
    });

    DropShadow shadow = new DropShadow(5, Color.WHITE);
    shadow.setInput(new Glow(0.8));

    setOnMouseEntered(event -> {
        setOpacity(0.9);
        shape.setFill(gradient);
        text.setFont(Font.font("", FontPosture.ITALIC, 12));
        text.setEffect(shadow);
    });
    setOnMouseExited(event -> {
        setOpacity(0.6);
        shape.setFill(Color.BLACK);
        text.setFont(Font.getDefault());
        text.setEffect(null);
    });
}
 
開發者ID:AlmasB,項目名稱:FXTutorials,代碼行數:47,代碼來源:Main.java


注:本文中的javafx.scene.effect.DropShadow.setInput方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。