本文整理匯總了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;
}
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}