コード例 #1
0
  public DefaultDesktop() {
    super();
    dashboardController = new DashboardController();
    sideController = new DashboardController();
    helpController = new HelpController();

    m_desktop = AEnv.getDesktop();
    m_desktop.addListener(this);
    // subscribing to broadcast event
    bindEventManager();
    ZKBroadCastManager.getBroadCastMgr();

    EventQueue<Event> queue = EventQueues.lookup(ACTIVITIES_EVENT_QUEUE, true);
    queue.subscribe(this);
  }
コード例 #2
0
ファイル: DesktopEventQueue.java プロジェクト: huangnoah/zk
    public void run() {
      try {
        _inf.listener.onEvent(_event);

        if (_inf.callback != null || _pendingEvents != null) {
          Executions.activate(_desktop);
          try {
            if (_pendingEvents != null) for (T evt : _pendingEvents) _que.publish(evt);

            if (_inf.callback != null) _inf.callback.onEvent(_event);
          } finally {
            Executions.deactivate(_desktop);
          }
        }
      } catch (DesktopUnavailableException ex) {
        log.warn("", ex);
        // ignore
      } catch (Throwable ex) {
        log.error("", ex);
        throw UiException.Aide.wrap(ex);
      }
    }