Sign up link added to simple account registration page.

cusax-fix
Yana Stamcheva 18 years ago
parent b7fa06b02e
commit 2c111b0a89

@ -1,2 +1,3 @@
initialAccountRegistration=Configure all your favorite protocols in one click.
signin=Sign in
signin=Sign in
signup=Sign up

@ -341,4 +341,25 @@ public boolean isSimpleFormEnabled()
{
return true;
}
public void webSignup()
{
AimAccRegWizzActivator
.getBrowserLauncher()
.openURL(
"https://reg.my.screenname.aol.com/_cqr/registration/" +
"initRegistration.psp?sitedomain=www.aim.com&createSn=1");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return true;
}
}

@ -421,10 +421,7 @@ public void loadAccount(ProtocolProviderService protocolProvider)
public void actionPerformed(ActionEvent e)
{
AimAccRegWizzActivator
.getBrowserLauncher()
.openURL(
"http://my.screenname.aol.com/_cqr/login/login.psp?seamless=n&createSn=1");
wizard.webSignup();
}
/**

@ -406,4 +406,24 @@ public boolean isSimpleFormEnabled()
{
return false;
}
/**
* Nothing to do here in the case of dictionary.
*/
public void webSignup()
{
throw new UnsupportedOperationException(
"The web sign up is not supproted by the dictionary wizard.");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return false;
}
}

@ -315,4 +315,24 @@ public boolean isSimpleFormEnabled()
{
return false;
}
/**
* Nothing to do here in the case of Gibberish.
*/
public void webSignup()
{
throw new UnsupportedOperationException(
"The web sign up is not supproted by the gibberish wizard.");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return false;
}
}

@ -429,8 +429,7 @@ public void loadAccount(ProtocolProviderService protocolProvider)
*/
public void actionPerformed(ActionEvent e)
{
IcqAccRegWizzActivator.getBrowserLauncher().openURL(
"https://www.icq.com/register/");
wizard.webSignup();
}
/**

@ -345,4 +345,24 @@ public boolean isSimpleFormEnabled()
{
return true;
}
/**
* Opens the browser on the account registration page.
*/
public void webSignup()
{
IcqAccRegWizzActivator.getBrowserLauncher().openURL(
"https://www.icq.com/register/");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return true;
}
}

@ -348,4 +348,24 @@ public boolean isSimpleFormEnabled()
{
return false;
}
/**
* Nothing to do here in the case of IRC.
*/
public void webSignup()
{
throw new UnsupportedOperationException(
"The web sign up is not supproted by the IRC wizard.");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return false;
}
}

@ -9,6 +9,8 @@
import java.util.*;
import org.osgi.framework.*;
import net.java.sip.communicator.service.browserlauncher.*;
import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
@ -28,6 +30,8 @@ public class JabberAccRegWizzActivator
private static Logger logger = Logger.getLogger(
JabberAccRegWizzActivator.class.getName());
private static BrowserLauncherService browserLauncherService;
private static ConfigurationService configService;
private static WizardContainer wizardContainer;
@ -109,4 +113,22 @@ public static UIService getUIService()
{
return uiService;
}
/**
* Returns the <tt>BrowserLauncherService</tt> obtained from the bundle
* context.
* @return the <tt>BrowserLauncherService</tt> obtained from the bundle
* context
*/
public static BrowserLauncherService getBrowserLauncher() {
if (browserLauncherService == null) {
ServiceReference serviceReference = bundleContext
.getServiceReference(BrowserLauncherService.class.getName());
browserLauncherService = (BrowserLauncherService) bundleContext
.getService(serviceReference);
}
return browserLauncherService;
}
}

@ -376,4 +376,21 @@ protected String getServerFromUserName(String userName)
return null;
}
public void webSignup()
{
JabberAccRegWizzActivator.getBrowserLauncher()
.openURL("http://mail.google.com/mail/signup");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return true;
}
}

@ -15,6 +15,7 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event,
net.java.sip.communicator.service.fileaccess,
net.java.sip.communicator.service.browserlauncher,
javax.naming,
javax.naming.directory,
javax.xml.parsers,

