Example #1
0
  public AddHUDPanel(
      AudioManagerClient client,
      WonderlandSession session,
      PresenceInfo myPresenceInfo,
      PresenceInfo caller,
      String group,
      Mode mode) {

    this.client = client;
    this.session = session;
    this.myPresenceInfo = myPresenceInfo;
    this.caller = caller;

    if (group == null) {
      group = caller.getUserID().getUsername() + "-" + groupNumber++;
    }

    this.group = group;

    // System.out.println("NEW HUD For " + group);

    initComponents();

    setMode(mode);

    setEnabledInviteButton();
    setEnabledActionButton();

    pm = PresenceManagerFactory.getPresenceManager(session);

    addHUDPanelList.add(this);

    client.addDisconnectListener(this);
  }
Example #2
0
  private void addUserListValueChanged(ListSelectionEvent e) {
    ArrayList<PresenceInfo> selectedValues = addUserPanel.getSelectedValues();

    setEnabledInviteButton();
    setEnabledActionButton();

    if (inProgressButtonPanel == null) {
      return;
    }

    for (PresenceInfo info : selectedValues) {
      if (info.getClientID() != null) {
        if (inProgressButtonPanel != null) {
          inProgressButtonPanel.setEnabledHangUpButton(false);
        }
        return;
      }
    }

    inProgressButtonPanel.setEnabledHangUpButton(true);
  }