Package org.mt4j.input.inputProcessors.componentProcessors.rotateProcessor

Examples of org.mt4j.input.inputProcessors.componentProcessors.rotateProcessor.RotateProcessor$RotationContext


        meshGroup.scaleGlobal(se.getScaleFactorX(), se.getScaleFactorY(), se.getScaleFactorX(), biggestMesh.getCenterPointGlobal());
        return false;
      }
    });
   
    meshGroup.registerInputProcessor(new RotateProcessor(mtApplication));
    meshGroup.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
  }
View Full Code Here


    MTComponent group = new MTComponent(mtApplication);
    group.setComposite(true); //This makes the group "consume" all picking and gestures of the children
    group.registerInputProcessor(new DragProcessor(mtApplication));
    group.addGestureListener(DragProcessor.class, new DefaultDragAction());
    group.addGestureListener(DragProcessor.class, new InertiaDragAction(80, 0.8f, 10));
    group.registerInputProcessor(new RotateProcessor(mtApplication));
    group.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    //Scale the earth from the center. Else it might get distorted
    group.registerInputProcessor(new ScaleProcessor(mtApplication));
    group.addGestureListener(ScaleProcessor.class, new IGestureEventListener() {
      public boolean processGestureEvent(MTGestureEvent ge) {
View Full Code Here

    MTTextArea rotateOnly = new MTTextArea(mtApplication, font);
    rotateOnly.setFillColor(textAreaColor);
    rotateOnly.setStrokeColor(textAreaColor);
    rotateOnly.setText("Rotate me!");
    this.clearAllGestures(rotateOnly);
    rotateOnly.registerInputProcessor(new RotateProcessor(app));
    rotateOnly.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    this.getCanvas().addChild(rotateOnly);
    rotateOnly.setAnchor(PositionAnchor.UPPER_LEFT);
    rotateOnly.setPositionGlobal(new Vector3D(0, verticalPad,0));
   
    MTTextArea scaleOnly = new MTTextArea(mtApplication, font);
    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);
    dragRotScale.setAnchor(PositionAnchor.UPPER_LEFT);
View Full Code Here

          cluster.registerInputProcessor(new DragProcessor(pa));
          cluster.addGestureListener(DragProcessor.class, new DefaultDragAction());
         
          cluster.addGestureListener(DragProcessor.class, new InertiaDragAction());
         
          cluster.registerInputProcessor(new RotateProcessor(pa));
          cluster.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
         
          cluster.registerInputProcessor(new ScaleProcessor(pa));
          cluster.addGestureListener(ScaleProcessor.class,  new DefaultScaleAction());
         
View Full Code Here

       
        group.registerInputProcessor(new DragProcessor(pa));
        group.setGestureAllowance(DragProcessor.class, true);
        group.addGestureListener(DragProcessor.class, (IGestureEventListener)defaultDragAction);
       
        group.registerInputProcessor(new RotateProcessor(pa));
        group.addGestureListener(RotateProcessor.class, defaultRotateAction);
       
        group.registerInputProcessor(new ScaleProcessor(pa));
        group.addGestureListener(ScaleProcessor.class,  defaultScaleAction);
       
View Full Code Here

   * Can be overridden in subclasses to allow other/more default gestures.
   */
  protected void setDefaultGestureActions(){
//    /*
    if (createDefaultGestures){
      this.registerInputProcessor(new RotateProcessor(this.getRenderer()));
      this.setGestureAllowance(RotateProcessor.class, true);
//      this.addGestureListener(RotateProcessor.class, defaultRotateAction);
      this.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
     
      this.registerInputProcessor(new ScaleProcessor(this.getRenderer()));
View Full Code Here

    this.setName("SVG: " + fileName);
    this.setComposite(true);
   
    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);
View Full Code Here

  @Override
  protected void setDefaultGestureActions() {
    this.registerInputProcessor(new DragProcessor(this.getRenderer()));
    this.addGestureListener(DragProcessor.class, new DefaultDragAction());
   
    this.registerInputProcessor(new RotateProcessor(this.getRenderer()));
    this.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
  }
View Full Code Here

TOP

Related Classes of org.mt4j.input.inputProcessors.componentProcessors.rotateProcessor.RotateProcessor$RotationContext

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.