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

Examples of org.mt4j.input.inputProcessors.componentProcessors.rotateProcessor.RotateEvent


  /* (non-Javadoc)
   * @see com.jMT.input.gestureAction.IGestureAction#processGesture(com.jMT.input.inputAnalyzers.GestureEvent)
   */
  public boolean processGestureEvent(MTGestureEvent g) {
    if (g instanceof RotateEvent){
      RotateEvent rotateEvent = (RotateEvent)g;
     
      if (!useCustomTarget)
        target = rotateEvent.getTargetComponent();
     
      switch (rotateEvent.getId()) {
      case MTGestureEvent.GESTURE_DETECTED:
        if (target instanceof MTComponent){
          ((MTComponent)target).sendToFront();
          /*
          Animation[] animations = AnimationManager.getInstance().getAnimationsForTarget(target);
          for (int i = 0; i < animations.length; i++) {
            Animation animation = animations[i];
            animation.stop();
          }
          */
        }
        break;
      case MTGestureEvent.GESTURE_UPDATED:
        target.rotateZGlobal(rotateEvent.getRotationPoint(), rotateEvent.getRotationDegrees());
        if (target.isGestureAllowed(DragProcessor.class))
          target.translateGlobal(rotateEvent.getTranslationVector());
        break;
      case MTGestureEvent.GESTURE_ENDED:
        break;
      default:
        break;
View Full Code Here

TOP

Related Classes of org.mt4j.input.inputProcessors.componentProcessors.rotateProcessor.RotateEvent

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.