Java Code Examples for javafx.scene.effect.BoxBlur#setWidth()

The following examples show how to use javafx.scene.effect.BoxBlur#setWidth() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BuildEntry_Controller.java    From Path-of-Leveling with MIT License 5 votes vote down vote up
public void initDisabledBuild(){
    isDisabledInLauncher = true;
    BoxBlur b = new BoxBlur();
    b.setWidth(5.0);
    b.setHeight(5.0);
    b.setIterations(1);
    Blend bl = new Blend();
    bl.setMode(BlendMode.SRC_OVER);
    bl.setOpacity(1.0);
    bl.setTopInput(b);
    disabledPanel.setEffect(b);
    //disabledPanel.setVisible(true);
    nonValidPanel.setVisible(true);
}
 
Example 2
Source File: AlphaMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 3
Source File: AlphaMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
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;
}