Esempio n. 1
0
  private void leave() {
    session.send(client, new VoiceChatLeaveMessage(group, myPresenceInfo, client.getCOSName()));
    addHUDComponent.setVisible(false);
    addHUDPanelList.remove(this);

    if (addModeAddHUDComponent != null) {
      addModeAddHUDComponent.setVisible(false);
    }

    CallAnimator.stopCallAnswerAnimation(client);
  }
Esempio n. 2
0
  private void actionButtonActionPerformed() {
    if (userMode) {
      addUserPanel.inviteUsers();
    } else {
      /*
       * Phone Mode
       */
      String name = addPhoneUserPanel.getPhoneName();

      PresenceInfo[] info = pm.getAllUsers();

      for (int i = 0; i < info.length; i++) {
        if (info[i].getUsernameAlias().equals(name)
            || info[i].getUserID().getUsername().equals(name)) {

          addPhoneUserPanel.setStatusMessage(BUNDLE.getString("Name_Used"));
          return;
        }
      }

      addUserPanel.callUser(name, addPhoneUserPanel.getPhoneNumber());

      if (mode.equals(Mode.ADD)) {
        addHUDComponent.setVisible(false);
        addHUDComponent.setClosed();
      }
    }

    if (mode.equals(Mode.INITIATE)) {
      setMode(Mode.IN_PROGRESS);
    }
  }
Esempio n. 3
0
  private void addButtonActionPerformed(ActionEvent e) {
    AddHUDPanel addHUDPanel =
        new AddHUDPanel(client, session, myPresenceInfo, myPresenceInfo, group, Mode.ADD);

    addHUDPanel.setPrivacy(addUserPanel.getPrivacy());

    HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main");
    addModeAddHUDComponent = mainHUD.createComponent(addHUDPanel);
    addHUDPanel.setHUDComponent(addModeAddHUDComponent);

    addModeAddHUDComponent.setName("Add to Voice Chat");

    addHUDPanel.setPreferredLocation(Layout.EAST);

    mainHUD.addComponent(addModeAddHUDComponent);

    inProgressButtonPanel.setEnabledAddButton(false);

    addModeAddHUDComponent.addEventListener(
        new HUDEventListener() {

          public void HUDObjectChanged(HUDEvent e) {
            if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
              inProgressButtonPanel.setEnabledAddButton(true);
            }
          }
        });

    PropertyChangeListener plistener =
        new PropertyChangeListener() {

          public void propertyChange(PropertyChangeEvent pe) {
            String name = pe.getPropertyName();
            if (name.equals("ok") || name.equals("cancel")) {
              addModeAddHUDComponent.setVisible(false);
            }
          }
        };

    addHUDPanel.addPropertyChangeListener(plistener);
    addModeAddHUDComponent.setVisible(true);
  }
Esempio n. 4
0
 private void cancelButtonActionPerformed(ActionEvent e) {
   addHUDComponent.setVisible(false);
 }