Worldwind public release 0.2
[worldwind-tracker.git] / gov / nasa / worldwind / WorldWindowImpl.java
blob6fd63eec30feadc05923de7c1f93b2a5da4d3f4c
1 /*
2 Copyright (C) 2001, 2006 United States Government
3 as represented by the Administrator of the
4 National Aeronautics and Space Administration.
5 All Rights Reserved.
6 */
7 package gov.nasa.worldwind;
9 /**
10 * An implementation class for the {@link WorldWindow} interface. Classes implementing <code>WorldWindow</code> can
11 * subclass or aggreate this object to provide default <code>WorldWindow</code> functionality.
13 * @author Tom Gaskins
14 * @version $Id: WorldWindowImpl.java 1764 2007-05-07 20:01:57Z tgaskins $
16 public class WorldWindowImpl extends WWObjectImpl
18 SceneController sceneController;
20 public WorldWindowImpl()
22 // TODO: Determine this setup layout from configuration information
24 this.sceneController = (SceneController) WorldWind.createConfigurationComponent(
25 AVKey.SCENE_CONTROLLER_CLASS_NAME);
28 public void setModel(Model model)
30 // model can be null, that's ok - it indicates no model.
31 if (this.sceneController != null)
32 this.sceneController.setModel(model);
35 public gov.nasa.worldwind.Model getModel()
37 return this.sceneController != null ? this.sceneController.getModel() : null;
40 public void setView(gov.nasa.worldwind.View view)
42 // view can be null, that's ok - it indicates no view.
43 if (this.sceneController != null)
44 this.sceneController.setView(view);
47 public View getView()
49 return this.sceneController != null ? this.sceneController.getView() : null;
52 public void setModelAndView(Model model, View view)
54 this.setModel(model);
55 this.setView(view);
58 public SceneController getSceneController()
60 return this.sceneController;