Package org.mt4j.input.inputData

Examples of org.mt4j.input.inputData.MTFingerInputEvt


    if (!mouseBusy )  {
      mousePressedButton = e.getButton();
      mouseBusy = true;
     
      InputCursor m = new InputCursor();
      MTFingerInputEvt touchEvt = new MTFingerInputEvt(this, e.getX(), e.getY(), MTFingerInputEvt.INPUT_DETECTED, m);
//      m.addEvent(touchEvt);
     
      lastUsedMouseID = m.getId();
      ActiveCursorPool.getInstance().putActiveCursor(lastUsedMouseID, m);
//     
View Full Code Here


   */
  public void mouseDragged(MouseEvent e) {
    try {
      InputCursor m = ActiveCursorPool.getInstance().getActiveCursorByID(lastUsedMouseID);
      if (m != null){
        MTFingerInputEvt te = new MTFingerInputEvt(this, e.getX(), e.getY(), MTFingerInputEvt.INPUT_UPDATED, m);
//        m.addEvent(te);
//        System.out.println("MouseSource Finger UPDATE, Motion ID: " + m.getId());
        //FIRE
        this.enqueueInputEvent(te);
      }
View Full Code Here

   * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
   */
  public void mouseReleased(MouseEvent e) {
    if (e.getButton() == mousePressedButton) {
      InputCursor m = ActiveCursorPool.getInstance().getActiveCursorByID(lastUsedMouseID);
      MTFingerInputEvt te = new MTFingerInputEvt(this, e.getX(), e.getY(), MTFingerInputEvt.INPUT_ENDED, m);
//      m.addEvent(te);
     
      //System.out.println("MouseSource Finger UP, Motion ID: " + m.getId());
      this.enqueueInputEvent(te);
     
View Full Code Here

 
  public void processInputEvtImpl(MTInputEvent inputEvent){
//    MTFingerInputEvt touchEvt = (MTFingerInputEvt)inputEvent;
   
    if (inputEvent instanceof MTFingerInputEvt){
      MTFingerInputEvt te = (MTFingerInputEvt)inputEvent;
      this.fireInputEvent(te);
      /*
      InputCursor motion = te.getCursor();
     
      switch (te.getId()) {
View Full Code Here

        e.printStackTrace();
      }
    }
   
    InputCursor m = new InputCursor();
    MTFingerInputEvt touchEvt = new MTFingerInputEvt(this, mouseInfo.x, mouseInfo.y, MTFingerInputEvt.INPUT_DETECTED, m);
//    m.addEvent(touchEvt);
   
//    long motionID = m.getId();
    ActiveCursorPool.getInstance().putActiveCursor(device, m);
    this.enqueueInputEvent(touchEvt);
View Full Code Here

      }
    }

    if (mouseInfo.isButtonPressed){
      InputCursor m = ActiveCursorPool.getInstance().getActiveCursorByID(device);
      MTFingerInputEvt te = new MTFingerInputEvt(this, mouseInfo.x, mouseInfo.y, MTFingerInputEvt.INPUT_UPDATED, m);
      //      m.addEvent(te);
//      System.out.println("Motion update on device: #" + device+  " X:" + mouseInfo.x + " Y:" + mouseInfo.y);
      this.enqueueInputEvent(te);
    }
  }
View Full Code Here

      }
    }

    if (mouseInfo.isButtonPressed){
      InputCursor m = ActiveCursorPool.getInstance().getActiveCursorByID(device);
      MTFingerInputEvt te = new MTFingerInputEvt(this, mouseInfo.x, mouseInfo.y, MTFingerInputEvt.INPUT_UPDATED, m);
//      m.addEvent(te);
//      System.out.println("Motion update on device: #" + device+  " X:" + mouseInfo.x + " Y:" + mouseInfo.y);
      this.enqueueInputEvent(te);
    }
  }
View Full Code Here

      mouseInfo.isButtonPressed = false;

      InputCursor m = ActiveCursorPool.getInstance().getActiveCursorByID(device);
//      System.out.println("Motion ended on device: #" + device);

      MTFingerInputEvt te;
      if (m.getCurrentEvent() != null)
        te = new MTFingerInputEvt(this, m.getCurrentEvent().getPosX(), m.getCurrentEvent().getPosY(), MTFingerInputEvt.INPUT_ENDED, m);
      else
        te = new MTFingerInputEvt(this, 0,0, MTFingerInputEvt.INPUT_ENDED, m);

//      m.addEvent(te); //werden nicht hier geadded sondern synchroniesert mit dem PApplet thread in den analyzern, so dass immer nur 1
      // 1 te geadded wird und dann wieder verarbeitet, dann der n�chste

      ActiveCursorPool.getInstance().removeCursor(device);
View Full Code Here

      inputID = MTFingerInputEvt.INPUT_ENDED;
    }
   
    int absoluteX = Math.round(finger.getX()*this.windowWidth);
    int absoluteY = Math.round((1-finger.getY())*this.windowHeight);
    this.enqueueInputEvent(new MTFingerInputEvt(this, absoluteX, absoluteY, inputID, cursor));
  }
View Full Code Here

    float abosulteY =  cursor.getY() * windowHeight;
    long sessionID = cursor.getSessionID();
   
//    logger.info("TUIO INPUT ADD FINGER - TUIO ID: " + sessionID);
    InputCursor c = new InputCursor();
    MTFingerInputEvt touchEvt = new MTFingerInputEvt(this, absoluteX, abosulteY, MTFingerInputEvt.INPUT_DETECTED, c);
    long cursorID = c.getId();
    ActiveCursorPool.getInstance().putActiveCursor(cursorID, c);
    tuioIDToCursorID.put(sessionID, cursorID);
    this.enqueueInputEvent(touchEvt);
  }
View Full Code Here

TOP

Related Classes of org.mt4j.input.inputData.MTFingerInputEvt

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.