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.stage.Stage;
  38 import test.javaclient.shared.InteroperabilityApp;
  39 import test.javaclient.shared.Utils;
  40 
  41 /**
  42  *
  43  * @author asakharu
  44  */
  45 public class LocalTo_TransformsApp extends InteroperabilityApp {
  46 
  47     public static void main(String[] args) {
  48         Utils.launch(LocalTo_TransformsApp.class, args);
  49     }
  50 
  51     @Override
  52     protected Scene getScene() {
  53         return new LocalTo_TransformsScene();
  54     }
  55 
  56     public class LocalTo_TransformsScene extends Scene
  57     {
  58 
  59         public LocalTo_TransformsScene()
  60         {
  61             super(hBox, 150, 150, true);
  62             setCamera(new PerspectiveCamera());
  63 
  64             StackPane firstPane = new StackPane();
  65             StackPane secondPane = new StackPane();
  66             StackPane thirdPane = new StackPane();
  67             StackPane nestedPane = new StackPane();
  68             StackPane doubleNestedPane = new StackPane();
  69             StackPane forthPane = new StackPane();
  70 
  71             Circle circle1 = new Circle(20);
  72             circle1.setId("circle_one");
  73             Circle circle2 = new Circle(20);
  74             circle2.setId("circle_two");
  75             Circle circle3 = new Circle(20);
  76             circle3.setId("circle_three");
  77             Circle circle4 = new Circle(20);
  78             circle4.setId("circle_four");
  79             circle4.setTranslateZ(-50);
  80 
  81             forthPane.getChildren().add(circle4);
  82             doubleNestedPane.getChildren().add(circle3);
  83             nestedPane.getChildren().add(doubleNestedPane);
  84             thirdPane.getChildren().add(nestedPane);
  85             secondPane.getChildren().add(circle2);
  86             firstPane.getChildren().add(circle1);
  87             hBox.getChildren().addAll(firstPane, secondPane, thirdPane, forthPane);
  88         }
  89 
  90     }
  91 
  92     private FlowPane hBox = new FlowPane(Orientation.HORIZONTAL, 50, 50);
  93 
  94 }