Package org.mt4j.input.gestureAction

Examples of org.mt4j.input.gestureAction.DefaultScaleAction


    scaleOnly.setFillColor(textAreaColor);
    scaleOnly.setStrokeColor(textAreaColor);
    scaleOnly.setText("Scale me!");
    this.clearAllGestures(scaleOnly);
    scaleOnly.registerInputProcessor(new ScaleProcessor(app));
    scaleOnly.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    this.getCanvas().addChild(scaleOnly);
    scaleOnly.setAnchor(PositionAnchor.UPPER_LEFT);
    scaleOnly.setPositionGlobal(new Vector3D(0, 2*verticalPad,0));
   
    MTTextArea dragAndRotate = new MTTextArea(mtApplication, font);
    dragAndRotate.setFillColor(textAreaColor);
    dragAndRotate.setStrokeColor(textAreaColor);
    dragAndRotate.setText("Drag and Rotate me!");
    this.clearAllGestures(dragAndRotate);
    dragAndRotate.registerInputProcessor(new RotateProcessor(app));
    dragAndRotate.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    dragAndRotate.registerInputProcessor(new DragProcessor(app));
    dragAndRotate.addGestureListener(DragProcessor.class, new DefaultDragAction());
    this.getCanvas().addChild(dragAndRotate);
    dragAndRotate.setAnchor(PositionAnchor.UPPER_LEFT);
    dragAndRotate.setPositionGlobal(new Vector3D(0, 3*verticalPad,0));
   
    MTTextArea dragAndScale = new MTTextArea(mtApplication, font);
    dragAndScale.setFillColor(textAreaColor);
    dragAndScale.setStrokeColor(textAreaColor);
    dragAndScale.setText("Drag and Scale me!");
    this.clearAllGestures(dragAndScale);
    dragAndScale.registerInputProcessor(new ScaleProcessor(app));
    dragAndScale.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    dragAndScale.registerInputProcessor(new DragProcessor(app));
    dragAndScale.addGestureListener(DragProcessor.class, new DefaultDragAction());
    this.getCanvas().addChild(dragAndScale);
    dragAndScale.setAnchor(PositionAnchor.UPPER_LEFT);
    dragAndScale.setPositionGlobal(new Vector3D(0, 8*verticalPad,0));
   
    MTTextArea rotateAndScale = new MTTextArea(mtApplication, font);
    rotateAndScale.setFillColor(textAreaColor);
    rotateAndScale.setStrokeColor(textAreaColor);
    rotateAndScale.setText("Rotate and Scale me!");
    this.clearAllGestures(rotateAndScale);
    rotateAndScale.registerInputProcessor(new ScaleProcessor(app));
    rotateAndScale.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    rotateAndScale.registerInputProcessor(new RotateProcessor(app));
    rotateAndScale.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    this.getCanvas().addChild(rotateAndScale);
    rotateAndScale.setAnchor(PositionAnchor.UPPER_LEFT);
    rotateAndScale.setPositionGlobal(new Vector3D(0,9*verticalPad,0));
   
    MTTextArea dragRotScale = new MTTextArea(mtApplication, font);
    dragRotScale.setFillColor(textAreaColor);
    dragRotScale.setStrokeColor(textAreaColor);
    dragRotScale.setText("Drag, Rotate and Scale me!");
    this.clearAllGestures(dragRotScale);
    dragRotScale.registerInputProcessor(new ScaleProcessor(app));
    dragRotScale.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
    dragRotScale.registerInputProcessor(new RotateProcessor(app));
    dragRotScale.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    dragRotScale.registerInputProcessor(new DragProcessor(app));
    dragRotScale.addGestureListener(DragProcessor.class, new DefaultDragAction());
    this.getCanvas().addChild(dragRotScale);
View Full Code Here


   
    currentLocalTransformMatrix = new Matrix();
   
    defaultDragAction     = new DefaultDragAction();
    defaultRotateAction   = new DefaultRotateAction();
    defaultScaleAction     = new DefaultScaleAction();
  }
View Full Code Here

      this.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
     
      this.registerInputProcessor(new ScaleProcessor(this.getRenderer()));
      this.setGestureAllowance(ScaleProcessor.class, true);
//      this.addGestureListener(ScaleProcessor.class, defaultScaleAction);
      this.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
     
      this.registerInputProcessor(new DragProcessor(this.getRenderer()));
      this.setGestureAllowance(DragProcessor.class, true);
//      this.addGestureListener(DragProcessor.class, defaultDragAction);
      this.addGestureListener(DragProcessor.class, new DefaultDragAction());
View Full Code Here

    this.registerInputProcessor(new DragProcessor(applet));
    this.addGestureListener(DragProcessor.class, new DefaultDragAction());
    this.registerInputProcessor(new RotateProcessor(applet));
    this.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    this.registerInputProcessor(new ScaleProcessor(applet));
    this.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
   
    SVGLoader loader = new SVGLoader(applet);
    MTComponent svg = loader.loadSvg(fileName);
    this.addChild(svg);
   
View Full Code Here

TOP

Related Classes of org.mt4j.input.gestureAction.DefaultScaleAction

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.