org.zkoss.zk.ui.Desktop.addListener()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(211)

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

Desktop.addListener介绍

[英]Adds a listener.

Note: if the listener is added twice, it will be invoked twice when a corresponding event occurs.
[中]添加一个侦听器。
注意:如果两次添加侦听器,则在发生相应事件时将调用它两次。

代码示例

代码示例来源:origin: org.zkoss.zk/zk

public void init(Desktop desktop, Object request) {
    desktop.addListener(new UploadInfoService());
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.reporting

public Init() {
  Execution exec = Executions.getCurrent();
  exec.getDesktop().addListener(this);
}

代码示例来源:origin: org.zkoss.zk/zkbind

public void didActivate(Component comp) {
  if (_rootComp.equals(comp)) {
    //zk 1442, don't do multiple subscribed if didActivate is called every request (e.x. jboss5)
    initQueue();
    if (_deferredActivator == null) {
      //defer activation to execution only for the first didActivate when failover
      comp.getDesktop().addListener(_deferredActivator = new DeferredActivator());
    }
  }
}

相关文章