Package org.geoforge.worldwind.multiwindow.gfrsynchro

Source Code of org.geoforge.worldwind.multiwindow.gfrsynchro.GfrWWPanel

/*
*  Copyright (C) 2011-2014 GeoForge Project
*
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU Lesser General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU Lesser General Public License for more details.
*
*  You should have received a copy of the GNU Lesser General Public License
*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package org.geoforge.worldwind.multiwindow.gfrsynchro;

import gov.nasa.worldwind.Model;
import gov.nasa.worldwind.awt.WorldWindowGLCanvas;
import java.awt.BorderLayout;
import javax.swing.JPanel;

/**
*
* @author Amadeus.Sowerby
*
* email: Amadeus.Sowerby_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*/
public class GfrWWPanel extends JPanel
{

      public GfrWWPanel(WorldWindowGLCanvas shareWith, int width, int height, Model model)
      {
         // To share resources among World Windows, pass the first World Window to the constructor of the other
         // World Windows.
         this.wwd = shareWith != null ? new WorldWindowGLCanvas(shareWith) : new WorldWindowGLCanvas();
         this.wwd.setSize(new java.awt.Dimension(width, height));
         this.wwd.setModel(model);

         this.setLayout(new BorderLayout(5, 5));
         this.add(this.wwd, BorderLayout.CENTER);

         /*
         StatusBar statusBar = new StatusBar();
         statusBar.setEventSource(wwd);
         this.add(statusBar, BorderLayout.SOUTH);*/
      }
     
      public WorldWindowGLCanvas getWwd()
      {
         return wwd;
      }
     
      private WorldWindowGLCanvas wwd;

}
TOP

Related Classes of org.geoforge.worldwind.multiwindow.gfrsynchro.GfrWWPanel

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.