edu.ou.kmi.buddyspace.gui
Class BSRosterTreeView.BSJIDItem

java.lang.Object
  |
  +--edu.ou.kmi.buddyspace.gui.BSRosterTreeView.BSJIDItem
Enclosing class:
BSRosterTreeView

public class BSRosterTreeView.BSJIDItem
extends java.lang.Object

BSJIDItem holds information needed for displaying a jid in tree. This record appears in the tree only once for particular jid. It includes information about resources and about all tree nodes which are diplayed for this jid.


Field Summary
protected  boolean message
           
protected  java.util.Vector nodes
           
protected  BSPresenceInfo pi
           
protected  java.util.Vector resources
           
protected  RosterItem ri
           
 
Constructor Summary
BSRosterTreeView.BSJIDItem(RosterItem ri, BSPresenceInfo pi, boolean messageWaiting)
          Constructor
 
Method Summary
 void addNode(javax.swing.tree.DefaultMutableTreeNode n)
          Adds tree node into hashtable
 java.lang.String getFriendlyName()
          Returns friendly name of JID
 java.lang.String getFriendlyShow()
          Returns presence show
 java.lang.String getHashString()
          Returns hash code used by tree
 JID getJID()
          Returns JID
 java.lang.String getShow()
          Returns presence show
 java.lang.String getStatus()
          Returns presence status
 java.lang.String getSubscriptionType()
          Returns subscription type
 boolean isMessageWaiting()
          Returns if there is an unread message for this JID
 boolean isMyself()
          Returns if the node represents currently logged user
 boolean isOnline()
          Returns if node is available / on-line
 java.lang.String toString()
          Returns text displayed in tree
 void updateMessageWaiting()
          Updates inner flag for unread messages
 void updateResources()
          Updates information about resources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ri

protected RosterItem ri

pi

protected BSPresenceInfo pi

message

protected boolean message

nodes

protected java.util.Vector nodes

resources

protected java.util.Vector resources
Constructor Detail

BSRosterTreeView.BSJIDItem

public BSRosterTreeView.BSJIDItem(RosterItem ri,
                                  BSPresenceInfo pi,
                                  boolean messageWaiting)
Constructor

Method Detail

addNode

public void addNode(javax.swing.tree.DefaultMutableTreeNode n)
Adds tree node into hashtable


updateResources

public void updateResources()
Updates information about resources


toString

public java.lang.String toString()
Returns text displayed in tree

Overrides:
toString in class java.lang.Object

getHashString

public java.lang.String getHashString()
Returns hash code used by tree


getJID

public JID getJID()
Returns JID


isOnline

public boolean isOnline()
Returns if node is available / on-line


getFriendlyName

public java.lang.String getFriendlyName()
Returns friendly name of JID


getSubscriptionType

public java.lang.String getSubscriptionType()
Returns subscription type


getShow

public java.lang.String getShow()
Returns presence show


getFriendlyShow

public java.lang.String getFriendlyShow()
Returns presence show


getStatus

public java.lang.String getStatus()
Returns presence status


isMyself

public boolean isMyself()
Returns if the node represents currently logged user


updateMessageWaiting

public void updateMessageWaiting()
Updates inner flag for unread messages


isMessageWaiting

public boolean isMessageWaiting()
Returns if there is an unread message for this JID