org.jivesoftware.spark.ui
Interface ContactItemHandler

All Known Implementing Classes:
GatewayPlugin

public interface ContactItemHandler

The ContactItemHandler allows users to customize the actions that take place within a ContactItem within a users presence changes or the item is double clicked.


Method Summary
 javax.swing.Icon getIcon(java.lang.String jid)
          Return the icon used for particular presence.
 javax.swing.Icon getTabIcon(org.jivesoftware.smack.packet.Presence presence)
          Return the icon to use on the chat room tab.
 boolean handleDoubleClick(ContactItem item)
          The ContactItem has been double-clicked by the user.
 boolean handlePresence(ContactItem item, org.jivesoftware.smack.packet.Presence presence)
          The users presence has been changed.
 

Method Detail

handlePresence

boolean handlePresence(ContactItem item,
                       org.jivesoftware.smack.packet.Presence presence)
The users presence has been changed.

Parameters:
item - the contact item.
presence - the users new presence.
Returns:
true if the presence was handled.

getIcon

javax.swing.Icon getIcon(java.lang.String jid)
Return the icon used for particular presence.

Parameters:
jid - the users jid.
Returns:
the icon, if any. null may be returned.

getTabIcon

javax.swing.Icon getTabIcon(org.jivesoftware.smack.packet.Presence presence)
Return the icon to use on the chat room tab.

Parameters:
presence - the presence of the user.
Returns:
the icon to use.

handleDoubleClick

boolean handleDoubleClick(ContactItem item)
The ContactItem has been double-clicked by the user.

Parameters:
item - the ContactItem to handle.
Returns:
true if you wish to handle the double-click event.