- Fixing a bug reported bu Matthieu Casanova (on dev@sip-communicator.dev.java.net 02/16/2010 subject: "AddContactWizard : disable back button when on first page")

- Make all wizard first pages to return null as a "back page identifier" instead of the DEFAULT_PAGE_IDENTIFIER, which was meant for a different case.
cusax-fix
Yana Stamcheva 16 years ago
parent 2ca934a550
commit de35e20445

@ -16,7 +16,7 @@
/**
* The <tt>EmptyAccountRegistrationWizardPage</tt> is the page that users
* would seen in the NewAccountDialog as a default choice which would make them
* would see in the NewAccountDialog as a default choice which would make them
* pick a new option.
*
* @author Emil Ivov
@ -110,13 +110,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return Returns the identifier of the previous page of the wizard.
* @return the identifier of the previous page of the wizard
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -37,7 +37,7 @@ public CreateChatRoomWizardPage2(WizardContainer wizard,
{
this.newChatRoom = newChatRoom;
namePanel = new ChatRoomNamePanel(wizard);
namePanel = new ChatRoomNamePanel(wizard);
}
/**

@ -23,7 +23,9 @@
public class AddContactWizardPage1
implements WizardPage, ListSelectionListener
{
/**
* The identifier of this page.
*/
public static final String IDENTIFIER = "SELECT_ACCOUNT_PANEL";
private SelectAccountPanel selectAccountPanel;
@ -32,7 +34,8 @@ public class AddContactWizardPage1
/**
* Creates an instance of <tt>AddContactWizardPage1</tt>.
*
*
* @param wizard the parent wizard
* @param newContact An object that collects all user choices through the
* wizard.
* @param providerList The list of available
@ -83,40 +86,58 @@ public void valueChanged(ListSelectionEvent e)
setNextButtonAccordingToCheckBox();
}
/**
* Returns the identifier of this wizard page.
* @return the identifier of this wizard page
*/
public Object getIdentifier()
{
return IDENTIFIER;
}
/**
* Implements the <code>WizardPage.getNextPageIdentifier</code> to return
* the next identifier.
*
* @return the identifier of the next wizard page.
*/
public Object getNextPageIdentifier()
{
return AddContactWizardPage2.IDENTIFIER;
}
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the identifier of the previous wizard page.
*/
public Object getBackPageIdentifier()
{
return IDENTIFIER;
return null;
}
/**
* Returns the graphical component corresponding to this wizard page.
* @return the graphical component corresponding to this wizard page
*/
public Object getWizardForm()
{
return selectAccountPanel;
}
public void pageHiding()
{
}
public void pageShown()
{
}
/**
* Commits all data from the form before going to the next page.
*/
public void commitPage()
{
selectAccountPanel.initSelectedAccount();
}
public void pageBack()
{
}
public void pageHiding() {}
public void pageShown() {}
public void pageBack() {}
}

@ -229,7 +229,7 @@ public Object getIdentifier()
/**
* Implements the <code>WizardPage.getNextPageIdentifier</code> to return
* the next page identifier - the summary page.
* the next identifier - the summary page.
*/
public Object getNextPageIdentifier()
{
@ -238,11 +238,12 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier, which is null as this is the first wizard page.
* @return the identifier of the previous page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -276,13 +276,13 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier, which is null as this is the first wizard page.
*
* @return Returns the identifier of the previous page of the wizard.
* @return the identifier of the previous page of the wizard.
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -203,13 +203,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the identifier of the default wizard page.
* @return the identifier of the previous wizard page.
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -145,13 +145,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the identifier of the default wizard page.
* @return the identifier of the previous wizard page.
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -294,13 +294,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the id of the default wizard page.
* @return the id of the previous wizard page.
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -231,11 +231,13 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -430,12 +430,13 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* @return the back page identifier
* the back identifier. In this case it's null because this is the first
* wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -256,13 +256,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the identifier of the default wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -308,13 +308,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the id of the default wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -146,11 +146,13 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -151,13 +151,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the identifier of the default wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -374,11 +374,13 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -300,13 +300,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the identifier of the default wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -148,11 +148,13 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -189,13 +189,14 @@ public Object getNextPageIdentifier()
/**
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
* the next back identifier - the default page.
* the back identifier. In this case it's null because this is the first
* wizard page.
*
* @return the identifier of the default wizard page.
* @return the identifier of the previous wizard page
*/
public Object getBackPageIdentifier()
{
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
return null;
}
/**

@ -42,12 +42,11 @@ public interface WizardPage
* The identifier of the default wizard page.
* <p>
* At the time of this writing, it seems from its current uses that the
* constant indicates a <tt>null</tt> back page.
* constant indicates a <tt>null</tt> back page.
* </p>
*/
String DEFAULT_PAGE_IDENTIFIER = "DEFAULT";
/**
* Returns the identifier of this <tt>WizardPage</tt>.
*

Loading…
Cancel
Save