@Override public void doRun() { staticItem.updatePresenceIcon(staticItem.getPresence()); staticGroup.fireContactGroupUpdated(); } }, timeToRun);
/** * Updates the presence of one individual based on their JID. * * @param presence the users presence. * @param entry the roster entry being updated. * @param bareJID the bare jid of the user. */ private void updateContactItemsPresence(Presence presence, RosterEntry entry, BareJid bareJID) { for (ContactGroup group : groupList) { ContactItem item = group.getContactItemByJID(bareJID); if (item != null) { if (group == offlineGroup) { changeOfflineToOnline(bareJID, entry, presence); continue; } item.setPresence(presence); group.fireContactGroupUpdated(); } } }
/** * Set an Icon for all ContactItems that match the given jid. * * @param jid the users jid. * @param icon the icon to use. */ public void setIconFor(Jid jid, Icon icon) { for (ContactGroup group : getContactGroups()) { ContactItem item = group.getContactItemByJID(jid.asBareJid()); if (item != null) { item.setIcon(icon); group.fireContactGroupUpdated(); } } }
/** * Sets the default settings for a ContactItem. * * @param jid the users jid. */ public void useDefaults(Jid jid) { for (ContactGroup group : getContactGroups()) { ContactItem item = group.getContactItemByJID(jid.asBareJid()); if (item != null) { item.updatePresenceIcon(item.getPresence()); group.fireContactGroupUpdated(); } } }
public void clientReconnected() { switch (localPreferences.getReconnectPanelType()) { case 0: workspace.changeCardLayout(Workspace.WORKSPACE_PANE); break; case 1: mainPanel.remove(_reconnectpanelsmall); break; case 2: SwingWorker sw = new SwingWorker() { @Override public Object construct() { _reconnectpanelicon.remove(); _reconnectpanelicon.getPanel().revalidate(); return 42; } }; sw.start(); break; } offlineGroup.fireContactGroupUpdated(); buildContactList(); final Presence myPresence = SparkManager.getWorkspace().getStatusBar() .getPresence(); SparkManager.getSessionManager().changePresence(myPresence); }
@Override public void doRun() { // Check to see if the user is offline, if so, move them to the offline group. Presence userPresence = PresenceManager.getPresence(bareJID); if (userPresence.isAvailable()) { return; } item.setPresence(presence); // Check for ContactItemHandler. group.removeContactItem(item); checkGroup(group); if (offlineGroup.getContactItemByJID(item.getJid()) == null) { moveToOffline(item); offlineGroup.fireContactGroupUpdated(); } } }, timeToRun);
item.showUserGoingOfflineOnline(); item.setIcon(SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON)); group.fireContactGroupUpdated();
contactGroup.fireContactGroupUpdated(); return true; contactGroup.fireContactGroupUpdated(); //Updating group title return true;
contactGroup.fireContactGroupUpdated(); return true; contactGroup.fireContactGroupUpdated(); //Updating group title return true;
if (presence.isAvailable()) { contactGroup.addContactItem(item); contactGroup.fireContactGroupUpdated(); offlineGroup.fireContactGroupUpdated(); contactGroup.fireContactGroupUpdated(); unfiledGrp.fireContactGroupUpdated(); unfiledGrp.setVisible(true);
contactGroup.fireContactGroupUpdated(); //Updating group title
changeContact.updatePresenceIcon(changeContact.getPresence()); toggleGroupVisibility(staticContactGroup.getGroupName(), true); staticContactGroup.fireContactGroupUpdated(); contactItem.setAvailable(true); unfiledGrp.setVisible(true); unfiledGrp.fireContactGroupUpdated(); unfiledGrp.addContactItem(contactItem); contactItem.updatePresenceIcon(contactItem.getPresence()); unfiledGrp.fireContactGroupUpdated();
contactGroup.fireContactGroupUpdated(); //Updating group title
offlineGroup.fireContactGroupUpdated();
if (transport != null) { handlePresence(contactItem, presence); contactGroup.fireContactGroupUpdated();