Example #1
0
 public synchronized void setState(int state) {
   if (this.state != state) {
     for (StateObserver observer : observers) {
       observer.onChangeState(this.state, state, targetList);
     }
     this.state = state;
     if (this.state == STOP) {
       targetList.clear();
     }
   }
 }
Example #2
0
 public synchronized void scroll(Motion motion) {
   for (StateObserver observer : observers) {
     observer.scroll(motion);
   }
 }