@ -9,6 +9,8 @@
import java.util.*;
import org.osgi.framework.*;
import net.java.sip.communicator.service.browserlauncher.*;
import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
@ -28,6 +30,8 @@ public class MsnAccRegWizzActivator implements BundleActivator {
private static ConfigurationService configService;
private static BrowserLauncherService browserLauncherService;
private static WizardContainer wizardContainer;
private static MsnAccountRegistrationWizard msnWizard;
@ -102,4 +106,22 @@ public static UIService getUIService()
{
return uiService;
}
/**
* Returns the <tt>BrowserLauncherService</tt> obtained from the bundle
* context.
* @return the <tt>BrowserLauncherService</tt> obtained from the bundle
* context
*/
public static BrowserLauncherService getBrowserLauncher() {
if (browserLauncherService == null) {
ServiceReference serviceReference = bundleContext
.getServiceReference(BrowserLauncherService.class.getName());
browserLauncherService = (BrowserLauncherService) bundleContext
.getService(serviceReference);
}
return browserLauncherService;
}
}

@ -320,4 +320,24 @@ public boolean isSimpleFormEnabled()
{
return true;
}
/**
* Opens the browser on the registration page for MSN.
*/
public void webSignup()
{
MsnAccRegWizzActivator.getBrowserLauncher()
.openURL("https://accountservices.passport.net/reg.srf");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return true;
}
}

@ -14,6 +14,7 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event,
net.java.sip.communicator.service.browserlauncher,
javax.swing,
javax.swing.event,
javax.swing.table,

@ -279,4 +279,24 @@ public boolean isSimpleFormEnabled()
{
return false;
}
/**
* Nothing to do for RSS here.
*/
public void webSignup()
{
throw new UnsupportedOperationException(
"The web sign up is not supported by the RSS wizard.");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return false;
}
}

@ -142,21 +142,26 @@ private class AccountRegistrationPanel extends JPanel
private JPanel inputRegisterPanel = new JPanel(new BorderLayout());
private JTextArea descriptionArea = new JTextArea();
private JTextArea descriptionArea = new JTextArea();
private JLabel signupLabel
= new JLabel("<html><a href=''>"
+ Resources.getString("signup")
+ "</a></html>", JLabel.RIGHT);
private AccountRegistrationWizard wizard;
public AccountRegistrationPanel(
AccountRegistrationWizard wizard,
AccountRegistrationWizard accountWizard,
boolean isPreferredWizard)
{
super(new BorderLayout(5, 5));
this.wizard = wizard;
this.wizard = accountWizard;
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
this.setPreferredSize(new Dimension(230, 140));
this.setPreferredSize(new Dimension(230, 150));
this.setOpaque(false);
@ -172,6 +177,9 @@ public AccountRegistrationPanel(
this.inputRegisterPanel.add(inputPanel, BorderLayout.NORTH);
if (wizard.isWebSignupSupported())
this.inputRegisterPanel.add(signupLabel, BorderLayout.SOUTH);
this.inputPanel.add(labelsPanel, BorderLayout.WEST);
this.inputPanel.add(fieldsPanel, BorderLayout.CENTER);
@ -179,6 +187,24 @@ public AccountRegistrationPanel(
this.iconDescriptionPanel.add(
protocolLabel, BorderLayout.NORTH);
this.signupLabel.setFont(signupLabel.getFont().deriveFont(10f));
this.signupLabel.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent arg0)
{
try
{
wizard.webSignup();
}
catch (UnsupportedOperationException e)
{
// This should not happen, because we check if the
// operation is supported, before adding the sign up.
logger.error("The web sign up is not supported.", e);
}
}
});
this.protocolLabel.setFont(
protocolLabel.getFont().deriveFont(Font.BOLD, 14f));
this.usernameExampleLabel.setForeground(Color.DARK_GRAY);

