コード例 #1
0
  public void setCurrentUser(UIRosterEntry currentUser) {
    this.currentUser = currentUser;
    rl.setCurrentUser(currentUser);

    //		consoleLayout.addWidgetToID("show_items_navigation",
    // rl.getResourceListPanel().getListBrowseControl());
    consoleLayout.addWidgetToID("leftpod_middle_items", rl.getResourceTypeListPanel());

    FocusPanel fp = new FocusPanel();
    fp.add(rl.getLhsLink());
    fp.setWidth("100%");
    fp.addClickListener(rl.getListPanelLhsLinkClickListener());
    consoleLayout.addWidgetToID("share_button_wrapper", fp);

    FocusPanel fp1 = new FocusPanel();
    fp1.add(rl.getRhsLink());
    fp1.setWidth("100%");
    fp1.addClickListener(rl.getListPanelRhsLinkClickListener());
    consoleLayout.addWidgetToID("items_manage", fp1);
  }
コード例 #2
0
  public ConsoleMiddleLeftPanel(
      MainLayout consoleLayout, UIRosterEntry currentUser, UserCallbacks ucb) {
    this.currentUser = currentUser;
    this.consoleLayout = consoleLayout;

    ul = new UserRoster(currentUser, ucb);
    rl = new ResourceRoster(currentUser, ucb);
    // some resource call backs are required by the user
    ul.getUserList().setResCallBacks(rl.getResourceManager().getSharingController());

    consoleLayout.addWidgetToID(
        "participants_navigation", ul.getUsersListPanel().getListBrowseControl());

    ul.getUserList()
        .addListModelListener(
            new DefaultListModelListener() {
              public void listEntryAdded(ListEntry newEntry) {
                addParticpantsHeader(
                    UIStrings.getParticipantsLabel()
                        + " ("
                        + (ul.getUserList().getListSize())
                        + ")");
              }

              public void listEntryRemoved(ListEntry removedEntry) {
                addParticpantsHeader(
                    UIStrings.getParticipantsLabel()
                        + " ("
                        + (ul.getUserList().getListSize())
                        + ")");
              }
            });

    consoleLayout.addWidgetToID("leftpod_middle_users", ul.getListPanel());
    if (null != ul.getLhsLink()
        && ("true".equalsIgnoreCase(ConferenceGlobals.getShowInviteLinks()))) {
      FocusPanel fp = new FocusPanel();
      fp.add(ul.getLhsLink());
      fp.setWidth("100%");
      fp.addClickListener(ul.getListPanelLhsLinkClickListener());
      consoleLayout.addWidgetToID("users_invite", fp);
    } else {
      consoleLayout.setIDVisibility("users_invite_btn", false);
    }

    FocusPanel fp1 = new FocusPanel();
    fp1.add(ul.getRhsLink());
    fp1.setWidth("100%");
    fp1.addClickListener(ul.getListPanelRhsLinkClickListener());
    consoleLayout.addWidgetToID("participants_manage", fp1);

    if (!UIGlobals.isPresenter(currentUser)) {
      // hide the div of show items
      consoleLayout.setIDVisibility("main_showitems", false);
    }

    addResourcesHeader(UIStrings.getShowItemsLabel() + " (0)");
    rl.getResourceList()
        .addListModelListener(
            new DefaultListModelListener() {
              public void listEntryAdded(ListEntry newEntry) {
                addResourcesHeader(
                    UIStrings.getShowItemsLabel()
                        + " ("
                        + (rl.getResourceList().getListSize())
                        + ")");
              }

              public void listEntryRemoved(ListEntry removedEntry) {
                addResourcesHeader(
                    UIStrings.getShowItemsLabel()
                        + " ("
                        + (rl.getResourceList().getListSize())
                        + ")");
              }
            });
    setCurrentUser(currentUser);

    if (!UIGlobals.isActivePresenter(currentUser)) {
      consoleLayout.setIDVisibility("main_showitems", false);
    } else {
      consoleLayout.setIDVisibility("main_showitems", true);
    }
  }