Package org.geoforge.worldwind.render

Examples of org.geoforge.worldwind.render.ControlPoint


      this.dragSelected(event);
   }

   protected void dragSelected(SelectEvent event)
   {
      ControlPoint point = (ControlPoint) event.getTopObject();
     

      Position lastPosition = point.getPosition();
     
       //int positionIndex = (Integer) point.getValue(GfrEditorObjShpSegWiseTool.CONTROL_TYPE_LOCATION_INDEX);
     
      //-- done in a hurry, positions should not be an array list => coz only two positions in this case
         /*int positionIndexPointNotChanged =-1;
        
         if (positionIndex == 0)
            positionIndexPointNotChanged = 1;
         else if (positionIndex == 1)
            positionIndexPointNotChanged = 0;
         //-- end done in a hurry
         */
         //Position posPointNotChanged = this.measureTool.getPositions().get(positionIndexPointNotChanged);
        
        
         /*double dblDistance =
                 DmsOperation.s_getDistanceFromDeg(
                 posPointNotChanged.getLatitude().getDegrees(),
                 posPointNotChanged.getLongitude().getDegrees(),
                 point.getPosition().getLatitude().getDegrees(),
                 point.getPosition().getLongitude().getDegrees());*/
        
         if (point.getValue(GfrEditorObjShpSegWiseTool.CONTROL_TYPE_LOCATION_INDEX) != null)
            lastPosition = measureTool.getPositions().get((Integer) point.getValue(GfrEditorObjShpSegWiseTool.CONTROL_TYPE_LOCATION_INDEX));

            //point = new ControlPoint(lastPosition, point.getAttributes(), point.getParent());
            //event.consume();
        
       
          // Delegate dragging computations to a dragger.
         this.dragger.selected(event);

      measureTool.moveControlPoint(point);
      if (measureTool.isShowAnnotation())
         measureTool.updateAnnotation(point.getPosition());
      measureTool.firePropertyChange(GfrEditorObjShpSegWiseTool.EVENT_POSITION_REPLACE,
              lastPosition, point.getPosition());
      measureTool.getWwd().redraw();
   }
View Full Code Here


//        this._lyrCustomControlPoints.removeAllRenderables(); // TODO: why commented out? Are annotations being disposed?
   }

   protected void addControlPoint(Position position, String key, Object value)
   {
      ControlPoint controlPoint = new ControlPoint(new Position(position, 0), this.controlPointsAttributes, this);
      controlPoint.setValue(key, value);
      this.doAddControlPoint(controlPoint);
   }
View Full Code Here

TOP

Related Classes of org.geoforge.worldwind.render.ControlPoint

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.