示例#1
0
 /**
  * Sets the <CODE>ucar.visad.display.Animation</CODE> controlled by this widget. Removes any other
  * <CODE>ucar.visad.display.Animation</CODE> from the control of this widget.
  *
  * @param newAnimation ucar.visad.display.Animation to control
  */
 public void setAnimation(Animation newAnimation) {
   if (newAnimation == null) {
     throw new NullPointerException("Animation can't be null");
   }
   removeAnimationListener();
   anime = newAnimation;
   animationInfo.set(anime.getAnimationInfo());
   updateIndicator(anime.getSet());
   animationListener =
       new PropertyChangeListener() {
         public void propertyChange(PropertyChangeEvent evt) {
           handleAnimationPropertyChange(evt);
         }
       };
   anime.addPropertyChangeListener(animationListener);
 }