Package org.locationtech.udig.project.internal.command.navigation

Examples of org.locationtech.udig.project.internal.command.navigation.ZoomCommand


     * @param zoomfactor the amount to zoom
     * @return a new ZoomCommand object
     * @see NavCommand
     */
    public NavCommand createZoomCommand( double zoomfactor ) {
        return new ZoomCommand(zoomfactor);
    }
View Full Code Here


            // ignore
        }

        UndoableMapCommand selectCommand = SelectionCommandFactory.getInstance().createFIDSelectCommand(selectedLayer,
                currentFeature);
        ZoomCommand zoomCommand = new ZoomCommand(ref);
        activeMap.sendCommandASync(selectCommand);
        activeMap.sendCommandASync(zoomCommand);
        activeMap.getRenderManager().refresh(null);
    }
View Full Code Here

    NavigationUpdateThread.getUpdater().zoomWithFixedPoint(ZOOMFACTOR, context, NavigationUpdateThread.DEFAULT_DELAY,start);
  }

    private void zoomin( IViewportModel m, Rectangle r ) {
        ReferencedEnvelope worldBounds = getContext().worldBounds(r);
        ZoomCommand cmd = new ZoomCommand(worldBounds);
        getContext().sendASyncCommand(cmd);
    }
View Full Code Here

        //        new ZoomCommand((r.width / getContext().getMapDisplay().getDisplaySize().getWidth())) };
        try {
            Coordinate center = m.pixelToWorld( (int)r.getCenterX(), (int)r.getCenterY() );
            double zoomFactor = ((double)r.width) / ((double)getContext().getMapDisplay().getWidth());
           
            ZoomCommand cmd = new ZoomCommand(zoomFactor);
            cmd.setFixedPoint(center);
            getContext().sendASyncCommand(cmd);
         } catch (Exception e) {
            return; // could not zoom out
        }
    }
View Full Code Here

     * @return a new ZoomCommand object
     * @see NavCommand
     * @deprecated Please use new ZoomCommand(zoomfactor)
     */
    public NavCommand createZoomCommand( double zoomfactor ) {
        return new ZoomCommand(zoomfactor);
    }
View Full Code Here

            commands.add(
                    new PanCommand((horizontal*-PAN_AMOUNT), (vertical*-PAN_AMOUNT)));
        }
        if( zoom>0.00000001 ){
          double targetZoom = context.calculateZoomLevel(1,previousZoom, fixedPoint, false, zoomAmount != 0);
            ZoomCommand zoomCommand = new ZoomCommand(previousZoom);
            zoomCommand.setFixedPoint(fixedPoint);
            commands.add(zoomCommand);
        }
        if( commands.size()>0 ){
            NavComposite composite = new NavComposite(commands);
      context.sendASyncCommand( composite );
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.internal.command.navigation.ZoomCommand

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.