Package org.locationtech.udig.tools.edit

Examples of org.locationtech.udig.tools.edit.MouseTracker


        if( path==null ){
            path=factory.create(1,1);
            handler.getBehaviours().add(new Creator());
            handler.lock(this);
        }
        MouseTracker tracker=handler.getMouseTracker();
        int translationX;
        int translationY;
        if (factory.useMiddleAsOrigin())
        {
           translationX=tracker.getDragStarted().getX();
           translationY=tracker.getDragStarted().getY();
        }
        else
        {
           translationX=Math.min(tracker.getDragStarted().getX(), e.x);
           translationY=Math.min(tracker.getDragStarted().getY(), e.y);
        }

        int scaleX=Math.abs(tracker.getDragStarted().getX()-e.x);
        int scaleY=Math.abs(tracker.getDragStarted().getY()-e.y);
      //force square/circle if shift is activated
        if (e.isShiftDown())
        {
           if (scaleX > scaleY)
           {
View Full Code Here

TOP

Related Classes of org.locationtech.udig.tools.edit.MouseTracker

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.