avatar

942

Remove a few unused methods; we don't create accounts through this yet.

by mrs, 03 Jun, 2009 11:34 AM
936 942  
77 
88 import com.jbidwatcher.ui.util.JPasteListener;
99 import com.jbidwatcher.ui.util.SpringUtilities;
10 import com.jbidwatcher.ui.util.OptionUI;
11 import com.jbidwatcher.ui.util.JBEditorPane;
1210 import com.jbidwatcher.util.config.JConfig;
1311 import com.jbidwatcher.my.MyJBidwatcher;
1412 
------
2220   private JTextField mEmail;
2321   private JTextField mPassword;
2422   private JButton mCreateOrUpdate;
25   private final OptionUI mOui = new OptionUI();
2623 
2724   public String getTabName() { return "My JBidwatcher"; }
2825   public void cancel() { }
------
148145     return(jp);
149146   }
150147 
151   private void updateUser() {
152     final String email = mEmail.getText();
153     final String password = mPassword.getText();
154 
155     final boolean success = MyJBidwatcher.getInstance().updateAccount(email, password);
156     final String message = success ? "Account updated to:\nEmail: " + email + "\nPassword: " + password : "Account update failed.";
157 
158     final JPanel panel = this;
159     SwingUtilities.invokeLater(new Runnable() {
160       public void run() {
161         mOui.promptWithCheckbox(panel, message, "My JBidwatcher Account Update", "prompt.account_updated." + (success ? "success" : "failure"));
162       }
163     });
164   }
165 
166   private void createNewUser() {
167     String email = mEmail.getText();
168     String password = mPassword.getText();
169     final boolean success = MyJBidwatcher.getInstance().createAccount(email, password);
170 
171     final JPanel panel = this;
172     SwingUtilities.invokeLater(new Runnable() {
173       public void run() {
174         JBEditorPane jep;
175         if(success) {
176           jep = OptionUI.getHTMLLabel("<html><body>Account created.  Check your email for a verification link.</body></html>");
177         } else {
178           jep = OptionUI.getHTMLLabel("<html><body>Account creation failed.<br><br>Go to <a href=\"http://my.jbidwatcher.com\">My JBidwatcher</a> (http://my.jbidwatcher.com)<br>and create an account.</body></html>");
179         }
180         JOptionPane.showMessageDialog(panel, jep, "My JBidwatcher Account", success ? JOptionPane.INFORMATION_MESSAGE : JOptionPane.WARNING_MESSAGE);
181       }
182     });
183   }
184 
185148   public JConfigMyJBidwatcherTab() {
186149     super();
187150     this.setLayout(new BorderLayout());