aboutsummaryrefslogtreecommitdiff
path: root/src/main/Block.java
blob: 8f8267f532b3305c7ef1a2e59d529ae1f8abe39a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//glowing block of color c (jfx node)

package main;

import javafx.scene.effect.BlurType;
import javafx.scene.effect.DropShadow;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;

public class Block extends Rectangle
{
    public Block(Color c)
    {
        super();
        DropShadow dropShadow = new DropShadow();
        dropShadow.setRadius(200.0);
        dropShadow.setColor(c);
        dropShadow.setBlurType(BlurType.GAUSSIAN);
       
        super.setFill(c);
        super.setWidth(200);
        super.setHeight(100);
        super.setArcHeight(25);
        super.setArcWidth(25);
        super.setEffect(dropShadow);
    }
}