コード例 #1
0
  public MailfolderCanvas() {

    super();
    setShowResizeBar(true);

    SectionStackSection section = new SectionStackSection();
    section.setCanCollapse(false);
    section.setExpanded(true);
    section.setResizeable(true);

    createTree();
    section.setItems(this.tree);

    createToolbar(section);
    createContextMenu();

    setSections(section);

    EventBroker.get().addFoldersReloadListener(this);
    EventBroker.get().addMessagesChangedListener(this);

    addDrawHandler(
        new DrawHandler() {

          public void onDraw(DrawEvent event) {

            EventBroker.get().fireFoldersReload();
          }
        });
  }
コード例 #2
0
    public void onSelectionChanged(SelectionEvent event) {

      TreeNode selectedNode = (TreeNode) event.getRecord();
      IGWTFolder mailFolder = GWTUtil.getGwtFolder(selectedNode);
      if (!selectedNode.equals(currentTreeNode)) {
        currentTreeNode = selectedNode;
        prepareActions(selectedNode);
        changeToolbarButtonStatus(mailFolder);
        if (mailFolder instanceof GWTMailFolder) {
          GWTSessionManager.get().setCurrentMailFolder((GWTMailFolder) mailFolder);
          EventBroker.get().fireFolderSelected((GWTMailFolder) mailFolder);
        }
      }
    }