Changeset 10367 in josm
- Timestamp:
- 2016-06-12T23:40:12+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/oauth
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r10183 r10367 19 19 import javax.swing.AbstractAction; 20 20 import javax.swing.BorderFactory; 21 import javax.swing.JButton; 21 22 import javax.swing.JLabel; 22 23 import javax.swing.JOptionPane; … … 33 34 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 34 35 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 35 import org.openstreetmap.josm.gui.SideButton;36 36 import org.openstreetmap.josm.gui.help.HelpUtil; 37 37 import org.openstreetmap.josm.gui.preferences.server.UserNameValidator; … … 201 201 tfPassword.getDocument().addDocumentListener(runAuthorisationAction); 202 202 tfUserName.getDocument().addDocumentListener(runAuthorisationAction); 203 pnl.add(new SideButton(runAuthorisationAction));203 pnl.add(new JButton(runAuthorisationAction)); 204 204 return pnl; 205 205 } … … 236 236 // the actions 237 237 JPanel pnl1 = new JPanel(new FlowLayout(FlowLayout.LEFT)); 238 pnl1.add(new SideButton(new BackAction()));239 pnl1.add(new SideButton(new TestAccessTokenAction()));238 pnl1.add(new JButton(new BackAction())); 239 pnl1.add(new JButton(new TestAccessTokenAction())); 240 240 gc.gridy = 2; 241 241 pnl.add(pnl1, gc); … … 325 325 RunAuthorisationAction() { 326 326 putValue(NAME, tr("Authorize now")); 327 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));327 new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this); 328 328 putValue(SHORT_DESCRIPTION, tr("Click to redirect you to the authorization form on the JOSM web site")); 329 329 updateEnabledState(); … … 362 362 putValue(NAME, tr("Back")); 363 363 putValue(SHORT_DESCRIPTION, tr("Run the automatic authorization steps again")); 364 putValue(SMALL_ICON, ImageProvider.get("dialogs", "previous"));364 new ImageProvider("dialogs", "previous").getResource().getImageIcon(this); 365 365 } 366 366 … … 377 377 TestAccessTokenAction() { 378 378 putValue(NAME, tr("Test Access Token")); 379 putValue(SMALL_ICON, ImageProvider.get("logo"));379 new ImageProvider("logo").getResource().getImageIcon(this); 380 380 } 381 381 -
trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
r10189 r10367 16 16 import javax.swing.AbstractAction; 17 17 import javax.swing.BorderFactory; 18 import javax.swing.JButton; 18 19 import javax.swing.JCheckBox; 19 20 import javax.swing.JLabel; … … 25 26 26 27 import org.openstreetmap.josm.data.oauth.OAuthToken; 27 import org.openstreetmap.josm.gui.SideButton;28 28 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder; 29 29 import org.openstreetmap.josm.gui.widgets.DefaultTextComponentValidator; … … 147 147 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT)); 148 148 TestAccessTokenAction actTestAccessToken = new TestAccessTokenAction(); 149 pnl.add(new SideButton(actTestAccessToken));149 pnl.add(new JButton(actTestAccessToken)); 150 150 this.addPropertyChangeListener(actTestAccessToken); 151 151 return pnl; … … 223 223 TestAccessTokenAction() { 224 224 putValue(NAME, tr("Test Access Token")); 225 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));225 new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this); 226 226 putValue(SHORT_DESCRIPTION, tr("Click to test the Access Token")); 227 227 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
r10254 r10367 26 26 import javax.swing.AbstractAction; 27 27 import javax.swing.BorderFactory; 28 import javax.swing.JButton; 28 29 import javax.swing.JComponent; 29 30 import javax.swing.JDialog; … … 42 43 import org.openstreetmap.josm.data.oauth.OAuthParameters; 43 44 import org.openstreetmap.josm.data.oauth.OAuthToken; 44 import org.openstreetmap.josm.gui.SideButton;45 45 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; 46 46 import org.openstreetmap.josm.gui.help.HelpUtil; … … 99 99 pnlManualAuthorisationUI.addPropertyChangeListener(actAcceptAccessToken); 100 100 101 pnl.add(new SideButton(actAcceptAccessToken));102 pnl.add(new SideButton(new CancelAction()));103 pnl.add(new SideButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Dialog/OAuthAuthorisationWizard"))));101 pnl.add(new JButton(actAcceptAccessToken)); 102 pnl.add(new JButton(new CancelAction())); 103 pnl.add(new JButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Dialog/OAuthAuthorisationWizard")))); 104 104 105 105 return pnl; … … 351 351 CancelAction() { 352 352 putValue(NAME, tr("Cancel")); 353 putValue(SMALL_ICON, ImageProvider.get("cancel"));353 new ImageProvider("cancel").getResource().getImageIcon(this); 354 354 putValue(SHORT_DESCRIPTION, tr("Close the dialog and cancel authorization")); 355 355 } … … 373 373 AcceptAccessTokenAction() { 374 374 putValue(NAME, tr("Accept Access Token")); 375 putValue(SMALL_ICON, ImageProvider.get("ok"));375 new ImageProvider("ok").getResource().getImageIcon(this); 376 376 putValue(SHORT_DESCRIPTION, tr("Close the dialog and accept the Access Token")); 377 377 updateEnabledState(null); -
trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
r10183 r10367 18 18 import javax.swing.AbstractAction; 19 19 import javax.swing.BorderFactory; 20 import javax.swing.JButton; 20 21 import javax.swing.JCheckBox; 21 22 import javax.swing.JLabel; … … 23 24 24 25 import org.openstreetmap.josm.data.oauth.OAuthToken; 25 import org.openstreetmap.josm.gui.SideButton;26 26 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder; 27 27 import org.openstreetmap.josm.gui.util.GuiHelper; … … 195 195 196 196 JPanel pnl1 = new JPanel(new FlowLayout(FlowLayout.LEFT)); 197 pnl1.add(new SideButton(new RetrieveRequestTokenAction()));197 pnl1.add(new JButton(new RetrieveRequestTokenAction())); 198 198 gc.fill = GridBagConstraints.HORIZONTAL; 199 199 gc.weightx = 1.0; … … 269 269 protected JPanel buildActionPanel() { 270 270 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT)); 271 pnl.add(new SideButton(new BackAction()));272 pnl.add(new SideButton(new RetrieveAccessTokenAction()));271 pnl.add(new JButton(new BackAction())); 272 pnl.add(new JButton(new RetrieveAccessTokenAction())); 273 273 return pnl; 274 274 } … … 292 292 putValue(NAME, tr("Back")); 293 293 putValue(SHORT_DESCRIPTION, tr("Go back to step 1/3")); 294 putValue(SMALL_ICON, ImageProvider.get("dialogs", "previous"));294 new ImageProvider("dialogs", "previous").getResource().getImageIcon(this); 295 295 } 296 296 … … 349 349 protected JPanel buildActionPanel() { 350 350 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT)); 351 pnl.add(new SideButton(new RestartAction()));352 pnl.add(new SideButton(new TestAccessTokenAction()));351 pnl.add(new JButton(new RestartAction())); 352 pnl.add(new JButton(new TestAccessTokenAction())); 353 353 return pnl; 354 354 } … … 368 368 putValue(NAME, tr("Restart")); 369 369 putValue(SHORT_DESCRIPTION, tr("Go back to step 1/3")); 370 putValue(SMALL_ICON, ImageProvider.get("dialogs", "previous"));370 new ImageProvider("dialogs", "previous").getResource().getImageIcon(this); 371 371 } 372 372 … … 389 389 RetrieveRequestTokenAction() { 390 390 putValue(NAME, tr("Retrieve Request Token")); 391 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));391 new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this); 392 392 putValue(SHORT_DESCRIPTION, tr("Click to retrieve a Request Token")); 393 393 } … … 425 425 RetrieveAccessTokenAction() { 426 426 putValue(NAME, tr("Retrieve Access Token")); 427 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));427 new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this); 428 428 putValue(SHORT_DESCRIPTION, tr("Click to retrieve an Access Token")); 429 429 } … … 462 462 TestAccessTokenAction() { 463 463 putValue(NAME, tr("Test Access Token")); 464 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));464 new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this); 465 465 putValue(SHORT_DESCRIPTION, tr("Click to test the Access Token")); 466 466 }
Note:
See TracChangeset
for help on using the changeset viewer.