com.google.gwt.animation.client.Animation.cancel()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中com.google.gwt.animation.client.Animation.cancel()方法的一些代码示例,展示了Animation.cancel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.cancel()方法的具体详情如下:
包路径:com.google.gwt.animation.client.Animation
类名称:Animation
方法名:cancel

Animation.cancel介绍

[英]Immediately cancel this animation. If the animation is running or is scheduled to run, #onCancel() will be called.
[中]立即取消此动画。如果动画正在运行或计划运行,将调用#onCancel()。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * 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>
 * 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 startTime the synchronized start time in milliseconds
 * @param element the element that visually bounds the entire animation
 */
public void run(int duration, double startTime, Element element) {
 // Cancel the animation if it is running
 cancel();
 // Save the duration and startTime
 isRunning = true;
 isStarted = false;
 this.duration = duration;
 this.startTime = startTime;
 this.element = element;
 ++runId;
 // Execute the first callback.
 callback.execute(Duration.currentTimeMillis());
}

代码示例来源:origin: com.extjs/gxt

/**
 * Cancels the effect.
 */
public void cancel() {
 animation.cancel();
}

代码示例来源:origin: stephenh/tessell

@Override
public void cancel() {
 super.cancel();
}

代码示例来源:origin: com.google.gwt/gwt-servlet

animation.cancel();

代码示例来源:origin: stephenh/tessell

/** 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
}

代码示例来源:origin: com.googlecode.gwtquery/gwtquery

public void cancel(Element e) {
 Animation anim = (Animation) data(e, GQAnimation.ACTUAL_ANIMATION, null);
 if (anim != null) {
  anim.cancel();
 }
}

代码示例来源:origin: stephenh/tessell

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
}

代码示例来源:origin: com.googlecode.gwtquery/gwtquery

public void cancel() {
  // avoid memory leak (issue #132)
  $(e).removeData(ACTUAL_ANIMATION);
  super.cancel();
 }
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * 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>
 * 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 startTime the synchronized start time in milliseconds
 * @param element the element that visually bounds the entire animation
 */
public void run(int duration, double startTime, Element element) {
 // Cancel the animation if it is running
 cancel();
 // Save the duration and startTime
 isRunning = true;
 isStarted = false;
 this.duration = duration;
 this.startTime = startTime;
 this.element = element;
 ++runId;
 // Execute the first callback.
 callback.execute(Duration.currentTimeMillis());
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * 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>
 * 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 startTime the synchronized start time in milliseconds
 * @param element the element that visually bounds the entire animation
 */
public void run(int duration, double startTime, Element element) {
 // Cancel the animation if it is running
 cancel();
 // Save the duration and startTime
 isRunning = true;
 isStarted = false;
 this.duration = duration;
 this.startTime = startTime;
 this.element = element;
 ++runId;
 // Execute the first callback.
 callback.execute(Duration.currentTimeMillis());
}

代码示例来源:origin: net.wetheinter/gwt-user

animation.cancel();

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

animation.cancel();

相关文章