@Override public synchronized void updateTuioCursor(TuioCursor cursor) { TuioCursor tr = null; for (TuioCursor t : currentTouchState) if (t.getSessionID() == cursor.getSessionID()) tr = t; currentTouchState.remove(tr); currentTouchState.add(cursor); }
public synchronized TuioCursor getTuioCursor(long s_id) { for (TuioCursor t : currentTouchState) if (t.getSessionID() == s_id) return t; return null; }