SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist.addcontact
Class AddContactWizardPage1

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.contactlist.addcontact.AddContactWizardPage1
All Implemented Interfaces:
EventListener, ListSelectionListener, WizardPage

public class AddContactWizardPage1
extends Object
implements WizardPage, ListSelectionListener

The AddContactWizardPage1 is the first page of the "Add Contact" wizard. Contains the SelectAccountPanel, where the user should select the account, where the new contact will be created.

Author:
Yana Stamcheva

Field Summary
static String IDENTIFIER
          The identifier of this page.
 
Fields inherited from interface net.java.sip.communicator.service.gui.WizardPage
DEFAULT_PAGE_IDENTIFIER, FINISH_PAGE_IDENTIFIER, SUMMARY_PAGE_IDENTIFIER
 
Constructor Summary
AddContactWizardPage1(WizardContainer wizard, NewContact newContact, Iterator<ProtocolProviderService> providerList)
          Creates an instance of AddContactWizardPage1.
 
Method Summary
 void commitPage()
          Commits all data from the form before going to the next page.
 Object getBackPageIdentifier()
          Implements the WizardPage.getBackPageIdentifier to return the back identifier.
 Object getIdentifier()
          Returns the identifier of this wizard page.
 Object getNextPageIdentifier()
          Implements the WizardPage.getNextPageIdentifier to return the next identifier.
 Object getWizardForm()
          Returns the graphical component corresponding to this wizard page.
 void pageBack()
          Invoked when user clicks on the "Back" wizard button.
 void pageHiding()
          Invoked when this WizardPage will be hidden eighter because the user has clicked "Back" or "Next".
 void pageShowing()
          Before the panel is displayed checks the selections and enables the next button if a checkbox is already selected or disables it if nothing is selected.
 void pageShown()
          Invoked when this WizardPage is shown to the user and has become the current wizard page.
 void setNextPageIdentifier(String identifier)
          Changes the back page for the current wizard page.
 void valueChanged(ListSelectionEvent e)
          If there's no protocol selected by default the "Next" button would start as disabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final String IDENTIFIER
The identifier of this page.

See Also:
Constant Field Values
Constructor Detail

AddContactWizardPage1

public AddContactWizardPage1(WizardContainer wizard,
                             NewContact newContact,
                             Iterator<ProtocolProviderService> providerList)
Creates an instance of AddContactWizardPage1.

Parameters:
wizard - the parent wizard
newContact - An object that collects all user choices through the wizard.
providerList - The list of available ProtocolProviderServices, from which the user could select.
Method Detail

pageShowing

public void pageShowing()
Before the panel is displayed checks the selections and enables the next button if a checkbox is already selected or disables it if nothing is selected.

Specified by:
pageShowing in interface WizardPage

valueChanged

public void valueChanged(ListSelectionEvent e)
If there's no protocol selected by default the "Next" button would start as disabled. This method should make sure we re-enable it once a protocol has been selected

Specified by:
valueChanged in interface ListSelectionListener
Parameters:
e - the ListSelectionEvent that has just occurred.

getIdentifier

public Object getIdentifier()
Returns the identifier of this wizard page.

Specified by:
getIdentifier in interface WizardPage
Returns:
the identifier of this wizard page

getNextPageIdentifier

public Object getNextPageIdentifier()
Implements the WizardPage.getNextPageIdentifier to return the next identifier.

Specified by:
getNextPageIdentifier in interface WizardPage
Returns:
the identifier of the next wizard page.

getBackPageIdentifier

public Object getBackPageIdentifier()
Implements the WizardPage.getBackPageIdentifier to return the back identifier. In this case it's null because this is the first wizard page.

Specified by:
getBackPageIdentifier in interface WizardPage
Returns:
the identifier of the previous wizard page.

getWizardForm

public Object getWizardForm()
Returns the graphical component corresponding to this wizard page.

Specified by:
getWizardForm in interface WizardPage
Returns:
the graphical component corresponding to this wizard page

commitPage

public void commitPage()
Commits all data from the form before going to the next page.

Specified by:
commitPage in interface WizardPage

pageHiding

public void pageHiding()
Description copied from interface: WizardPage
Invoked when this WizardPage will be hidden eighter because the user has clicked "Back" or "Next". This method should be invoked from the WizardContainer implementation just before this page is hidden when replacing it with the previous or the next one.

You should add here all operations you need to be executed when this WizardPage is about to be hidden.

Specified by:
pageHiding in interface WizardPage

pageShown

public void pageShown()
Description copied from interface: WizardPage
Invoked when this WizardPage is shown to the user and has become the current wizard page. This method should be invoked from the WizardContainer implementation just after this page is shown to the user.

You should add here all operations you need to be executed when this WizardPage is shown.

Specified by:
pageShown in interface WizardPage

pageBack

public void pageBack()
Description copied from interface: WizardPage
Invoked when user clicks on the "Back" wizard button. You should add here all operations you need to be executed when user clicks "Back" on this WizardPage.

Specified by:
pageBack in interface WizardPage

setNextPageIdentifier

public void setNextPageIdentifier(String identifier)
Changes the back page for the current wizard page.

Parameters:
identifier - the new back page identifier.

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.