Changeset 12992 in josm for trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
- Timestamp:
- 2017-10-14T00:09:56+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
r12854 r12992 23 23 import javax.swing.AbstractAction; 24 24 import javax.swing.BorderFactory; 25 import javax.swing.JButton; 25 26 import javax.swing.JCheckBox; 26 27 import javax.swing.JDialog; … … 30 31 31 32 import org.openstreetmap.josm.Main; 32 import org.openstreetmap.josm.gui.SideButton;33 33 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; 34 34 import org.openstreetmap.josm.gui.help.HelpUtil; … … 127 127 protected JPanel createButtonPanel() { 128 128 JPanel pnl = new JPanel(new FlowLayout()); 129 pnl.add(new SideButton(new OKAction()));130 pnl.add(new SideButton(new CancelAction()));131 pnl.add(new SideButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Dialog/Password"))));129 pnl.add(new JButton(new OKAction())); 130 pnl.add(new JButton(new CancelAction())); 131 pnl.add(new JButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Dialog/Password")))); 132 132 return pnl; 133 133 } … … 266 266 gc.weighty = 1.0; 267 267 add(new JPanel(), gc); 268 269 268 } 270 269 … … 375 374 public void focusGained(FocusEvent e) { 376 375 if (e.getSource() instanceof JTextField) { 377 JTextField tf = (JTextField) e.getSource(); 378 tf.selectAll(); 376 ((JTextField) e.getSource()).selectAll(); 379 377 } 380 378 } … … 410 408 return; 411 409 } else { 412 OKAction okAction = owner.new OKAction(); 413 okAction.actionPerformed(null); 410 owner.new OKAction().actionPerformed(null); 414 411 } 415 412 } … … 421 418 putValue(NAME, tr("Authenticate")); 422 419 putValue(SHORT_DESCRIPTION, tr("Authenticate with the supplied username and password")); 423 putValue(SMALL_ICON, ImageProvider.get("ok"));424 } 425 426 @Override 427 public void actionPerformed(ActionEvent arg0) {420 new ImageProvider("ok").getResource().attachImageIcon(this); 421 } 422 423 @Override 424 public void actionPerformed(ActionEvent e) { 428 425 setCanceled(false); 429 426 setVisible(false); … … 435 432 putValue(NAME, tr("Cancel")); 436 433 putValue(SHORT_DESCRIPTION, tr("Cancel authentication")); 437 putValue(SMALL_ICON, ImageProvider.get("cancel"));434 new ImageProvider("cancel").getResource().attachImageIcon(this); 438 435 } 439 436 … … 444 441 445 442 @Override 446 public void actionPerformed(ActionEvent arg0) {443 public void actionPerformed(ActionEvent e) { 447 444 cancel(); 448 445 }
Note:
See TracChangeset
for help on using the changeset viewer.