/*
 * Copyright 2015 Esri. Licensed under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
 * or agreed to in writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

package com.esri.samples.scene.display_scene;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

import com.esri.arcgisruntime.mapping.ArcGISScene;
import com.esri.arcgisruntime.mapping.ArcGISTiledElevationSource;
import com.esri.arcgisruntime.mapping.Basemap;
import com.esri.arcgisruntime.mapping.Surface;
import com.esri.arcgisruntime.mapping.view.Camera;
import com.esri.arcgisruntime.mapping.view.SceneView;

public class DisplaySceneSample extends Application {

  private SceneView sceneView;
  private static final String ELEVATION_IMAGE_SERVICE =
      "http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer";

  @Override
  public void start(Stage stage) throws Exception {

    try {

      // create stack pane and JavaFX app scene
      StackPane stackPane = new StackPane();
      Scene fxScene = new Scene(stackPane);

      // set title, size, and add JavaFX scene to stage
      stage.setTitle("Display a Scene Sample");
      stage.setWidth(800);
      stage.setHeight(700);
      stage.setScene(fxScene);
      stage.show();

      // create a scene and add a basemap to it
      ArcGISScene scene = new ArcGISScene();
      scene.setBasemap(Basemap.createImagery());

      // add the SceneView to the stack pane
      sceneView = new SceneView();
      sceneView.setArcGISScene(scene);
      stackPane.getChildren().addAll(sceneView);

      // add base surface for elevation data
      Surface surface = new Surface();
      //      surface.setElevationExaggeration(2);
      surface.getElevationSources().add(new ArcGISTiledElevationSource(ELEVATION_IMAGE_SERVICE));
      scene.setBaseSurface(surface);
      surface.setElevationExaggeration(2);

      // add a camera and initial camera position
      Camera camera = new Camera(28.4, 83.9, 10010.0, 10.0, 80.0, 300.0);
      sceneView.setViewpointCamera(camera);
    } catch (Exception e) {
      // on any error, display the stack trace.
      e.printStackTrace();
    }
  }

  /**
   * Stops and releases all resources used in application.
   */
  @Override
  public void stop() {

    if (sceneView != null) {
      sceneView.dispose();
    }
  }

  /**
   * Opens and runs application.
   *
   * @param args arguments passed to this application
   */
  public static void main(String[] args) {

    Application.launch(args);
  }

}

@@ -16,15 +16,22 @@
  201
-5
+6
  Esri.
+%0A * %0A *
  Lic
@@ -78,19 +78,16 @@
 2.0 (the
-%0A *
  %22Licens
@@ -102,16 +102,19 @@
  may not
+%0A *
  use thi
@@ -158,19 +158,16 @@
 License.
-%0A *
  You may
@@ -183,16 +183,19 @@
  copy of
+%0A *
  the Lic
@@ -202,16 +202,20 @@
 ense at%0A
+ * %0A
  * http:
@@ -251,16 +251,23 @@
 ENSE-2.0
+%0A * %0A *
  Unless 
@@ -292,19 +292,16 @@
 able law
-%0A *
  or agre
@@ -326,16 +326,19 @@
 software
+%0A *
  distrib
@@ -362,19 +362,16 @@
 cense is
-%0A *
  distrib
@@ -403,16 +403,19 @@
  WITHOUT
+%0A *
  WARRANT
@@ -438,19 +438,16 @@
 S OF ANY
-%0A *
  KIND, e
@@ -475,24 +475,27 @@
 ied. See the
+%0A *
  License for
@@ -516,19 +516,16 @@
 language
-%0A *
  governi
@@ -556,24 +556,27 @@
 ations under
+%0A *
  the License
@@ -616,22 +616,8 @@
 cene
-.display_scene
 ;%0A%0Ai
@@ -1089,22 +1089,16 @@
 layScene
-Sample
  extends
@@ -1606,20 +1606,13 @@
 y a 
-S
+s
 cene
- Sample
 %22);%0A
@@ -2118,59 +2118,8 @@
 ();%0A
-      //      surface.setElevationExaggeration(2);%0A
     
@@ -2252,51 +2252,8 @@
 ce);
-%0A      surface.setElevationExaggeration(2);
 %0A%0A  

Update DisplaySceneSample.java