Package gov.nasa.worldwind.awt

Examples of gov.nasa.worldwind.awt.WorldWindowGLCanvas


      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);
View Full Code Here


        if (hwnd == 0)
        {
            WorldWindow ww = this.getWorldWindow();
            if (ww != null)
            {
                WorldWindowGLCanvas wwgl = (WorldWindowGLCanvas) ww;
                GLCanvas glc = wwgl;
                Canvas cv = glc;
                Component c = cv;
                hwnd = zebraGetWin32Handle(c);
            }
View Full Code Here

        public AppPanel()
        {
            super(new BorderLayout());

            this.wwd = new WorldWindowGLCanvas();
            ((Component) this.wwd).setPreferredSize(new Dimension(1200, 800));

            // Create the default model as described in the current worldwind properties.
            Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
            this.wwd.setModel(m);
View Full Code Here

            value = getParameter("InitialPitch");
            if (value != null)
                Configuration.setValue(AVKey.INITIAL_PITCH, Double.parseDouble(value));

            // Create World Window GL Canvas
            this.wwd = new WorldWindowGLCanvas();
            this.getContentPane().add(this.wwd, BorderLayout.CENTER);

            // Create the default model as described in the current worldwind properties.
            Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
            this.wwd.setModel(m);
View Full Code Here

*/
public class SimplestPossibleExample extends JFrame
{
    public SimplestPossibleExample()
    {
        WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
        wwd.setPreferredSize(new java.awt.Dimension(1000, 800));
        this.getContentPane().add(wwd, java.awt.BorderLayout.CENTER);
        wwd.setModel(new BasicModel());
       
       
        // beg tempo bantchao
        Double lat = Configuration.getDoubleValue(AVKey.INITIAL_LATITUDE);
        Double lon = Configuration.getDoubleValue(AVKey.INITIAL_LONGITUDE);
View Full Code Here

      if (! (evtMouse.getSource() instanceof WorldWindowGLCanvas)) // should never appear
         return;


      WorldWindowGLCanvas cnv = (WorldWindowGLCanvas) evtMouse.getSource();

      Position curPos = cnv.getCurrentPosition();

      if (curPos == null)
         return;
     
      System.out.println("latitude=" + curPos.latitude.getDegrees() + ", longitude=" + curPos.longitude.getDegrees());
View Full Code Here

      //  this.getLayerPanel().update(this.getWwd());

      try {

        //initialise WorldWindow (globe)
        WorldWindowGLCanvas wwd = this.getWwd();

        //Setup JWW view
        BasicOrbitView bov = new BasicOrbitView(((BasicOrbitView) wwd.getView()).getOrbitViewModel());
        wwd.setView(bov);

        //initialise touch handler TUIO
        ((AWTInputHandler) wwd.getInputHandler()).removeHoverSelectListener();
        wwd.getInputHandler().setEventSource(null);

        WWTouchInputHandler wwtih = new WWTouchInputHandler();
        wwtih.setEventSource(wwd);
        wwtih.setLayerPanel(getLayerPanel());
        wwd.setInputHandler(wwtih);

        //Setup TUIO Communication handler
        final int port = 3333;
        TuioClient tClient = new TuioClient(port);
        System.out.println("listening to TUIO messages at port " + port);
View Full Code Here

public class Fullscreen {

  public static void main(String[] args) {
    Frame frame = new Frame("WorldwindFull");
    final WorldWindowGLCanvas worldWindowGLCanvas = new WorldWindowGLCanvas();
    worldWindowGLCanvas.setModel(new BasicModel());

    worldWindowGLCanvas.addKeyListener(new java.awt.event.KeyListener() {
      public void keyTyped(KeyEvent e) {
      }

      public void keyReleased(KeyEvent e) {
      }

      public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
          System.exit(0);
        }
      }
    });

    frame.add(worldWindowGLCanvas);
    frame.setSize(640, 480);
    frame.setUndecorated(true);
    int size = frame.getExtendedState();
    size |= Frame.MAXIMIZED_BOTH;
    frame.setExtendedState(size);

    frame.setVisible(true);
    worldWindowGLCanvas.requestFocus();
  }
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.awt.WorldWindowGLCanvas

Copyright © 2018 www.massapicom. 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.