예제 #1
0
  /**
   * Adds a DurationListener to the listener list.
   *
   * @param listener Listener to add
   */
  public void addDurationListener(final DurationListener listener) {
    if (listener == null) {
      return;
    }

    listeners.add(DurationListener.class, listener);
  }
예제 #2
0
 /**
  * Fires the duration updated method on all listeners.
  *
  * @param newDuration New duration
  */
 protected void fireDurationListener(final int newDuration) {
   for (DurationListener listener : listeners.get(DurationListener.class)) {
     listener.durationUpdated(newDuration);
   }
 }
예제 #3
0
 /**
  * Removes a DurationListener from the listener list.
  *
  * @param listener Listener to remove
  */
 public void removeDurationListener(final DurationListener listener) {
   listeners.remove(DurationListener.class, listener);
 }