Examples of PresenceInfo


Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

     * @param String callID
     * @return PresenceInfo the PresenceInfo associated with the callID.
     */
    public PresenceInfo getPresenceInfo(String callID) {
        synchronized (callIDMap) {
            PresenceInfo info = callIDMap.get(callID);

            if (info == null) {
                logger.fine("No presence info for callID " + callID);
                return null;
            }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

            JLabel renderer = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index,
                    isSelected, cellHasFocus);

            String usernameAlias = NameTagNode.getUsername(((String) value).replace(BYSTANDER_SYMBOL, ""));

            PresenceInfo info = pm.getAliasPresenceInfo(usernameAlias);

            if (info == null) {
                logger.warning("No presence info for " + usernameAlias + " value " + value);
                return renderer;
            }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

  usernameAlias = username;

        pm = PresenceManagerFactory.getPresenceManager(session);

  PresenceInfo pi = pm.getUserPresenceInfo(orbCell.getUsername());

  if (pi != null) {
      usernameAlias = pi.getUsernameAlias();
  }

  WonderlandIdentity userID = new WonderlandIdentity(username, usernameAlias, null);

  presenceInfo = new PresenceInfo(orbCell.getCellID(), null, userID, orbCell.getCallID());

  presenceInfo.setUsernameAlias(usernameAlias);

    pm.addPresenceManagerListener(this);

  if (playerWithVpCallID == null || playerWithVpCallID.equals(orbCell.getCallID())) {
      /*
       * It's a real call.  Use the actual callID and userID.
       */
      pm.addLocalPresenceInfo(presenceInfo);
      presenceInfoAdded = true;
  }

        nameTagComp = new NameTagComponent(orbCell, 0.15f);
        // SIZE should be 0.17
        orbCell.addComponent(nameTagComp);
        nameTag = nameTagComp.getRenderer(Cell.RendererType.RENDERER_JME);

        nameTagComp.setNameTag(EventType.CHANGE_NAME, username, usernameAlias);

  setBystanders(bystanders);

  if (orbCell.getPlayerWithVpCallID() != null) {
      PresenceInfo info = pm.getPresenceInfo(playerWithVpCallID);

            if (info == null) {
                logger.warning("Can't find presence info for CallID "
        + playerWithVpCallID);

                return;
            }

      logger.info("Attach orb " + orbCell.getCellID()
    + " player with " + playerWithVpCallID + " to " + info);

            channelComp.send(new OrbAttachMessage(orbCell.getCellID(), info.getCellID(), true));
  } else {
      /*
       * Ask the server to tell us if the orb is attached.
       */
      logger.fine("Asking server if orb is attached " + orbCell.getCellID());
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

  }

  if (message instanceof OrbAttachVirtualPlayerMessage) {
      OrbAttachVirtualPlayerMessage msg = (OrbAttachVirtualPlayerMessage) message;

      PresenceInfo info = pm.getPresenceInfo(msg.getHostCallID());

      if (info == null) {
    logger.warning("OrbAttachVirtualPlayerMessage, no presence info for callID "
        + msg.getHostCallID());
    return;
      }

      attachOrb(info.getCellID(), true);
      return;
   }
    }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

    public void setBystanders(String[] bystanderCallIDArray) {
  ArrayList<PresenceInfo> bystanders = new ArrayList();

  for (int i = 0; i < bystanderCallIDArray.length; i++) {
      PresenceInfo info = pm.getPresenceInfo(bystanderCallIDArray[i]);

      if (info == null) {
    System.out.println("No presence info for callID " + bystanderCallIDArray[i]);
    continue;
      }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

        new Thread(new Runnable() {

            public void run() {
                PresenceManager manager = PresenceManagerFactory.getPresenceManager(session.getPrimarySession());
                Cell cell = ClientContextJME.getViewManager().getPrimaryViewCell();
                PresenceInfo localPresenceInfo = manager.getPresenceInfo(cell.getCellID());
                while(localPresenceInfo==null) {
                    manager = PresenceManagerFactory.getPresenceManager(session.getPrimarySession());
                    cell = ClientContextJME.getViewManager().getPrimaryViewCell();
                    localPresenceInfo = manager.getPresenceInfo(cell.getCellID());
                }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

//            renderer.setForeground(Color.BLACK);
//        }
       
       
        String name = (String)value;
        PresenceInfo info = WonderlandUserList.INSTANCE.getAliasInfo(name);
        if(WonderlandUserList.INSTANCE.isInRange(info)) {
            renderer.setFont(inRangeFont);
            renderer.setForeground(Color.BLUE);
        } else {
            renderer.setFont(outOfRangeFont);
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

    public void handleOKButtonPressed() {
        PresenceInfo[] infos = model.getAllUsers();

        String alias = view.getAliasFieldText();

        PresenceInfo localInfo = model.getLocalPresenceInfo();
       
        for(PresenceInfo info: infos ) {
            if(info.getUsernameAlias().equals(alias)
                    || info.getUserID().getUsername().equals(alias)) {
                if(!localInfo.equals(info)) {
                    view.setStatusLabel(BUNDLE.getString("Alias_Used"));
                    return;
                }
            }
        }
       
        view.setStatusLabel("");

        localInfo.setUsernameAlias(view.getAliasFieldText());
        model.requestChangeUsernameAlias(localInfo.getUsernameAlias());
        userListPresenter.changeUsernameAlias(localInfo);
        setVisible(false);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

        if (selectedValues.length == 0) {
            view.updateWidgetsForNoSelectedValues();
        } else if (selectedValues.length == 1) {
            String username = NameTagNode.getUsername((String) view.getSelectedEntries()[0]);
            PresenceInfo info = model.getAliasInfo(username);
           
           
            float v1 = presenceControls.getVolume(info);
            int volume = model.getVolumeConverter().getVolume(v1);
           
View Full Code Here

Examples of org.jdesktop.wonderland.modules.presencemanager.common.PresenceInfo

        ArrayList<PresenceInfo> usersToInvite = new ArrayList();

        for (Object selectedValue : view.getSelectedEntries()) {
            String username = NameTagNode.getUsername((String) selectedValue);

            PresenceInfo info = model.getAliasInfo(username);

            if (info == null) {
                LOGGER.warning("no PresenceInfo for " + username);
                continue;
            }

            if (info.equals(presenceInfo)) {
                //I'm the caller and will be added automatically
                continue;
            }

            usersToInvite.add(info);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.