`
vakin.jiang
  • 浏览: 145228 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

GWT DeferredCommand类介绍

GWT 
阅读更多
API注释:This class allows you to execute code after all currently pending event handlers have completed, using the {@link #addCommand(Command)} or {@link #addCommand(IncrementalCommand)} methods. This is useful when you need to execute code outside of the context of the current stack.
这个类允许你在所有等待事件程序加载完成执行指定代码,通过使用(addCommand(Command))或(addCommand(IncrementalCommand))方法。您在非当前堆栈上下文中运行代码也是有效的。

以下代码,就是在所有页面加载完毕,隐藏ID=divQueryByname的DIV层。
DeferredCommand.addCommand(new Command() {
			public void execute() {
				DOM.setStyleAttribute(DOM.getElementById("divQueryByname"),"display", "none");
			}
		});
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics