/** * Immediately run this animation. If the animation is already running, it * will be canceled first. * <p> * This is equivalent to <code>run(duration, null)</code>. * * @param duration the duration of the animation in milliseconds * @see #run(int, Element) */ public void run(int duration) { run(duration, null); }
/** * Run this animation at the given startTime. If the startTime has already * passed, the animation will run synchronously as if it started at the * specified start time. If the animation is already running, it will be * canceled first. * <p> * This is equivalent to <code>run(duration, startTime, null)</code>. * * @param duration the duration of the animation in milliseconds * @param startTime the synchronized start time in milliseconds * @see #run(int, double, Element) */ public void run(int duration, double startTime) { run(duration, startTime, null); }
/** * Immediately run this animation. If the animation is already running, it * will be canceled first. * <p> * If the element is not <code>null</code>, the {@link #onUpdate(double)} * method might be called only if the element may be visible (generally left * at the appreciation of the browser). Otherwise, it will be called * unconditionally. * * @param duration the duration of the animation in milliseconds * @param element the element that visually bounds the entire animation */ public void run(int duration, Element element) { run(duration, Duration.currentTimeMillis(), element); }
/** * Immediately run this animation. If the animation is already running, it * will be canceled first. * <p> * This is equivalent to <code>run(duration, null)</code>. * * @param duration the duration of the animation in milliseconds * @see #run(int, Element) */ public void run(int duration) { run(duration, null); }
/** * Immediately run this animation. If the animation is already running, it * will be canceled first. * <p> * This is equivalent to <code>run(duration, null)</code>. * * @param duration the duration of the animation in milliseconds * @see #run(int, Element) */ public void run(int duration) { run(duration, null); }
/** * Runs the effect for the given duration. * * @param duration the effect duration in milliseconds * @param effect the effect run * @return true if the effect is run */ public boolean run(int duration, Effect effect) { if (isRunning) return false; this.effect = effect; animation.run(duration); return true; }
@Override public void run(final int duration) { super.run(duration); }
public void run() { super.run(1000); }
/** * Run this animation at the given startTime. If the startTime has already * passed, the animation will run synchronously as if it started at the * specified start time. If the animation is already running, it will be * canceled first. * <p> * This is equivalent to <code>run(duration, startTime, null)</code>. * * @param duration the duration of the animation in milliseconds * @param startTime the synchronized start time in milliseconds * @see #run(int, double, Element) */ public void run(int duration, double startTime) { run(duration, startTime, null); }
/** * Run this animation at the given startTime. If the startTime has already * passed, the animation will run synchronously as if it started at the * specified start time. If the animation is already running, it will be * canceled first. * <p> * This is equivalent to <code>run(duration, startTime, null)</code>. * * @param duration the duration of the animation in milliseconds * @param startTime the synchronized start time in milliseconds * @see #run(int, double, Element) */ public void run(int duration, double startTime) { run(duration, startTime, null); }
animation.run(duration, parentElem);
public void fadeOutElement() { if (a != null) { a.cancel(); } a = new Animation() { protected void onUpdate(final double progress) { getElement().getStyle().setOpacity(1 - progress); } }; a.run(200); // ANIMATION_DURATION is private }
/** Fades in the element after the glass is already showing; call when the content is ready. */ public void fadeInElement() { if (a != null) { a.cancel(); } a = new Animation() { protected void onUpdate(final double progress) { getElement().getStyle().setOpacity(progress); } }; a.run(200); // ANIMATION_DURATION is private }
/** * Immediately run this animation. If the animation is already running, it * will be canceled first. * <p> * If the element is not <code>null</code>, the {@link #onUpdate(double)} * method might be called only if the element may be visible (generally left * at the appreciation of the browser). Otherwise, it will be called * unconditionally. * * @param duration the duration of the animation in milliseconds * @param element the element that visually bounds the entire animation */ public void run(int duration, Element element) { run(duration, Duration.currentTimeMillis(), element); }
/** * Immediately run this animation. If the animation is already running, it * will be canceled first. * <p> * If the element is not <code>null</code>, the {@link #onUpdate(double)} * method might be called only if the element may be visible (generally left * at the appreciation of the browser). Otherwise, it will be called * unconditionally. * * @param duration the duration of the animation in milliseconds * @param element the element that visually bounds the entire animation */ public void run(int duration, Element element) { run(duration, Duration.currentTimeMillis(), element); }
private void doRun(Element element, int duration, double startTime) { element.getStyle().setVisibility(Style.Visibility.VISIBLE); element.addClassName(isZoomIn ? ZOOM_IN_CLASS_NAME : ZOOM_OUT_CLASS_NAME); super.run(duration, startTime, element); }
}; }; a.run(ANIMATION_DURATION_MS); float d = ANIMATION_DURATION_MS / 1000; parentElement.getStyle().setProperty(
animation.run(duration, parentElem);
animation.run(duration, parentElem);