Changeset 10424 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-06-19T13:33:02+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r10378 r10424 62 62 import org.openstreetmap.josm.gui.DefaultNameFormatter; 63 63 import org.openstreetmap.josm.gui.MainMenu; 64 import org.openstreetmap.josm.gui.SideButton;65 64 import org.openstreetmap.josm.gui.dialogs.relation.actions.AddSelectedAfterSelection; 66 65 import org.openstreetmap.josm.gui.dialogs.relation.actions.AddSelectedAtEndAction; … … 358 357 protected static JPanel buildOkCancelButtonPanel(OKAction okAction, CancelAction cancelAction) { 359 358 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER)); 360 pnl.add(new SideButton(okAction));361 pnl.add(new SideButton(cancelAction));362 pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/RelationEditor"))));359 pnl.add(new JButton(okAction)); 360 pnl.add(new JButton(cancelAction)); 361 pnl.add(new JButton(new ContextSensitiveHelpAction(ht("/Dialog/RelationEditor")))); 363 362 return pnl; 364 363 } … … 489 488 ); 490 489 tfRole.setEnabled(memberTable.getSelectedRowCount() > 0); 491 SideButton btnApply = new SideButton(setRoleAction);490 JButton btnApply = new JButton(setRoleAction); 492 491 btnApply.setPreferredSize(new Dimension(20, 20)); 493 492 btnApply.setText(""); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java
r10378 r10424 11 11 12 12 import javax.swing.AbstractAction; 13 import javax.swing.JButton; 13 14 import javax.swing.JCheckBox; 14 15 import javax.swing.JList; … … 24 25 import org.openstreetmap.josm.data.osm.Relation; 25 26 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 26 import org.openstreetmap.josm.gui.SideButton;27 27 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 28 28 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor; … … 68 68 ReloadAction reloadAction = new ReloadAction(); 69 69 referrers.getModel().addListDataListener(reloadAction); 70 pnl.add(new SideButton(reloadAction));70 pnl.add(new JButton(reloadAction)); 71 71 pnl.add(cbReadFull); 72 72 73 73 editAction = new EditAction(); 74 74 referrers.getSelectionModel().addListSelectionListener(editAction); 75 pnl.add(new SideButton(editAction));75 pnl.add(new JButton(editAction)); 76 76 add(pnl, BorderLayout.SOUTH); 77 77 } … … 92 92 ReloadAction() { 93 93 putValue(SHORT_DESCRIPTION, tr("Load parent relations")); 94 putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));94 new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this); 95 95 putValue(NAME, tr("Reload")); 96 96 refreshEnabled(); … … 146 146 EditAction() { 147 147 putValue(SHORT_DESCRIPTION, tr("Edit the currently selected relation")); 148 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));148 new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this); 149 149 putValue(NAME, tr("Edit")); 150 150 refreshEnabled(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java
r9665 r10424 43 43 super(memberTable, memberTableModel, tagModel, layer, editor, tfRole); 44 44 putValue(SHORT_DESCRIPTION, tr("Cancel the updates and close the dialog")); 45 putValue(SMALL_ICON, ImageProvider.get("cancel"));45 new ImageProvider("cancel").getResource().attachImageIcon(this); 46 46 putValue(NAME, tr("Cancel")); 47 47 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/OKAction.java
r9665 r10424 33 33 super(memberTable, memberTableModel, tagModel, layer, editor, tfRole); 34 34 putValue(SHORT_DESCRIPTION, tr("Apply the updates and close the dialog")); 35 putValue(SMALL_ICON, ImageProvider.get("ok"));35 new ImageProvider("ok").getResource().attachImageIcon(this); 36 36 putValue(NAME, tr("OK")); 37 37 setEnabled(true); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java
r9665 r10424 36 36 this.tfRole = tfRole; 37 37 putValue(SHORT_DESCRIPTION, tr("Sets a role for the selected members")); 38 putValue(SMALL_ICON, ImageProvider.get("apply"));38 new ImageProvider("apply").getResource().attachImageIcon(this); 39 39 putValue(NAME, tr("Apply Role")); 40 40 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r10378 r10424 23 23 24 24 import javax.swing.AbstractAction; 25 import javax.swing.JButton; 25 26 import javax.swing.JCheckBox; 26 27 import javax.swing.JComponent; … … 38 39 import org.openstreetmap.josm.data.Bounds; 39 40 import org.openstreetmap.josm.gui.MapView; 40 import org.openstreetmap.josm.gui.SideButton;41 41 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; 42 42 import org.openstreetmap.josm.gui.help.HelpUtil; … … 84 84 /** the download action and button */ 85 85 private final DownloadAction actDownload = new DownloadAction(); 86 protected final SideButton btnDownload = new SideButton(actDownload);86 protected final JButton btnDownload = new JButton(actDownload); 87 87 88 88 private void makeCheckBoxRespondToEnter(JCheckBox cb) { … … 199 199 200 200 // -- cancel button 201 SideButton btnCancel;201 JButton btnCancel; 202 202 CancelAction actCancel = new CancelAction(); 203 btnCancel = new SideButton(actCancel);203 btnCancel = new JButton(actCancel); 204 204 pnl.add(btnCancel); 205 205 InputMapUtils.enableEnter(btnCancel); … … 210 210 211 211 // -- help button 212 SideButton btnHelp = new SideButton(new ContextSensitiveHelpAction(getRootPane().getClientProperty("help").toString()));212 JButton btnHelp = new JButton(new ContextSensitiveHelpAction(getRootPane().getClientProperty("help").toString())); 213 213 pnl.add(btnHelp); 214 214 InputMapUtils.enableEnter(btnHelp); … … 484 484 CancelAction() { 485 485 putValue(NAME, tr("Cancel")); 486 putValue(SMALL_ICON, ImageProvider.get("cancel"));486 new ImageProvider("cancel").getResource().attachImageIcon(this); 487 487 putValue(SHORT_DESCRIPTION, tr("Click to close the dialog and to abort downloading")); 488 488 } … … 502 502 DownloadAction() { 503 503 putValue(NAME, tr("Download")); 504 putValue(SMALL_ICON, ImageProvider.get("download"));504 new ImageProvider("download").getResource().attachImageIcon(this); 505 505 putValue(SHORT_DESCRIPTION, tr("Click to download the currently selected area")); 506 506 setEnabled(!Main.isOffline(OnlineResource.OSM_API)); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
r10420 r10424 19 19 import javax.swing.AbstractAction; 20 20 import javax.swing.BorderFactory; 21 import javax.swing.JButton; 21 22 import javax.swing.JCheckBox; 22 23 import javax.swing.JLabel; … … 26 27 import org.openstreetmap.josm.data.oauth.OAuthParameters; 27 28 import org.openstreetmap.josm.data.oauth.OAuthToken; 28 import org.openstreetmap.josm.gui.SideButton;29 29 import org.openstreetmap.josm.gui.oauth.AdvancedOAuthPropertiesPanel; 30 30 import org.openstreetmap.josm.gui.oauth.OAuthAuthorizationWizard; … … 200 200 gc.fill = GridBagConstraints.NONE; 201 201 gc.weightx = 0.0; 202 add(new SideButton(new AuthoriseNowAction()), gc);202 add(new JButton(new AuthoriseNowAction()), gc); 203 203 204 204 // filler - grab remaining space … … 273 273 // -- action buttons 274 274 JPanel btns = new JPanel(new FlowLayout(FlowLayout.LEFT)); 275 btns.add(new SideButton(new RenewAuthorisationAction()));276 btns.add(new SideButton(new TestAuthorisationAction()));275 btns.add(new JButton(new RenewAuthorisationAction())); 276 btns.add(new JButton(new TestAuthorisationAction())); 277 277 gc.gridy = 4; 278 278 gc.gridx = 0; … … 312 312 putValue(NAME, tr("Authorize now")); 313 313 putValue(SHORT_DESCRIPTION, tr("Click to step through the OAuth authorization process")); 314 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));314 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this); 315 315 } 316 316 … … 342 342 putValue(NAME, tr("New Access Token")); 343 343 putValue(SHORT_DESCRIPTION, tr("Click to step through the OAuth authorization process and generate a new Access Token")); 344 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));344 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this); 345 345 } 346 346 } … … 356 356 putValue(NAME, tr("Test Access Token")); 357 357 putValue(SHORT_DESCRIPTION, tr("Click test access to the OSM server with the current access token")); 358 putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small")); 359 358 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this); 360 359 } 361 360 -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
r10378 r10424 17 17 18 18 import javax.swing.AbstractAction; 19 import javax.swing.JButton; 19 20 import javax.swing.JCheckBox; 20 21 import javax.swing.JComponent; … … 28 29 import org.openstreetmap.josm.Main; 29 30 import org.openstreetmap.josm.data.preferences.CollectionProperty; 30 import org.openstreetmap.josm.gui.SideButton;31 31 import org.openstreetmap.josm.gui.help.HelpUtil; 32 32 import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator; … … 53 53 private final HistoryComboBox tfOsmServerUrl = new HistoryComboBox(); 54 54 private transient ApiUrlValidator valOsmServerUrl; 55 private SideButton btnTest;55 private JButton btnTest; 56 56 /** indicates whether to use the default OSM URL or not */ 57 57 private JCheckBox cbUseDefaultServerUrl; … … 116 116 ValidateApiUrlAction actTest = new ValidateApiUrlAction(); 117 117 tfOsmServerUrl.getEditorComponent().getDocument().addDocumentListener(actTest); 118 btnTest = new SideButton(actTest);118 btnTest = new JButton(actTest); 119 119 add(btnTest, gc); 120 120 }
Note:
See TracChangeset
for help on using the changeset viewer.