Package gov.nasa.worldwind.pick

Examples of gov.nasa.worldwind.pick.PickedObjectList


      // We missed any roll-over events while dragging, so highlight any under the cursor now,
      // or de-highlight the dragged control point if it's no longer under the cursor.
      if (event.getEventAction().equals(SelectEvent.DRAG_END))
      {
         PickedObjectList pol = this.measureTool.getWwd().getObjectsAtCurrentPosition();
         if (pol != null)
         {
            this.highlight(pol.getTopObject());
            this.measureTool.getWwd().redraw();
         }
      }
   }
View Full Code Here


      {
         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

    public void mousePressed(MouseEvent e)
    {
        this._pntMouse = e.getPoint();

        Object topObject = null;
        PickedObjectList pickedObjects = this._wwd.getObjectsAtCurrentPosition();
        if (pickedObjects != null)
            topObject = pickedObjects.getTopObject();

        if (topObject instanceof GfrMrkMoveAbs)
        {
            this._cpmActive_ = (GfrMrkMoveAbs) topObject;
            this._strActionActive = this._cpmActive_.getType();
View Full Code Here

        if (this.isArmed())
        {
            if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2)
            {
                Object topObject = null;
                PickedObjectList pickedObjects = this._wwd.getObjectsAtCurrentPosition();
                if (pickedObjects != null)
                    topObject = pickedObjects.getTopObject();

                if (topObject instanceof GfrMrkMoveHoriz)
                {
                    if (this.removeVertex((GfrMrkMoveHoriz) topObject))
                        e.consume();
View Full Code Here

        protected void handleSelect()
        {
            // If the picked object is null or something other than a rigid shape, then ignore the mouse click. If we
            // deselect the current entry at this point, the user cannot easily navigate without loosing the selection.

            PickedObjectList pickedObjects = this.getApp().getWwd().getObjectsAtCurrentPosition();

            Object topObject = pickedObjects.getTopObject();
            if (!(topObject instanceof AbstractShape))
                return;

            AbstractShapeEntry pickedEntry = this.getEntryFor((AbstractShape) topObject);
            if (pickedEntry == null)
View Full Code Here

      // We missed any roll-over events while dragging, so highlight any under the cursor now,
      // or de-highlight the dragged control point if it's no longer under the cursor.
      if (event.getEventAction().equals(SelectEvent.DRAG_END))
      {
         PickedObjectList pol = this.measureTool.getWwd().getObjectsAtCurrentPosition();
         if (pol != null)
         {
            this.highlight(pol.getTopObject());
            this.measureTool.getWwd().redraw();
         }
      }
   }
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

        protected void handleSelect()
        {
            // If the picked object is null or something other than an airspace, then ignore the mouse click. If we
            // deselect the current entry at this point, the user cannot easily navigate without loosing the selection.

            PickedObjectList pickedObjects = this.getApp().getWwd().getObjectsAtCurrentPosition();

            Object topObject = pickedObjects.getTopObject();
            if (!(topObject instanceof Airspace))
                return;

            AirspaceEntry pickedEntry = this.getEntryFor((Airspace) topObject);
            if (pickedEntry == null)
View Full Code Here

                    this.doRender(dc);
                }
                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()));
                    this.doRender(dc);
                }
            }
            else
            {
                this.setStartPosition(pos.getTerrainObject().getPosition());
            }
        }
View Full Code Here

TOP

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

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.