Examples of viewTransform()


Examples of ar.util.HasViewTransform.viewTransform()

            e.getComponent().setCursor(Cursor.getDefaultCursor());
        }
       
        if (buttonEquals(e, ZOOM_BUTTON)) {
          HasViewTransform canvas = (HasViewTransform) e.getComponent();
          canvas.viewTransform(canvas.viewTransform(), false);
        }
    }
   
    private static final boolean buttonEquals(MouseEvent e, int button) {
      return (e.getModifiers() & button) == button;
View Full Code Here

Examples of ar.util.HasViewTransform.viewTransform()

            e.getComponent().setCursor(Cursor.getDefaultCursor());
        }
       
        if (buttonEquals(e, ZOOM_BUTTON)) {
          HasViewTransform canvas = (HasViewTransform) e.getComponent();
          canvas.viewTransform(canvas.viewTransform(), false);
        }
    }
   
    private static final boolean buttonEquals(MouseEvent e, int button) {
      return (e.getModifiers() & button) == button;
View Full Code Here

Examples of ar.util.HasViewTransform.viewTransform()

   */
  public void keyTyped(KeyEvent e) {
    char c = e.getKeyChar();
    HasViewTransform canvas = (HasViewTransform) e.getComponent();
    JComponent comp = (JComponent) e.getComponent();
    AffineTransform vt = canvas.viewTransform();

    if (c == 'c' || c == 'C') {
      Rectangle vb = comp.getBounds();
      Rectangle2D db = canvas.dataBounds();

View Full Code Here

Examples of ar.util.HasViewTransform.viewTransform()

      double tx = db.getMinX()-(xmargin/2);
      double ty = db.getMinY()-(ymargin/2);
           
      AffineTransform t = AffineTransform.getScaleInstance(vt.getScaleX(), vt.getScaleY());
      t.translate(-tx,-ty);
      canvas.viewTransform(t, false);
    } else if (c == '+' || c == '=') {
      vt.scale(2, 2);
      canvas.viewTransform(vt, false);
    } else if (c == '-' || c == '_') {
      vt.scale(.5,.5);
View Full Code Here

Examples of ar.util.HasViewTransform.viewTransform()

      AffineTransform t = AffineTransform.getScaleInstance(vt.getScaleX(), vt.getScaleY());
      t.translate(-tx,-ty);
      canvas.viewTransform(t, false);
    } else if (c == '+' || c == '=') {
      vt.scale(2, 2);
      canvas.viewTransform(vt, false);
    } else if (c == '-' || c == '_') {
      vt.scale(.5,.5);
      canvas.viewTransform(vt, false);
    } else if (c == 'z' || c == 'Z') {
      canvas.zoomFit();
View Full Code Here

Examples of ar.util.HasViewTransform.viewTransform()

    } else if (c == '+' || c == '=') {
      vt.scale(2, 2);
      canvas.viewTransform(vt, false);
    } else if (c == '-' || c == '_') {
      vt.scale(.5,.5);
      canvas.viewTransform(vt, false);
    } else if (c == 'z' || c == 'Z') {
      canvas.zoomFit();
    }
  }
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.