- Timestamp:
- 2016-06-14T17:23:20+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r10234 r10369 105 105 JPanel panel = new JPanel(new GridBagLayout()); 106 106 panel.setPreferredSize(new Dimension(890, 300)); 107 panel.add(new JLabel("", new Image Icon(ImageProvider.get("logo.svg").getImage().getScaledInstance(256, 258, Image.SCALE_SMOOTH)),107 panel.add(new JLabel("", new ImageProvider("logo.svg").setSize(ImageProvider.ImageSizes.ABOUT_LOGO).get(), 108 108 JLabel.CENTER), GBC.std().insets(0, 5, 0, 0)); 109 109 panel.add(about, GBC.std().fill()); -
trunk/src/org/openstreetmap/josm/actions/AbstractSelectAction.java
r10356 r10369 20 20 putValue(NAME, tr("Select")); 21 21 putValue(SHORT_DESCRIPTION, tr("Set the selected elements on the map to the selected items in the list above.")); 22 new ImageProvider("dialogs", "select").getResource(). getImageIcon(this, true);22 new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true); 23 23 } 24 24 } -
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r10318 r10369 63 63 @Override 64 64 public void run() { 65 result. getImageIcon(AddImageryLayerAction.this);65 result.attachImageIcon(AddImageryLayerAction.this); 66 66 } 67 67 }); -
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r10354 r10369 73 73 super(name); 74 74 if (icon != null) 75 icon.getResource(). getImageIcon(this);75 icon.getResource().attachImageIcon(this); 76 76 setHelpId(); 77 77 sc = shortcut; -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r10357 r10369 367 367 putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution")); 368 368 putValue(Action.NAME, tr("Cancel")); 369 new ImageProvider("cancel").getResource(). getImageIcon(this);369 new ImageProvider("cancel").getResource().attachImageIcon(this); 370 370 setEnabled(true); 371 371 } … … 382 382 putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts")); 383 383 putValue(Action.NAME, tr("Apply")); 384 new ImageProvider("ok").getResource(). getImageIcon(this);384 new ImageProvider("ok").getResource().attachImageIcon(this); 385 385 updateEnabledState(); 386 386 } -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
r10357 r10369 265 265 putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution")); 266 266 putValue(Action.NAME, tr("Cancel")); 267 new ImageProvider("cancel").getResource(). getImageIcon(this);267 new ImageProvider("cancel").getResource().attachImageIcon(this); 268 268 setEnabled(true); 269 269 } … … 281 281 putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts")); 282 282 putValue(Action.NAME, tr("Apply")); 283 new ImageProvider("ok").getResource(). getImageIcon(this);283 new ImageProvider("ok").getResource().attachImageIcon(this); 284 284 updateEnabledState(); 285 285 } -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
r10357 r10369 155 155 ApplyRoleAction() { 156 156 putValue(NAME, tr("Apply")); 157 new ImageProvider("ok").getResource(). getImageIcon(this);157 new ImageProvider("ok").getResource().attachImageIcon(this); 158 158 putValue(SHORT_DESCRIPTION, tr("Apply this role to all members")); 159 159 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r10356 r10369 376 376 putValue(NAME, tr("Select")); 377 377 putValue(SHORT_DESCRIPTION, tr("Selects the objects that take part in this command (unless currently deleted)")); 378 new ImageProvider("dialogs", "select").getResource(). getImageIcon(this, true);378 new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true); 379 379 } 380 380 … … 411 411 putValue(SHORT_DESCRIPTION, 412 412 tr("Selects the objects that take part in this command (unless currently deleted), then and zooms to it")); 413 new ImageProvider("dialogs/autoscale", "selection").getResource(). getImageIcon(this, true);413 new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this, true); 414 414 } 415 415 … … 447 447 putValue(NAME, tr("Undo")); 448 448 putValue(SHORT_DESCRIPTION, tr("Undo the selected and all later commands")); 449 new ImageProvider("undo").getResource(). getImageIcon(this, true);449 new ImageProvider("undo").getResource().attachImageIcon(this, true); 450 450 } else { 451 451 tree = redoTree; 452 452 putValue(NAME, tr("Redo")); 453 453 putValue(SHORT_DESCRIPTION, tr("Redo the selected and all earlier commands")); 454 new ImageProvider("redo").getResource(). getImageIcon(this, true);454 new ImageProvider("redo").getResource().attachImageIcon(this, true); 455 455 } 456 456 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r10356 r10369 434 434 putValue(NAME, tr("Resolve")); 435 435 putValue(SHORT_DESCRIPTION, tr("Open a merge dialog of all selected items in the list above.")); 436 new ImageProvider("dialogs", "conflict").getResource(). getImageIcon(this, true);436 new ImageProvider("dialogs", "conflict").getResource().attachImageIcon(this, true); 437 437 putValue("help", ht("/Dialog/ConflictList#ResolveAction")); 438 438 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
r10357 r10369 158 158 putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution and close the dialog")); 159 159 putValue(Action.NAME, tr("Cancel")); 160 new ImageProvider("cancel").getResource(). getImageIcon(this);160 new ImageProvider("cancel").getResource().attachImageIcon(this); 161 161 setEnabled(true); 162 162 } … … 175 175 putValue(Action.SHORT_DESCRIPTION, tr("Show help information")); 176 176 putValue(Action.NAME, tr("Help")); 177 new ImageProvider("help").getResource(). getImageIcon(this);177 new ImageProvider("help").getResource().attachImageIcon(this); 178 178 setEnabled(true); 179 179 } … … 193 193 putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts and close the dialog")); 194 194 putValue(Action.NAME, tr("Apply Resolution")); 195 new ImageProvider("dialogs", "conflict").getResource(). getImageIcon(this);195 new ImageProvider("dialogs", "conflict").getResource().attachImageIcon(this); 196 196 updateEnabledState(); 197 197 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
r10356 r10369 141 141 putValue(NAME, tr("Add")); 142 142 putValue(SHORT_DESCRIPTION, tr("Add filter.")); 143 new ImageProvider("dialogs", "add").getResource(). getImageIcon(this, true);143 new ImageProvider("dialogs", "add").getResource().attachImageIcon(this, true); 144 144 } 145 145 … … 156 156 putValue(NAME, tr("Edit")); 157 157 putValue(SHORT_DESCRIPTION, tr("Edit filter.")); 158 new ImageProvider("dialogs", "edit").getResource(). getImageIcon(this, true);158 new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true); 159 159 } 160 160 … … 174 174 putValue(NAME, tr("Delete")); 175 175 putValue(SHORT_DESCRIPTION, tr("Delete filter.")); 176 new ImageProvider("dialogs", "delete").getResource(). getImageIcon(this, true);176 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true); 177 177 } 178 178 … … 189 189 putValue(NAME, tr("Up")); 190 190 putValue(SHORT_DESCRIPTION, tr("Move filter up.")); 191 new ImageProvider("dialogs", "up").getResource(). getImageIcon(this, true);191 new ImageProvider("dialogs", "up").getResource().attachImageIcon(this, true); 192 192 } 193 193 … … 205 205 putValue(NAME, tr("Down")); 206 206 putValue(SHORT_DESCRIPTION, tr("Move filter down.")); 207 new ImageProvider("dialogs", "down").getResource(). getImageIcon(this, true);207 new ImageProvider("dialogs", "down").getResource().attachImageIcon(this, true); 208 208 } 209 209 -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r10356 r10369 299 299 putValue(NAME, tr("Search")); 300 300 putValue(SHORT_DESCRIPTION, tr("Search for objects")); 301 new ImageProvider("dialogs", "search").getResource(). getImageIcon(this, true);301 new ImageProvider("dialogs", "search").getResource().attachImageIcon(this, true); 302 302 updateEnabledState(); 303 303 } … … 361 361 putValue(NAME, tr("History")); 362 362 putValue(SHORT_DESCRIPTION, tr("Display the history of the selected objects.")); 363 new ImageProvider("dialogs", "history").getResource(). getImageIcon(this, true);363 new ImageProvider("dialogs", "history").getResource().attachImageIcon(this, true); 364 364 updateEnabledState(model.getSize()); 365 365 } … … 401 401 putValue(NAME, tr("Zoom to selection")); 402 402 putValue(SHORT_DESCRIPTION, tr("Zoom to selection")); 403 new ImageProvider("dialogs/autoscale", "selection").getResource(). getImageIcon(this, true);403 new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this, true); 404 404 updateEnabledState(); 405 405 } … … 442 442 putValue(NAME, tr("Zoom to selected element(s)")); 443 443 putValue(SHORT_DESCRIPTION, tr("Zoom to selected element(s)")); 444 new ImageProvider("dialogs/autoscale", "selection").getResource(). getImageIcon(this, true);444 new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this, true); 445 445 updateEnabledState(); 446 446 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r10356 r10369 158 158 putValue(NAME, tr("Select")); 159 159 putValue(SHORT_DESCRIPTION, tr("Select objects submitted by this user")); 160 new ImageProvider("dialogs", "select").getResource(). getImageIcon(this, true);160 new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true); 161 161 updateEnabledState(); 162 162 } … … 193 193 putValue(NAME, tr("Show info")); 194 194 putValue(SHORT_DESCRIPTION, tr("Launches a browser with information about the user")); 195 new ImageProvider("help/internet").getResource(). getImageIcon(this, true);195 new ImageProvider("help/internet").getResource().attachImageIcon(this, true); 196 196 updateEnabledState(); 197 197 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r10356 r10369 120 120 putValue(NAME, tr("Lookup")); 121 121 putValue(SHORT_DESCRIPTION, tr("Looks up the selected primitives in the error list.")); 122 new ImageProvider("dialogs", "search").getResource(). getImageIcon(this, true);122 new ImageProvider("dialogs", "search").getResource().attachImageIcon(this, true); 123 123 } 124 124 … … 141 141 putValue(NAME, tr("Fix")); 142 142 putValue(SHORT_DESCRIPTION, tr("Fix the selected issue.")); 143 new ImageProvider("dialogs", "fix").getResource(). getImageIcon(this, true);143 new ImageProvider("dialogs", "fix").getResource().attachImageIcon(this, true); 144 144 } 145 145 @Override … … 156 156 putValue(NAME, tr("Ignore")); 157 157 putValue(SHORT_DESCRIPTION, tr("Ignore the selected issue next time.")); 158 new ImageProvider("dialogs", "fix").getResource(). getImageIcon(this, true);158 new ImageProvider("dialogs", "fix").getResource().attachImageIcon(this, true); 159 159 } 160 160 @Override -
trunk/src/org/openstreetmap/josm/gui/help/ContextSensitiveHelpAction.java
r10356 r10369 47 47 putValue(SHORT_DESCRIPTION, tr("Show help information")); 48 48 putValue(NAME, tr("Help")); 49 new ImageProvider("help").getResource(). getImageIcon(this);49 new ImageProvider("help").getResource().attachImageIcon(this); 50 50 this.helpTopic = helpTopic; 51 51 setEnabled(!Main.isOffline(OnlineResource.JOSM_WEBSITE)); -
trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
r10357 r10369 259 259 putValue(Action.SHORT_DESCRIPTION, tr("Cancel uploading")); 260 260 putValue(Action.NAME, tr("Cancel")); 261 new ImageProvider("cancel").getResource(). getImageIcon(this);261 new ImageProvider("cancel").getResource().attachImageIcon(this); 262 262 getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) 263 263 .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); … … 277 277 putValue(Action.SHORT_DESCRIPTION, tr("Continue uploading")); 278 278 putValue(Action.NAME, tr("Continue")); 279 new ImageProvider("upload").getResource(). getImageIcon(this);279 new ImageProvider("upload").getResource().attachImageIcon(this); 280 280 updateEnabledState(); 281 281 } -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r10367 r10369 325 325 RunAuthorisationAction() { 326 326 putValue(NAME, tr("Authorize now")); 327 new ImageProvider("oauth", "oauth-small").getResource(). getImageIcon(this);327 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(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 new ImageProvider("dialogs", "previous").getResource(). getImageIcon(this);364 new ImageProvider("dialogs", "previous").getResource().attachImageIcon(this); 365 365 } 366 366 … … 377 377 TestAccessTokenAction() { 378 378 putValue(NAME, tr("Test Access Token")); 379 new ImageProvider("logo").getResource(). getImageIcon(this);379 new ImageProvider("logo").getResource().attachImageIcon(this); 380 380 } 381 381 -
trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
r10367 r10369 223 223 TestAccessTokenAction() { 224 224 putValue(NAME, tr("Test Access Token")); 225 new ImageProvider("oauth", "oauth-small").getResource(). getImageIcon(this);225 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(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
r10367 r10369 351 351 CancelAction() { 352 352 putValue(NAME, tr("Cancel")); 353 new ImageProvider("cancel").getResource(). getImageIcon(this);353 new ImageProvider("cancel").getResource().attachImageIcon(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 new ImageProvider("ok").getResource(). getImageIcon(this);375 new ImageProvider("ok").getResource().attachImageIcon(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
r10367 r10369 292 292 putValue(NAME, tr("Back")); 293 293 putValue(SHORT_DESCRIPTION, tr("Go back to step 1/3")); 294 new ImageProvider("dialogs", "previous").getResource(). getImageIcon(this);294 new ImageProvider("dialogs", "previous").getResource().attachImageIcon(this); 295 295 } 296 296 … … 368 368 putValue(NAME, tr("Restart")); 369 369 putValue(SHORT_DESCRIPTION, tr("Go back to step 1/3")); 370 new ImageProvider("dialogs", "previous").getResource(). getImageIcon(this);370 new ImageProvider("dialogs", "previous").getResource().attachImageIcon(this); 371 371 } 372 372 … … 389 389 RetrieveRequestTokenAction() { 390 390 putValue(NAME, tr("Retrieve Request Token")); 391 new ImageProvider("oauth", "oauth-small").getResource(). getImageIcon(this);391 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(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 new ImageProvider("oauth", "oauth-small").getResource(). getImageIcon(this);427 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(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 new ImageProvider("oauth", "oauth-small").getResource(). getImageIcon(this);464 new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this); 465 465 putValue(SHORT_DESCRIPTION, tr("Click to test the Access Token")); 466 466 } -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
r10355 r10369 157 157 CancelAction() { 158 158 putValue(NAME, tr("Cancel")); 159 new ImageProvider("cancel").getResource(). getImageIcon(this);159 new ImageProvider("cancel").getResource().attachImageIcon(this); 160 160 putValue(SHORT_DESCRIPTION, tr("Close the preferences dialog and discard preference updates")); 161 161 } … … 176 176 OKAction() { 177 177 putValue(NAME, tr("OK")); 178 new ImageProvider("ok").getResource(). getImageIcon(this);178 new ImageProvider("ok").getResource().attachImageIcon(this); 179 179 putValue(SHORT_DESCRIPTION, tr("Save the preferences and close the dialog")); 180 180 } -
trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
r10357 r10369 164 164 165 165 DeleteAction() { 166 new ImageProvider("dialogs", "delete").getResource(). getImageIcon(this);166 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this); 167 167 putValue(SHORT_DESCRIPTION, tr("Delete the selection in the tag table")); 168 168 getSelectionModel().addListSelectionListener(this); … … 253 253 class AddAction extends AbstractAction implements PropertyChangeListener { 254 254 AddAction() { 255 new ImageProvider("dialogs", "add").getResource(). getImageIcon(this);255 new ImageProvider("dialogs", "add").getResource().attachImageIcon(this); 256 256 putValue(SHORT_DESCRIPTION, tr("Add a new tag")); 257 257 TagTable.this.addPropertyChangeListener(this); … … 287 287 class PasteAction extends AbstractAction implements PropertyChangeListener { 288 288 PasteAction() { 289 new ImageProvider("pastetags").getResource(). getImageIcon(this);289 new ImageProvider("pastetags").getResource().attachImageIcon(this); 290 290 putValue(SHORT_DESCRIPTION, tr("Paste tags from buffer")); 291 291 TagTable.this.addPropertyChangeListener(this); -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
r10363 r10369 192 192 @Override 193 193 public void run() { 194 result. getImageIcon(TaggingPreset.this);194 result.attachImageIcon(TaggingPreset.this); 195 195 } 196 196 }); -
trunk/src/org/openstreetmap/josm/io/session/GenericSessionExporter.java
r9753 r10369 74 74 */ 75 75 LayerSaveAction() { 76 putValue(SMALL_ICON, new ImageProvider("save").setWidth(16).get());76 new ImageProvider("save").getResource().attachImageIcon(this); 77 77 putValue(SHORT_DESCRIPTION, ((AbstractModifiableLayer) layer).requiresSaveToFile() ? 78 78 tr("Layer contains unsaved data - save to file.") : -
trunk/src/org/openstreetmap/josm/tools/ImageResource.java
r10358 r10369 108 108 * Set both icons of an Action 109 109 * @param a The action for the icons 110 * @since 7693111 */ 112 public void getImageIcon(AbstractAction a) {110 * @since 10368 111 */ 112 public void attachImageIcon(AbstractAction a) { 113 113 Dimension iconDimension = ImageProvider.ImageSizes.SMALLICON.getImageDimension(); 114 114 ImageIcon icon = getImageIconBounded(iconDimension); … … 125 125 * @param a The action for the icons 126 126 * @param addresource Adds an resource named "ImageResource" if <code>true</code> 127 * @since 103 56128 */ 129 public void getImageIcon(AbstractAction a, boolean addresource) {130 getImageIcon(a);127 * @since 10368 128 */ 129 public void attachImageIcon(AbstractAction a, boolean addresource) { 130 attachImageIcon(a); 131 131 if (addresource) { 132 132 a.putValue("ImageResource", this);
Note:
See TracChangeset
for help on using the changeset viewer.