Package gov.nasa.worldwind.layers

Examples of gov.nasa.worldwind.layers.LayerList


         };

         // Create two models and pass them the shared layers.
         Model modelForWindowA = new BasicModel();
         modelForWindowA.setGlobe(earth);
         modelForWindowA.setLayers(new LayerList(layers));

         // Create two frames and give each their own model.
         GfrCanvasFrame frameA = new GfrCanvasFrame(null, modelForWindowA, "Frame A");
        
         Model modelForWindowB = new BasicModel();
         modelForWindowB.setGlobe(earth);
         modelForWindowB.setLayers(new LayerList(layers));
        
         // When creating the second frame, specify resource sharing with the first one.
         GfrCanvasFrame frameB = new GfrCanvasFrame(frameA.getWwd(), modelForWindowB, "Frame B");
        
         // Create two models and pass them the shared layers.
         Model modelForWindowC = new BasicModel();
         modelForWindowC.setGlobe(earth);
         modelForWindowC.setLayers(new LayerList(layers));

         // Create two frames and give each their own model.
         GfrCanvasFrame frameC = new GfrCanvasFrame(null, modelForWindowC, "Frame C");

         frameA.addSecondaryViewer(frameB);
View Full Code Here


   // ATTN: TO BE REPLACED
   private static void _s_insertBeforePlacenames_(WorldWindow wwd, Layer layer)
    {
        // Insert the layer into the layer list just before the placenames.
        int compassPosition = 0;
        LayerList layers = wwd.getModel().getLayers();
       
        for (Layer l : layers)
        {
            if (l instanceof PlaceNameLayer)
                compassPosition = layers.indexOf(l);
        }
       
        layers.add(compassPosition, layer);
    }
View Full Code Here

  
   private void _enable_()
    {
        this._rgeShape_.setStartPosition(null);

        LayerList layers = super._glcWwd.getModel().getLayers();

        if (!layers.contains(super._rlr))
            layers.add(super._rlr);

        if (! super._rlr.isEnabled())
            super._rlr.setEnabled(true);

   
View Full Code Here

      // ---
      super._rlr.setName(_STR_NAME_LAYER_);
      super._glcWwd.getInputHandler().addMouseListener((MouseListener) this);


      LayerList llt = super._glcWwd.getModel().getLayers();
      llt.add(super._rlr);

      // test
      super._glcWwd.redraw();
   }
View Full Code Here

                        update = true;
                    }
                    // Enable/disable layer on left click
                    if (event.getEventAction().equals(SelectEvent.LEFT_CLICK))
                    {
                        LayerList layers = wwd.getModel().getLayers();
                        if (i >= 0 && i < layers.size())
                        {
                            layers.get(i).setEnabled(!layers.get(i).isEnabled());
                            update = true;
                        }
                    }
                }
                else
View Full Code Here

                    this.draggingLayer = true;
                }
                if (this.selectedIndex != -1 && this.dragRefIndex != -1 && this.dragRefIndex != this.selectedIndex)
                {
                    // Move dragged layer
                    LayerList layers = this.wwd.getModel().getLayers();
                    int insertIndex = this.dragRefIndex > this.selectedIndex ?
                        this.selectedIndex : this.selectedIndex + 1;
                    int removeIndex = this.dragRefIndex > this.selectedIndex ?
                        this.dragRefIndex + 1 : this.dragRefIndex;
                    layers.add(insertIndex, layers.get(this.dragRefIndex));
                    layers.remove(removeIndex);
                    this.dragRefIndex = this.selectedIndex;
                    event.consume();
                }
            }
        }
View Full Code Here

      // ---
      super._rlr.setName(_STR_NAME_LAYER_);
      super._glcWwd.getInputHandler().addMouseListener((MouseListener) this);


      LayerList llt = super._glcWwd.getModel().getLayers();
      llt.add(super._rlr);

      // test
      super._glcWwd.redraw();
   }
View Full Code Here

  
   public void removeVolatileLayer(RenderableLayer rlrVol)
    {
        if (super._cnv != null)
        {
           LayerList llt = super._cnv.getModel().getLayers();
          
           if (llt.contains(rlrVol))
           {
              llt.remove(rlrVol);
              super._cnv.redraw();
           }
        }
    }
View Full Code Here

   
    public void addVolatileLayer(RenderableLayer rlrVol)
    {
        if (super._cnv != null)
        {
           LayerList llt = super._cnv.getModel().getLayers();
           llt.add(rlrVol);
          
           super._cnv.redraw();
           super.getCanvas();
        }
       
View Full Code Here

      return obj;
   }
  
   private boolean _selectObject_(String strId, boolean bln) throws Exception
   {     
      LayerList llt = super._cnv.getModel().getLayers();
       
        for (Layer lyrCur: llt)
        {
            if (! (lyrCur instanceof GfrRlrObjTloRndSngPntPlc))
                continue;
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.layers.LayerList

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.