code: public void queueAnimation(final GQAnimation anim, final int duration) {
      if (isOff()) {
        anim.onStart();
        anim.onComplete();
      } else {
        queue(anim.e, DEFAULT_NAME, new Function() {
          public void cancel(Element e) {
            Animation anim = (Animation) data(e, GQAnimation.ACTUAL_ANIMATION, null);
            if (anim != null) {
              anim.cancel();
            }
          }
  
          public void f(Element e) {
            anim.run(duration);
          }
        });
      }
    }
docs: Queue an animation for an element.
  
  The goal of this method is to reuse animations.
  @param e
  @param anim
  @param duration