本文整理了Java中com.google.gwt.animation.client.Animation
类的一些代码示例,展示了Animation
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation
类的具体详情如下:
包路径:com.google.gwt.animation.client.Animation
类名称:Animation
[英]An Animation is a continuous event that updates progressively over time at a non-fixed frame rate.
[中]动画是以非固定帧速率随时间逐渐更新的连续事件。
代码示例来源:origin: com.google.gwt/gwt-servlet
onUpdate(interpolate(progress));
return isRunning(curRunId); // Check if this run was canceled.
onStart();
if (!isRunning(curRunId)) {
onComplete();
return false;
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* 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);
}
代码示例来源: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.google.gwt/gwt-servlet
/**
* Called immediately before the animation starts.
*/
protected void onStart() {
onUpdate(interpolate(0.0));
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void onStart() {
super.onStart();
if (opening) {
curPanel.contentWrapper.setVisible(true);
// Special treatment on the visible case to ensure LazyPanel works
curPanel.getContent().setVisible(true);
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Called immediately after the animation is canceled. The default
* implementation of this method calls {@link #onComplete()} only if the
* animation has actually started running.
*/
protected void onCancel() {
if (wasStarted) {
onComplete();
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
animation.cancel();
animation.run(duration, parentElem);
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Immediately cancel this animation. If the animation is running or is
* scheduled to run, {@link #onCancel()} will be called.
*/
public void cancel() {
// Ignore if the animation is not currently running.
if (!isRunning) {
return;
}
// Reset the state.
wasStarted = isStarted; // Used by onCancel.
element = null;
isRunning = false;
isStarted = false;
// Cancel the animation request.
if (requestHandle != null) {
requestHandle.cancel();
requestHandle = null;
}
onCancel();
}
代码示例来源:origin: org.uberfire/uberfire-widgets-commons
@Override
public double interpolate(double progress) {
return super.interpolate(progress);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void onStart() {
offsetHeight = curPanel.getOffsetHeight();
offsetWidth = curPanel.getOffsetWidth();
curPanel.getElement().getStyle().setProperty("overflow", "hidden");
super.onStart();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Called immediately after the animation is canceled. The default
* implementation of this method calls {@link #onComplete()} only if the
* animation has actually started running.
*/
protected void onCancel() {
if (wasStarted) {
onComplete();
}
}
代码示例来源: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.google.gwt/gwt-servlet
/**
* Called immediately after the animation completes.
*/
protected void onComplete() {
onUpdate(interpolate(1.0));
}
代码示例来源:origin: org.uberfire/uberfire-widgets-commons
@Override
public void onCancel() {
super.onCancel();
}
代码示例来源:origin: kiegroup/appformer
@Override
public double interpolate(double progress) {
return super.interpolate(progress);
}
代码示例来源:origin: net.wetheinter/gwt-user
onUpdate(interpolate(progress));
return isRunning(curRunId); // Check if this run was canceled.
onStart();
if (!isRunning(curRunId)) {
onComplete();
return false;
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void onStart() {
scrollHeight = 0;
// If the TreeItem is already open, we can get its scrollHeight
// immediately.
if (!opening) {
scrollHeight = curItem.childSpanElem.getScrollHeight();
}
curItem.childSpanElem.getStyle().setProperty("overflow", "hidden");
// If the TreeItem is already open, onStart will set its height to its
// natural height. If the TreeItem is currently closed, onStart will set
// its height to 1px (see onUpdate below), and then we make the TreeItem
// visible so we can get its correct scrollHeight.
super.onStart();
// If the TreeItem is currently closed, we need to make it visible before
// we can get its height.
if (opening) {
UIObject.setVisible(curItem.childSpanElem, true);
scrollHeight = curItem.childSpanElem.getScrollHeight();
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Called immediately after the animation is canceled. The default
* implementation of this method calls {@link #onComplete()} only if the
* animation has actually started running.
*/
protected void onCancel() {
if (wasStarted) {
onComplete();
}
}
代码示例来源: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.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>
* 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);
}
内容来源于网络,如有侵权,请联系作者删除!