Package org.mt4j.input.gestureAction

Examples of org.mt4j.input.gestureAction.DefaultZoomAction


   
    this.registerGlobalInputProcessor(new CursorTracer(mtApp, this));
   
    //Make canvas zoomable
    this.getCanvas().registerInputProcessor(new ZoomProcessor(mtApp));
    this.getCanvas().addGestureListener(ZoomProcessor.class, new DefaultZoomAction());
   
    if (!(MT4jSettings.getInstance().isOpenGlMode())){
      System.err.println(this.getClass().getName() + " example can only be run in OpenGL mode.");
      return;
    }
View Full Code Here


   
    this.getCanvas().registerInputProcessor(new PanProcessorTwoFingers(app));
    this.getCanvas().addGestureListener(PanProcessorTwoFingers.class, new DefaultPanAction());

    this.getCanvas().registerInputProcessor(new ZoomProcessor(app));
    this.getCanvas().addGestureListener(ZoomProcessor.class, new DefaultZoomAction());
   
    pictureLayer = new MTComponent(app);
   
    MTComponent topLayer = new MTComponent(app, "top layer group", new MTCamera(app));
   
View Full Code Here

    backgroundZoom.setText("Zoom anywhere on the background!");
    backgroundZoom.setPickable(false);
    this.getCanvas().addChild(backgroundZoom);
    backgroundZoom.setPositionGlobal(new Vector3D(app.width/2f, app.height/2f,0));
    getCanvas().registerInputProcessor(new ZoomProcessor(app));
    getCanvas().addGestureListener(ZoomProcessor.class, new DefaultZoomAction());
   
    //2 finger pan gesture
    MTTextArea backgroundPan = new MTTextArea(mtApplication, font);
    backgroundPan.setFillColor(new MTColor(150,150,150));
    backgroundPan.setNoFill(true);
View Full Code Here

TOP

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

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.