Remove a few unused methods; we don't create accounts through this yet.
| 936 | 942 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | import com.jbidwatcher.ui.util.JPasteListener; |
| 9 | 9 | import com.jbidwatcher.ui.util.SpringUtilities; |
| 10 | import com.jbidwatcher.ui.util.OptionUI; | |
| 11 | import com.jbidwatcher.ui.util.JBEditorPane; | |
| 12 | 10 | import com.jbidwatcher.util.config.JConfig; |
| 13 | 11 | import com.jbidwatcher.my.MyJBidwatcher; |
| 14 | 12 | |
| --- | --- | |
| 22 | 20 | private JTextField mEmail; |
| 23 | 21 | private JTextField mPassword; |
| 24 | 22 | private JButton mCreateOrUpdate; |
| 25 | private final OptionUI mOui = new OptionUI(); | |
| 26 | 23 | |
| 27 | 24 | public String getTabName() { return "My JBidwatcher"; } |
| 28 | 25 | public void cancel() { } |
| --- | --- | |
| 148 | 145 | return(jp); |
| 149 | 146 | } |
| 150 | 147 | |
| 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 | ||
| 185 | 148 | public JConfigMyJBidwatcherTab() { |
| 186 | 149 | super(); |
| 187 | 150 | this.setLayout(new BorderLayout()); |
