当前位置: 首页>>代码示例>>Java>>正文


Java Animation类代码示例

本文整理汇总了Java中com.google.gwt.animation.client.Animation的典型用法代码示例。如果您正苦于以下问题:Java Animation类的具体用法?Java Animation怎么用?Java Animation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Animation类属于com.google.gwt.animation.client包,在下文中一共展示了Animation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hideLoadingPopup

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
private void hideLoadingPopup() {
    final Element e = RootPanel.get( "loading" ).getElement();

    new Animation() {

        @Override
        protected void onUpdate( double progress ) {
            e.getStyle().setOpacity( 1.0 - progress );
        }

        @Override
        protected void onComplete() {
            e.getStyle().setVisibility( Style.Visibility.HIDDEN );
        }
    }.run( 500 );
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:17,代码来源:TeiidWebUiEntryPoint.java

示例2: hideLoadingPopup

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
private void hideLoadingPopup() {
    final Element e = RootPanel.get("loading").getElement();

    new Animation() {

        @Override
        protected void onUpdate( double progress ) {
            e.getStyle().setOpacity( 1.0 - progress );
        }

        @Override
        protected void onComplete() {
            e.getStyle().setDisplay(Style.Display.NONE);
        }
    }.run(500);
}
 
开发者ID:kiegroup,项目名称:kie-docker-ci,代码行数:17,代码来源:DockerUIEntryPoint.java

示例3: hideLoadingPopup

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
private void hideLoadingPopup() {
    final Element e = RootPanel.get("loading").getElement();

    new Animation() {

        @Override
        protected void onUpdate(double progress) {
            e.getStyle().setOpacity(1.0 - progress);
        }

        @Override
        protected void onComplete() {
            e.getStyle().setVisibility(Style.Visibility.HIDDEN);
        }
    }.run(500);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:ShowcaseEntryPoint.java

示例4: hideLoadingPopup

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
private void hideLoadingPopup() {
    final Element e = RootPanel.get("loading").getElement();

    new Animation() {

        @Override
        protected void onUpdate( double progress ) {
            e.getStyle().setOpacity( 1.0 - progress );
        }

        @Override
        protected void onComplete() {
            e.getStyle().setVisibility( Style.Visibility.HIDDEN );
        }
    }.run( 500 );
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:ShowcaseEntryPoint.java

示例5: limitArea

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
private void limitArea() {
	reportTextArea.getElement().setAttribute("maxlength", String.valueOf(MAX_REPORT_LENGTH));
	reportTextArea.addKeyPressHandler(new KeyPressHandler() {
		@Override
		public void onKeyPress(KeyPressEvent event) {
			int size = reportTextArea.getText().length();
			textLength.setText(String.valueOf(MAX_REPORT_LENGTH-size));
			
			if(size == MAX_REPORT_LENGTH) {
				Animation a = new Animation() {
					@Override
					protected void onUpdate(double progress) {
						String rgbvalue = "rgb(" + ((int)((1-progress)*255)) + ",0,0)";
						textLengthPanel.getElement().getStyle().setProperty("color", rgbvalue);
					}
				};
				a.run(1000);
			}
		}
	});
}
 
开发者ID:jkonert,项目名称:socom,代码行数:22,代码来源:ReportPopup.java

示例6: onClickMagnifier

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
@UiHandler("magnifier")
public void onClickMagnifier(ClickEvent event)
{
	final Style bgstyle = fullscreen.getStyle();
	final Style bgimgcontainerstyle = fullscreenimgcontainer.getStyle();
	final Style bgimgstyle = fullscreenimg.getElement().getStyle();
	
	bgstyle.setVisibility(Visibility.VISIBLE);
	bgimgcontainerstyle.setVisibility(Visibility.VISIBLE);
	bgimgstyle.setVisibility(Visibility.VISIBLE);
	if(bgimgstyle.getBackgroundImage() == null || bgimgstyle.getBackgroundImage().trim().isEmpty())
	{
		bgimgstyle.setProperty("background",
			"url(\"./data/influence_data/" + answer.getPath() + "\") no-repeat scroll center center / contain rgba(0,0,0,0)");
		bgimgstyle.setWidth(100, Unit.PCT);
		bgimgstyle.setHeight(90, Unit.PCT);
	}
	
	new Animation() {
		@Override
		protected void onUpdate(double progress) {
			bgstyle.setOpacity(Math.min(0.9, progress*2));
			bgimgstyle.setOpacity(Math.max(0, progress*2-0.8));
		}
	}.run(1600);
}
 
开发者ID:jkonert,项目名称:socom,代码行数:27,代码来源:InfluenceAnswerImageView.java

示例7: onFullscreenImgClicked

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
@UiHandler("fullscreenimg")
public void onFullscreenImgClicked(ClickEvent e) {
	final Style bgstyle = fullscreen.getStyle();
	final Style bgimgstyle = fullscreenimg.getElement().getStyle();
	new Animation() {
		@Override
		protected void onUpdate(double progress) {
			bgstyle.setOpacity(1-progress);
			bgimgstyle.setOpacity(Math.max(0, 1-progress*2.5));
			if(progress == 1) 
			{
				fullscreen.getStyle().setVisibility(Visibility.HIDDEN);
				fullscreenimg.getElement().getStyle().setVisibility(Visibility.HIDDEN);		
				fullscreenimgcontainer.getStyle().setVisibility(Visibility.HIDDEN);
			}
		}
	}.run(1000);
}
 
开发者ID:jkonert,项目名称:socom,代码行数:19,代码来源:InfluenceAnswerImageView.java

示例8: hideLoadingPopup

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
@AfterInitialization
public void hideLoadingPopup() {
    @SuppressWarnings("GwtToHtmlReferences")
    final Element e = RootPanel.get("loading").getElement();

    new Animation() {
        @Override
        protected void onUpdate(double progress) {
            e.getStyle().setOpacity(1.0 - progress);
        }

        @Override
        protected void onComplete() {
            e.getStyle().setVisibility(Style.Visibility.HIDDEN);
        }
    }.run(500);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:18,代码来源:DefaultWorkbenchEntryPoint.java

示例9: show

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
public static void show(String text, int delayMillis, final boolean doReload){
	final PopupPanel notificationPopup = new PopupPanel(false);
	final Label label = new Label(text);
	notificationPopup.setWidget(label);
	notificationPopup.setPopupPosition(50, 20);
	notificationPopup.setVisible(true);
	notificationPopup.show();

	Timer t = new Timer() {
		@Override
		public void run() {
			Animation a = new Animation() {
				@Override
				protected void onUpdate(double progress) {
					notificationPopup.getElement().getStyle().setProperty("opacity", String.valueOf(1-progress));
					if(progress == 1) {
						notificationPopup.hide();
						if(doReload)
							Location.reload();
					}
				}
			};
			a.run(500);
		}
	};
	
	t.schedule(delayMillis);
}
 
开发者ID:jkonert,项目名称:socom,代码行数:29,代码来源:ShortNotification.java

示例10: animate

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
@Override
public void animate() {
	Animation a = new Animation() {
		@Override
		protected void onUpdate(double progress) {
			Composite c = InfluenceAnswerTextView.this;
			c.getElement().getStyle().setProperty("opacity", String.valueOf(progress));
		}
	};
	a.run(3000);
}
 
开发者ID:jkonert,项目名称:socom,代码行数:12,代码来源:InfluenceAnswerTextView.java

示例11: animate

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
@Override
public void animate() {
	Animation a = new Animation() {
		@Override
		protected void onUpdate(double progress) {
			Composite c = InfluenceAnswerAudioView.this;
			c.getElement().getStyle().setProperty("opacity", String.valueOf(progress));
		}
	};
	a.run(3000);
}
 
开发者ID:jkonert,项目名称:socom,代码行数:12,代码来源:InfluenceAnswerAudioView.java

示例12: hideLoadingPopup

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
private void hideLoadingPopup() {
    final Element e = RootPanel.get("loading").getElement();
    new Animation() {

        @Override
        protected void onUpdate(double progress) {
            e.getStyle().setOpacity(1.0 - progress);
        }

        @Override
        protected void onComplete() {
            e.getStyle().setVisibility(Style.Visibility.HIDDEN);
        }
    }.run(500);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:16,代码来源:ShowcaseEntryPoint.java

示例13: animatedRedraw

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
/**
 * Redraw the canvas with HTML5 animation
 * 
 * @param old_width
 *            width of viewport in base coordinates before any zoom
 *            operations
 * @param center
 *            optional (x, y) center coordinates. Coordinates are relative
 *            to the HTML5 canvas in the broswer.
 */
public void animatedRedraw(int old_width, int... center) {
    CanvasElement canv = viewport_context.getCanvas();

    int x = center.length == 2 ? center[0] : canv.getWidth() / 2;
    int y = center.length == 2 ? center[1] : canv.getHeight() / 2;

    Animation anim = new ZoomAnimation(viewport_context, canv, cb,
            old_width, area.viewportBaseWidth(), x, y);
    anim.run(400);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:21,代码来源:DisplayAreaView.java

示例14: getAutoCloseAnimation

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
/**
 * @return the autoCloseAnimation
 */
public Animation getAutoCloseAnimation() {
    return autoCloseAnimation;
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:7,代码来源:Notification.java

示例15: setAutoCloseAnimation

import com.google.gwt.animation.client.Animation; //导入依赖的package包/类
/**
 * @param autoCloseAnimation the autoCloseAnimation to set
 */
public void setAutoCloseAnimation(Animation autoCloseAnimation) {
    this.autoCloseAnimation = autoCloseAnimation;
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:7,代码来源:Notification.java


注:本文中的com.google.gwt.animation.client.Animation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。