Esempio n. 1
0
 @Override
 public synchronized void move(final boolean direction, final long time) {
   if (!_future.isDone()) {
     final Parameters params = _group.getParameters(null);
     final int oldValue = (Integer) params.get(Player.JUMP_TIME);
     params.put(Player.JUMP_TIME, time);
     _group.setParameters(params);
     try {
       if (direction) {
         _group.triggerAction(Player.JUMP_FORWARD);
       } else {
         _group.triggerAction(Player.JUMP_BACKWARD);
       }
     } finally {
       params.put(Player.JUMP_TIME, oldValue);
       _group.setParameters(params);
     }
   }
 }
Esempio n. 2
0
 @Override
 public synchronized void jump(final int index) {
   if (!_future.isDone()) {
     final Parameters params = _group.getParameters(null);
     final int oldValue = (Integer) params.get(Player.JUMP_PLAYLIST_INCREMENT);
     try {
       if (index > 0) {
         params.put(Player.JUMP_PLAYLIST_INCREMENT, index);
         _group.setParameters(params);
         _group.triggerAction(Player.JUMP_FORWARD_IN_PLAYLIST);
       } else if (index < 0) {
         params.put(Player.JUMP_PLAYLIST_INCREMENT, -index);
         _group.setParameters(params);
         _group.triggerAction(Player.JUMP_BACKWARD_IN_PLAYLIST);
       }
     } finally {
       params.put(Player.JUMP_PLAYLIST_INCREMENT, oldValue);
       _group.setParameters(params);
     }
   }
 }