org.jivesoftware.spark.ui
Class RosterDialog

java.lang.Object
  extended by org.jivesoftware.spark.ui.RosterDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener

public class RosterDialog
extends java.lang.Object
implements java.beans.PropertyChangeListener, java.awt.event.ActionListener

The RosterDialog is used to add new users to the users XMPP Roster.


Constructor Summary
RosterDialog()
          Create a new instance of RosterDialog.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 org.jivesoftware.smack.RosterEntry addEntry(java.lang.String jid, java.lang.String nickname, java.lang.String group)
          Adds a new entry to the users Roster.
 java.util.List<org.jivesoftware.spark.ui.RosterDialog.AccountItem> getAccounts()
           
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void setDefaultGroup(ContactGroup contactGroup)
          Sets the default ContactGroup to display in the combo box.
 void setDefaultJID(java.lang.String jid)
          Sets the default jid to show in the jid field.
 void setDefaultNickname(java.lang.String nickname)
          Sets the default nickname to show in the nickname field.
 void showRosterDialog()
          Display the RosterDialog using the MainWindow as the parent.
 void showRosterDialog(javax.swing.JFrame parent)
          Display the RosterDialog using a parent container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RosterDialog

public RosterDialog()
Create a new instance of RosterDialog.

Method Detail

setDefaultGroup

public void setDefaultGroup(ContactGroup contactGroup)
Sets the default ContactGroup to display in the combo box.

Parameters:
contactGroup - the default ContactGroup.

setDefaultJID

public void setDefaultJID(java.lang.String jid)
Sets the default jid to show in the jid field.

Parameters:
jid - the jid.

setDefaultNickname

public void setDefaultNickname(java.lang.String nickname)
Sets the default nickname to show in the nickname field.

Parameters:
nickname - the nickname.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

showRosterDialog

public void showRosterDialog(javax.swing.JFrame parent)
Display the RosterDialog using a parent container.

Parameters:
parent - the parent Frame.

showRosterDialog

public void showRosterDialog()
Display the RosterDialog using the MainWindow as the parent.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

addEntry

public org.jivesoftware.smack.RosterEntry addEntry(java.lang.String jid,
                                                   java.lang.String nickname,
                                                   java.lang.String group)
Adds a new entry to the users Roster.

Parameters:
jid - the jid.
nickname - the nickname.
group - the contact group.
Returns:
the new RosterEntry.

getAccounts

public java.util.List<org.jivesoftware.spark.ui.RosterDialog.AccountItem> getAccounts()