Package gov.nasa.worldwind.pick

Examples of gov.nasa.worldwind.pick.PickedObject


         if (!isFreeHand() || (!measureTool.getMeasureShapeType().equals(GfrEditorObjShpSegWiseTool.SHAPE_PATH) /*&& !measureTool.getMeasureShapeType().equals(GfrEditorObjShpSegWiseTool.SHAPE_POLYGON)*/))
         {
            // Rubber band - Move control point and update shape
            Position lastPosition = rubberBandTarget.getPosition();
            PickedObjectList pol = measureTool.getWwd().getObjectsAtCurrentPosition();
            PickedObject to = pol.getTerrainObject();
            rubberBandTarget.setPosition(new Position(to.getPosition(), 0));
            measureTool.moveControlPoint(rubberBandTarget);
            measureTool.firePropertyChange(GfrEditorObjShpSegWiseTool.EVENT_POSITION_REPLACE,
                    lastPosition, rubberBandTarget.getPosition());
            measureTool.getWwd().redraw();
         }
View Full Code Here


     * @return A new picked object.
     */
    protected PickedObject createPickedObject(DrawContext dc, Color pickColor)
    {
        Object delegateOwner = this.getDelegateOwner();
        return new PickedObject(pickColor.getRGB(), delegateOwner != null ? delegateOwner : this);
    }
View Full Code Here

    /** {@inheritDoc} */
    @Override
    protected PickedObject createPickedObject(DrawContext dc, Color pickColor)
    {
        PickedObject po = super.createPickedObject(dc, pickColor);

        // Add the KMLPlacemark to the picked object as the context of the picked object.
        po.setValue(AVKey.CONTEXT, this.parent);
        return po;
    }
View Full Code Here

         if (!isFreeHand() || (!measureTool.getMeasureShapeType().equals(GfrMeasureTool.SHAPE_PATH) /*&& !measureTool.getMeasureShapeType().equals(GfrMeasureTool.SHAPE_POLYGON)*/))
         {
            // Rubber band - Move control point and update shape
            Position lastPosition = rubberBandTarget.getPosition();
            PickedObjectList pol = measureTool.getWwd().getObjectsAtCurrentPosition();
            PickedObject to = pol.getTerrainObject();
            rubberBandTarget.setPosition(new Position(to.getPosition(), 0));
            measureTool.moveControlPoint(rubberBandTarget);
            measureTool.firePropertyChange(GfrMeasureTool.EVENT_POSITION_REPLACE,
                    lastPosition, rubberBandTarget.getPosition());
            measureTool.getWwd().redraw();
         }
View Full Code Here

   public void selected(SelectEvent evtSelect)
   {
      if (evtSelect == null)
            return;

      PickedObject topPickedObject = evtSelect.getTopPickedObject();

      if (evtSelect.getEventAction().compareTo(SelectEvent.LEFT_PRESS) == 0)
      {
         if (topPickedObject != null && topPickedObject.getObject() instanceof IGfrHandlerPhotoAlbumRender)
         {
            IGfrHandlerPhotoAlbumRender selected = (IGfrHandlerPhotoAlbumRender) topPickedObject.getObject();
            this._highlight_(selected);
         }
        
         else
         {
            this._highlight_(null);
         }
      }
     
      else if (evtSelect.getEventAction().compareTo(SelectEvent.LEFT_DOUBLE_CLICK) == 0)
      {
         if (topPickedObject != null && topPickedObject.getObject() instanceof IGfrHandlerPhotoAlbumRender)
         {
            IGfrHandlerPhotoAlbumRender selected = (IGfrHandlerPhotoAlbumRender) topPickedObject.getObject();
            this._highlight_(selected);
           
            try
            {
               this._openResource_(selected);
View Full Code Here

                }
                return;
            }

            PickedObjectList pos = dc.getPickedObjects();
            PickedObject terrainObject = pos != null ? pos.getTerrainObject() : null;

            if (terrainObject == null)
                return;

            if (this.getStartPosition() != null)
            {
                Position end = terrainObject.getPosition();
               
                if (!this.getStartPosition().equals(end))
                {
                    this.setEndPosition(end);
                    this.setSector(Sector.boundingSector(this.getStartPosition(), this.getEndPosition()));
View Full Code Here

                {
                    this.annotation.getAttributes().setHighlighted(true);
                    update = true;
                }
                // Check for text or url
                PickedObject po = event.getTopPickedObject();
                if (po.getValue(AVKey.URL) != null)
                {
                    // Set cursor hand on hyperlinks
                    ((Component) this.wwd).setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                    int i = Integer.parseInt((String) po.getValue(AVKey.URL));
                    // Select current hyperlink
                    if (this.selectedIndex != i)
                    {
                        this.selectedIndex = i;
                        update = true;
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.pick.PickedObject

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.