8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javafx.scene;
27
28 import com.sun.javafx.pgstub.StubToolkit;
29 import com.sun.javafx.sg.prism.NGGroup;
30 import com.sun.javafx.tk.Toolkit;
31 import javafx.scene.shape.Rectangle;
32 import javafx.stage.Stage;
33 import org.junit.Before;
34 import org.junit.Test;
35
36 import static org.junit.Assert.*;
37
38 /**
39 * Tests to make sure the synchronization of children between a Parent and PGGroup
40 * works as expected.
41 */
42 public class Parent_structure_sync_Test {
43 private Rectangle r1, r2, r3, r4, r5;
44 private Parent parent;
45 private NGGroup peer;
46
47 @Before public void setup() {
48 parent = new Group();
49 r1 = new Rectangle(0, 0, 10, 10);
50 r2 = new Rectangle(0, 0, 10, 10);
51 r3 = new Rectangle(0, 0, 10, 10);
52 r4 = new Rectangle(0, 0, 10, 10);
53 r5 = new Rectangle(0, 0, 10, 10);
54 peer = parent.impl_getPeer();
55
56 Scene scene = new Scene(parent);
57 Stage stage = new Stage();
58 stage.setScene(scene);
59 stage.show();
60
61 sync();
62 }
|
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javafx.scene;
27
28 import com.sun.javafx.FXUnit;
29 import com.sun.javafx.pgstub.StubToolkit;
30 import com.sun.javafx.sg.prism.NGGroup;
31 import com.sun.javafx.tk.Toolkit;
32 import javafx.scene.shape.Rectangle;
33 import javafx.stage.Stage;
34 import org.junit.Before;
35 import org.junit.Rule;
36 import org.junit.Test;
37
38 import static org.junit.Assert.*;
39
40 /**
41 * Tests to make sure the synchronization of children between a Parent and PGGroup
42 * works as expected.
43 */
44 public class Parent_structure_sync_Test {
45
46 @Rule
47 public FXUnit fx = new FXUnit();
48
49 private Rectangle r1, r2, r3, r4, r5;
50 private Parent parent;
51 private NGGroup peer;
52
53 @Before public void setup() {
54 parent = new Group();
55 r1 = new Rectangle(0, 0, 10, 10);
56 r2 = new Rectangle(0, 0, 10, 10);
57 r3 = new Rectangle(0, 0, 10, 10);
58 r4 = new Rectangle(0, 0, 10, 10);
59 r5 = new Rectangle(0, 0, 10, 10);
60 peer = parent.impl_getPeer();
61
62 Scene scene = new Scene(parent);
63 Stage stage = new Stage();
64 stage.setScene(scene);
65 stage.show();
66
67 sync();
68 }
|