本文整理汇总了Java中javafx.scene.effect.BoxBlur.setIterations方法的典型用法代码示例。如果您正苦于以下问题:Java BoxBlur.setIterations方法的具体用法?Java BoxBlur.setIterations怎么用?Java BoxBlur.setIterations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.effect.BoxBlur
的用法示例。
在下文中一共展示了BoxBlur.setIterations方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: boxBlur
import javafx.scene.effect.BoxBlur; //导入方法依赖的package包/类
private Node boxBlur() {
Text t = new Text();
t.setText("Blurry Text!");
t.setFill(Color.RED);
t.setFont(Font.font("null", FontWeight.BOLD, 36));
t.setX(10);
t.setY(40);
BoxBlur bb = new BoxBlur();
bb.setWidth(5);
bb.setHeight(5);
bb.setIterations(3);
t.setEffect(bb);
//t.setTranslateX(300);
//t.setTranslateY(100);
return t;
}
示例2: createViewer
import javafx.scene.effect.BoxBlur; //导入方法依赖的package包/类
private static Group createViewer(final MediaPlayer player, final double scale, boolean blur) {
Group mediaGroup = new Group();
final MediaView mediaView = new MediaView(player);
if (blur) {
BoxBlur bb = new BoxBlur();
bb.setWidth(4);
bb.setHeight(4);
bb.setIterations(1);
mediaView.setEffect(bb);
}
double width = player.getMedia().getWidth();
double height = player.getMedia().getHeight();
mediaView.setFitWidth(width);
mediaView.setTranslateX(-width/2.0);
mediaView.setScaleX(-scale);
mediaView.setFitHeight(height);
mediaView.setTranslateY(-height/2.0);
mediaView.setScaleY(scale);
mediaView.setDepthTest(DepthTest.ENABLE);
mediaGroup.getChildren().add(mediaView);
return mediaGroup;
}
示例3: displayOverlay
import javafx.scene.effect.BoxBlur; //导入方法依赖的package包/类
private void displayOverlay()
{
BoxBlur bb = new BoxBlur();
bb.setWidth(5);
bb.setHeight(5);
bb.setIterations(1);
scene.lookup("#main").setEffect(bb);
scene.lookup("#overlay").setStyle("visibility: visible");
}
示例4: BlurPane
import javafx.scene.effect.BoxBlur; //导入方法依赖的package包/类
public BlurPane() {
imageView = new ImageView();
imageView.setFocusTraversable(false);
BoxBlur bb = new BoxBlur();
bb.setWidth(8);
bb.setHeight(8);
bb.setIterations(3);
imageView.setEffect(bb);
}
示例5: setDragEffect
import javafx.scene.effect.BoxBlur; //导入方法依赖的package包/类
/**
* Setzt den Effekt, der zur Visualisierung eingesetzt wird, wenn ein Objekt
* über dem DropTarget ist.
*
* @param node
* Knoten im Scene Graph, auf den der Effekt angewendet wird.
*/
private static void setDragEffect(final Node node) {
node.setOpacity(DRAG_EFFECT_OPACITY_DURING_DRAG);
// Blur-Effekt kann im Moment noch nicht in FX-CSS angegeben werden
final BoxBlur bb = new BoxBlur();
bb.setWidth(DRAG_EFFECT_WIDTH);
bb.setHeight(DRAG_EFFECT_HEIGHT);
bb.setIterations(DRAG_EFFECT_ITERATIONS);
node.setEffect(bb);
}
示例6: blurOn
import javafx.scene.effect.BoxBlur; //导入方法依赖的package包/类
/**
* Blurs the main frame of the GUI (it's AnchorPane).
*/
public void blurOn(){
AnchorPane mainScreen = Tokanagrammar.getAnchorPane();
ObservableList<Node> screenComponents = mainScreen.getChildren();
BoxBlur bb = new BoxBlur();
bb.setIterations(3);
for(Node node: screenComponents)
node.effectProperty().set(bb);
}