當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。