1 /* 2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 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 */ 24 package test.scenegraph.app; 25 26 import javafx.application.Application; 27 import javafx.event.ActionEvent; 28 import javafx.event.EventHandler; 29 import javafx.geometry.Orientation; 30 import javafx.scene.PerspectiveCamera; 31 import javafx.scene.Scene; 32 import javafx.scene.control.Button; 33 import javafx.scene.layout.FlowPane; 34 import javafx.scene.layout.HBox; 35 import javafx.scene.layout.StackPane; 36 import javafx.scene.shape.Circle; 37 import javafx.scene.shape.CircleBuilder; 38 import javafx.stage.Stage; 39 import test.javaclient.shared.InteroperabilityApp; 40 import test.javaclient.shared.Utils; 41 42 /** 43 * 44 * @author asakharu 45 */ 46 public class LocalTo_TransformsApp extends InteroperabilityApp { 47 48 public static void main(String[] args) { 49 Utils.launch(LocalTo_TransformsApp.class, args); 50 } 51 52 @Override 53 protected Scene getScene() { 54 return new LocalTo_TransformsScene(); 55 } 56 57 public class LocalTo_TransformsScene extends Scene 58 { 59 60 public LocalTo_TransformsScene() 61 { 62 super(hBox, 150, 150, true); 63 setCamera(new PerspectiveCamera()); 64 65 StackPane firstPane = new StackPane(); 66 StackPane secondPane = new StackPane(); 67 StackPane thirdPane = new StackPane(); 68 StackPane nestedPane = new StackPane(); 69 StackPane doubleNestedPane = new StackPane(); 70 StackPane forthPane = new StackPane(); 71 72 Circle circle1 = CircleBuilder.create().radius(20).id("circle_one").build(); 73 Circle circle2 = CircleBuilder.create().radius(20).id("circle_two").build(); 74 Circle circle3 = CircleBuilder.create().radius(20).id("circle_three").build(); 75 Circle circle4 = CircleBuilder.create().radius(20).id("circle_four").translateZ(-50).build(); 76 77 forthPane.getChildren().add(circle4); 78 doubleNestedPane.getChildren().add(circle3); 79 nestedPane.getChildren().add(doubleNestedPane); 80 thirdPane.getChildren().add(nestedPane); 81 secondPane.getChildren().add(circle2); 82 firstPane.getChildren().add(circle1); 83 hBox.getChildren().addAll(firstPane, secondPane, thirdPane, forthPane); 84 } 85 86 } 87 88 private FlowPane hBox = new FlowPane(Orientation.HORIZONTAL, 50, 50); 89 90 }