aboutsummaryrefslogtreecommitdiff
path: root/src/main/Block.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/Block.java')
-rw-r--r--src/main/Block.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/Block.java b/src/main/Block.java
new file mode 100644
index 0000000..8f8267f
--- /dev/null
+++ b/src/main/Block.java
@@ -0,0 +1,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);
+ }
+} \ No newline at end of file