@ -8,6 +8,8 @@
import java.util.*;
import org.osgi.framework.*;
import net.java.sip.communicator.service.browserlauncher.*;
import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
@ -31,6 +33,8 @@ public class SIPAccRegWizzActivator
private static WizardContainer wizardContainer;
private static BrowserLauncherService browserLauncherService;
private static SIPAccountRegistrationWizard sipWizard;
private static UIService uiService;
@ -109,4 +113,22 @@ public static UIService getUIService()
{
return uiService;
}
/**
* Returns the <tt>BrowserLauncherService</tt> obtained from the bundle
* context.
* @return the <tt>BrowserLauncherService</tt> obtained from the bundle
* context
*/
public static BrowserLauncherService getBrowserLauncher() {
if (browserLauncherService == null) {
ServiceReference serviceReference = bundleContext
.getServiceReference(BrowserLauncherService.class.getName());
browserLauncherService = (BrowserLauncherService) bundleContext
.getService(serviceReference);
}
return browserLauncherService;
}
}

@ -418,4 +418,21 @@ protected String getServerFromUserName(String userName)
return null;
}
public void webSignup()
{
SIPAccRegWizzActivator.getBrowserLauncher()
.openURL("http://serweb.iptel.org/user/reg/index.php");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return true;
}
}

@ -14,6 +14,7 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event,
net.java.sip.communicator.service.browserlauncher,
javax.swing,
javax.swing.event,
javax.swing.table,

@ -288,4 +288,24 @@ public boolean isSimpleFormEnabled()
{
return false;
}
/**
* Nothing to do here in the case of SSH.
*/
public void webSignup()
{
throw new UnsupportedOperationException(
"The web sign up is not supported by the SSH wizard.");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return false;
}
}

@ -8,6 +8,7 @@
import java.util.*;
import net.java.sip.communicator.service.browserlauncher.*;
import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
@ -29,6 +30,8 @@ public class YahooAccRegWizzActivator implements BundleActivator {
private static ConfigurationService configService;
private static BrowserLauncherService browserLauncherService;
private static WizardContainer wizardContainer;
private static YahooAccountRegistrationWizard yahooWizard;
@ -102,4 +105,22 @@ public static UIService getUIService()
{
return uiService;
}
/**
* Returns the <tt>BrowserLauncherService</tt> obtained from the bundle
* context.
* @return the <tt>BrowserLauncherService</tt> obtained from the bundle
* context
*/
public static BrowserLauncherService getBrowserLauncher() {
if (browserLauncherService == null) {
ServiceReference serviceReference = bundleContext
.getServiceReference(BrowserLauncherService.class.getName());
browserLauncherService = (BrowserLauncherService) bundleContext
.getService(serviceReference);
}
return browserLauncherService;
}
}

@ -319,4 +319,21 @@ public boolean isSimpleFormEnabled()
{
return true;
}
public void webSignup()
{
YahooAccRegWizzActivator.getBrowserLauncher()
.openURL("https://edit.yahoo.com/registration");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return true;
}
}

@ -14,6 +14,7 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event,
net.java.sip.communicator.service.browserlauncher,
javax.swing,
javax.swing.event,
javax.swing.table,

@ -344,4 +344,24 @@ public boolean isSimpleFormEnabled()
{
return false;
}
/**
* Nothing to do here in the case of Bonjour.
*/
public void webSignup()
{
throw new UnsupportedOperationException(
"The web sign up is not supported by the Zeroconf wizard.");
}
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported()
{
return false;
}
}

@ -30,8 +30,6 @@
*/
public interface AccountRegistrationWizard
{
public static final String PREFERRED_WIZARD = "PreferredWizard";
/**
* Returns the protocol icon that will be shown on the left of the protocol
* name in the list, where user will choose the protocol to register to.
@ -134,6 +132,22 @@ public interface AccountRegistrationWizard
public ProtocolProviderService signin( String userName,
String password);
/**
* Returns <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise.
* @return <code>true</code> if the web sign up is supported by the current
* implementation, <code>false</code> - otherwise
*/
public boolean isWebSignupSupported();
/**
* Defines the operation that will be executed when user clicks on the
* "Sign up" link.
* @throws UnsupportedOperationException if the web sign up operation is
* not supported by the current implementation.
*/
public void webSignup() throws UnsupportedOperationException;
/**
* Returns the preferred dimensions of this wizard.
*

Loading…
Cancel
Save