Examples of registerInputProcessor()


Examples of org.mt4j.components.visibleComponents.widgets.MTListCell.registerInputProcessor()

    listLabel.setNoStroke(true);
    listLabel.setText(imageName);
    cell.addChild(listLabel);
    listLabel.setPositionRelativeToParent(cell.getCenterPointLocal());
    cell.unregisterAllInputProcessors();
    cell.registerInputProcessor(new TapProcessor(getMTApplication(), 15));
    cell.addGestureListener(TapProcessor.class, new IGestureEventListener() {
      public boolean processGestureEvent(MTGestureEvent ge) {
        TapEvent te = (TapEvent)ge;
        switch (te.getTapID()) {
        case TapEvent.BUTTON_DOWN:
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    MTTextArea dragOnly = new MTTextArea(mtApplication, font);
    dragOnly.setFillColor(textAreaColor);
    dragOnly.setStrokeColor(textAreaColor);
    dragOnly.setText("Drag me!");
    this.clearAllGestures(dragOnly);
    dragOnly.registerInputProcessor(new DragProcessor(app));
    dragOnly.addGestureListener(DragProcessor.class, new DefaultDragAction());
    dragOnly.addGestureListener(DragProcessor.class, new InertiaDragAction()); //Add inertia to dragging
    this.getCanvas().addChild(dragOnly);
   
    MTTextArea rotateOnly = new MTTextArea(mtApplication, font);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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));
   
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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));
   
 
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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));
   
 
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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));
   
 
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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);
View Full Code Here

Examples of org.mt4j.components.visibleComponents.widgets.MTTextArea.registerInputProcessor()

    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));
   
 
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.