< prev index next >

functional/SceneGraphTests/src/test/scenegraph/lcd/transparency/Factories.java

Print this page

        

@@ -24,39 +24,32 @@
 package test.scenegraph.lcd.transparency;
 
 
 import javafx.scene.Node;
 import javafx.scene.layout.StackPane;
-import javafx.scene.layout.StackPaneBuilder;
 import javafx.scene.paint.Color;
-import javafx.scene.shape.RectangleBuilder;
+import javafx.scene.shape.Rectangle;
 import javafx.scene.text.FontSmoothingType;
-import javafx.scene.text.TextBuilder;
+import javafx.scene.text.Text;
 
 /**
  *
  * @author Alexander Petrov
  */
-public enum Factories implements Factory{
+public enum Factories implements Factory {
 
 
     TransparentPixel(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -64,22 +57,16 @@
     }),
     TransparentBackground(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -87,22 +74,16 @@
     }),
     TranslucentPixel(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -110,22 +91,16 @@
     }),
     Translucent01Pixel(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -133,22 +108,16 @@
     }),
     Translucent09Pixel(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -156,22 +125,16 @@
     }),
     TransparentRectangle(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -179,22 +142,16 @@
     }),
     TranslucentRectangle(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -202,22 +159,16 @@
     }),
     Translucent01Rectangle(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -225,22 +176,16 @@
     }),
     Translucent09Rectangle(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return false;

@@ -248,23 +193,16 @@
     }),
     TranslucentPixelBeforeText(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build(),
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build()
-                    );
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(r, t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -272,22 +210,16 @@
     }),
     Translucent01PixelBeforeText(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build(),
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(r, t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -295,22 +227,16 @@
     }),
     Translucent09PixelBeforeText(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build(),
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(r, t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -318,22 +244,16 @@
     }),
     TransparentRectangleBeforeText(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    RectangleBuilder.create()
-                        .opacity(0)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build(),
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(r, t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -341,22 +261,16 @@
     }),
     TranslucentRectangleBeforeText(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build(),
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(r, t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -364,22 +278,16 @@
     }),
     Translucent01RectangleBeforeText(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build(),
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(r, t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;

@@ -387,22 +295,16 @@
     }),
     Translucent09RectangleBeforeText(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build(),
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(r, t);
             return value;
         }
 
         public boolean isLCDWork() {
             return false;

@@ -410,218 +312,177 @@
     }),
     TranslucentBackground(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build(),
-                    RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            value.getChildren().addAll(t, r);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
     }),
     TranslucentPane(new EmptyActionFactory() {
 
         public Node createNode(boolean lcd) {
-            return StackPaneBuilder.create()
-                    .opacity(0.5)
-                    .children(TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build())
-                    .build();
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            StackPane temp = new StackPane(t);
+            temp.setOpacity(0.5);
+            return temp;
         }
 
         public boolean isLCDWork() {
             return false;
         }
     }),
     AddTranslucentPixel(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
 
         }
     }),
     AddTranslucent01Pixel(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
         }
     }),
     AddTranslucent09Pixel(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
         }
     }),
     AddTransparentRectangle(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(RectangleBuilder.create()
-                        .opacity(0)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
         }
     }),
     AddTranslucentRectangle(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
         }
     }),
     AddTranslucent01Rectangle(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
         }
     }),
     AddTranslucent09Rectangle(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         boolean value = true;
 

@@ -629,192 +490,157 @@
             return value;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
             value = false;
         }
     }),
     AddTranslucentPixelBeforeText(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(0, RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(0, r);
 
         }
     }),
     AddTranslucent01PixelBeforeText(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(0, RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(0, r);
         }
     }),
     AddTranslucent09PixelBeforeText(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(0, RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(1)
-                        .width(1)
-                        .build());
+            Rectangle r = new Rectangle(1, 1);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(0, r);
         }
     }),
     AddTransparentRectangleBeforeText(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(0, RectangleBuilder.create()
-                        .opacity(0)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(0, r);
         }
     }),
     AddTranslucentRectangleBeforeText(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(0, RectangleBuilder.create()
-                        .opacity(0.5)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.5);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(0, r);
         }
     }),
     AddTranslucent01RectangleBeforeText(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         public boolean isLCDWork() {
             return true;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(0, RectangleBuilder.create()
-                        .opacity(0.000001d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.000001d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(0, r);
         }
     }),
     AddTranslucent09RectangleBeforeText(new Factory() {
 
         public Node createNode(boolean lcd) {
             StackPane value = new StackPane();
-
-            value.getChildren().addAll(
-                    TextBuilder.create()
-                        .text("Test")
-                        .fontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY)
-                        .build());
+            Text t = new Text("Test");
+            t.setFontSmoothingType(lcd?FontSmoothingType.LCD:FontSmoothingType.GRAY);
+            value.getChildren().addAll(t);
             return value;
         }
 
         boolean value = true;
 

@@ -822,16 +648,14 @@
             return value;
         }
 
         public void action(Node node) {
             StackPane pane = (StackPane) node;
-            pane.getChildren().add(0, RectangleBuilder.create()
-                        .opacity(0.9999999d)
-                        .fill(Color.BLACK)
-                        .height(100)
-                        .width(100)
-                        .build());
+            Rectangle r = new Rectangle(100, 100);
+            r.setOpacity(0.9999999d);
+            r.setFill(Color.BLACK);
+            pane.getChildren().add(r);
             value = false;
         }
     });
 
 
< prev index next >