Examples of ZoomCommand


Examples of chunmap.app.command.ZoomCommand

        if (e.getWheelRotation()== 0) return;

        double s = (e.getWheelRotation() < 0) ? 2 : 0.5;

        ZoomCommand cmd = new ZoomCommand(map, s, x, y);
        map.executeCommand(cmd);
        map.refreshMap();
  }
View Full Code Here

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

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

            // 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

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

    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

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

        //        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

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

     * @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

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

            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
Copyright © 2018 www.massapi.com. 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.