当前位置: 首页>>代码示例>>Java>>正文


Java GaussianBlur.radiusProperty方法代码示例

本文整理汇总了Java中javafx.scene.effect.GaussianBlur.radiusProperty方法的典型用法代码示例。如果您正苦于以下问题:Java GaussianBlur.radiusProperty方法的具体用法?Java GaussianBlur.radiusProperty怎么用?Java GaussianBlur.radiusProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.effect.GaussianBlur的用法示例。


在下文中一共展示了GaussianBlur.radiusProperty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeEffect

import javafx.scene.effect.GaussianBlur; //导入方法依赖的package包/类
private void removeEffect(Node node, int duration) {
    if (node != null) {
        node.setMouseTransparent(false);
        removeEffectTimeLine = new Timeline();
        GaussianBlur blur = (GaussianBlur) node.getEffect();
        if (blur != null) {
            KeyValue kv1 = new KeyValue(blur.radiusProperty(), 0.0);
            KeyFrame kf1 = new KeyFrame(Duration.millis(getDuration(duration)), kv1);
            removeEffectTimeLine.getKeyFrames().add(kf1);

            ColorAdjust darken = (ColorAdjust) blur.getInput();
            KeyValue kv2 = new KeyValue(darken.brightnessProperty(), 0.0);
            KeyFrame kf2 = new KeyFrame(Duration.millis(getDuration(duration)), kv2);
            removeEffectTimeLine.getKeyFrames().add(kf2);
            removeEffectTimeLine.setOnFinished(actionEvent -> {
                node.setEffect(null);
                removeEffectTimeLine = null;
            });
            removeEffectTimeLine.play();
        } else {
            node.setEffect(null);
            removeEffectTimeLine = null;
        }
    }
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:26,代码来源:Transitions.java

示例2: blurOut

import javafx.scene.effect.GaussianBlur; //导入方法依赖的package包/类
public static void blurOut(Node node) {
    GaussianBlur blur = new GaussianBlur(0.0);
    node.setEffect(blur);
    Timeline timeline = new Timeline();
    KeyValue kv = new KeyValue(blur.radiusProperty(), 10.0);
    KeyFrame kf = new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC), kv);
    timeline.getKeyFrames().add(kf);
    timeline.play();
}
 
开发者ID:creativechain,项目名称:creacoinj,代码行数:10,代码来源:GuiUtils.java

示例3: blurIn

import javafx.scene.effect.GaussianBlur; //导入方法依赖的package包/类
public static void blurIn(Node node) {
    GaussianBlur blur = (GaussianBlur) node.getEffect();
    Timeline timeline = new Timeline();
    KeyValue kv = new KeyValue(blur.radiusProperty(), 0.0);
    KeyFrame kf = new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC), kv);
    timeline.getKeyFrames().add(kf);
    timeline.setOnFinished(actionEvent -> node.setEffect(null));
    timeline.play();
}
 
开发者ID:creativechain,项目名称:creacoinj,代码行数:10,代码来源:GuiUtils.java

示例4: blurOut

import javafx.scene.effect.GaussianBlur; //导入方法依赖的package包/类
public static void blurOut (Node node) {
    GaussianBlur blur = new GaussianBlur(0.0);
    node.setEffect(blur);
    Timeline timeline = new Timeline();
    KeyValue kv = new KeyValue(blur.radiusProperty(), 10.0);
    KeyFrame kf = new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC), kv);
    timeline.getKeyFrames().add(kf);
    timeline.play();
}
 
开发者ID:blockchain,项目名称:thunder,代码行数:10,代码来源:GuiUtils.java

示例5: blurIn

import javafx.scene.effect.GaussianBlur; //导入方法依赖的package包/类
public static void blurIn (Node node) {
    GaussianBlur blur = (GaussianBlur) node.getEffect();
    Timeline timeline = new Timeline();
    KeyValue kv = new KeyValue(blur.radiusProperty(), 0.0);
    KeyFrame kf = new KeyFrame(Duration.millis(UI_ANIMATION_TIME_MSEC), kv);
    timeline.getKeyFrames().add(kf);
    timeline.setOnFinished(actionEvent -> node.setEffect(null));
    timeline.play();
}
 
开发者ID:blockchain,项目名称:thunder,代码行数:10,代码来源:GuiUtils.java

示例6: start

import javafx.scene.effect.GaussianBlur; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    EntryPoint.unlockApplication();
    EntryPoint.primaryStage = primaryStage;

    try {
        root = new StackPane();
        mainWindow = MainWindow.getInstance();
        root.getChildren().add(mainWindow);
        modalOverlay = new StackPane();
        root.getChildren().add(modalOverlay);

        // disable the main window as long as there are modal dialogs opened
        mainWindow.disableProperty().bind(
                Bindings.size(modalOverlay.getChildren()).greaterThan(0));

        // hide the modalOverlay as long it is empty
        modalOverlay.visibleProperty().bind(
                Bindings.size(modalOverlay.getChildren()).greaterThan(0));

        Scene scene = new Scene(root);
        primaryStage.setScene(scene);

        /* Available icon sizes: 1024, 512, 256, 128, 96, 64, 48, 32, 24, 16 */
        int[] iconSizes = { 1024 };

        /* Set the icon set */
        for (int iconSize : iconSizes) {
            primaryStage.getIcons().add(
                    new Image(this.getClass().getResourceAsStream(
                            "/ui/icon/icon-" + iconSize + ".png")));
        }

        primaryStage.minWidthProperty().bind(mainWindow.minWidthProperty());
        primaryStage.minHeightProperty().bind(
                mainWindow.minHeightProperty());

        /*
         * Catch the close event and display a warning if there is unsaved
         * data left
         */
        Platform.setImplicitExit(false);
        primaryStage.setOnCloseRequest(event -> {
            event.consume();
            // suppress the close request when the application is locked
                if (applicationLocked) {
                    return;
                }
                UndoManager undoManager = MainWindow.getInstance()
                        .getEventPhaseViewController().getUndoManager();
                if (undoManager != null
                        && !EntryPoint.this.closeRequested
                        && MainWindow.getInstance()
                                .getEventPhaseViewController()
                                .hasLoadedEvent()) {
                    this.requestSaveBeforeClose();
                } else {
                    EntryPoint.this.closeRequested = false;
                    primaryStage.close();
                    Platform.exit();
                }
            });

        backgroundBlur = new GaussianBlur(0);

        blurTransition = new Timeline(new KeyFrame(Duration.ZERO,
                new KeyValue(backgroundBlur.radiusProperty(), 0)),
                new KeyFrame(Duration.millis(300), new KeyValue(
                        backgroundBlur.radiusProperty(), 10)));

        mainWindow.setEffect(backgroundBlur);

        primaryStage.show();
        SplashScreen.hide();
    } catch (Exception e) {
        log.log(Level.SEVERE, e.getMessage(), e);
        System.exit(1);
    }
}
 
开发者ID:Novanoid,项目名称:Tourney,代码行数:80,代码来源:EntryPoint.java


注:本文中的javafx.scene.effect.GaussianBlur.radiusProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。