Package org.locationtech.udig.project.ui.commands

Examples of org.locationtech.udig.project.ui.commands.TransformDrawCommand


    private void update(IToolContext context, int updateDelay2) {
        synchronized (NavigationUpdateThread.class) {
          this.updateDelay = updateDelay2;
            this.context=context;
            if (command == null) {
                TransformDrawCommand transformDrawCommand = new TransformDrawCommand();
                command=transformDrawCommand;
                transformDrawCommand.pan(horizontal*PAN_AMOUNT, vertical*PAN_AMOUNT);
                context.sendASyncCommand(transformDrawCommand);
            } else {
                command.pan(horizontal*PAN_AMOUNT, vertical*PAN_AMOUNT);
                context.getViewportPane().repaint();
            }
View Full Code Here


     
        synchronized (NavigationUpdateThread.class) {
          this.updateDelay = updateDelay;
          double targetZoom;
            if (command == null) {
                TransformDrawCommand transformDrawCommand = new TransformDrawCommand();
                command = transformDrawCommand;
                if (fixedPoint == null) {
                    fixedPoint = new Point(context.getViewportPane().getWidth() / 2, context
                            .getViewportPane().getHeight() / 2);
                }
                transformDrawCommand.fixPoint(fixedPoint);
                this.fixedPoint = context.pixelToWorld(fixedPoint.x, fixedPoint.y);
                targetZoom = context.calculateZoomLevel(previousZoom, zoomChange,this.fixedPoint,false, change != 0);
                if(Math.abs(targetZoom - previousZoom) > 0.0001) {
                  transformDrawCommand.zoom(targetZoom, targetZoom);
                  context.sendASyncCommand(transformDrawCommand);
                }
            } else {
        targetZoom = context.calculateZoomLevel(previousZoom,zoomChange,this.fixedPoint,false, change != 0);
                command.zoom(targetZoom, targetZoom);
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.commands.TransformDrawCommand

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.