Changeset 13130 in josm
- Timestamp:
- 2017-11-19T20:12:24+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 68 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
r12846 r13130 160 160 { 161 161 putValue(SHORT_DESCRIPTION, tr("Add to selection")); 162 putValue(SMALL_ICON, ImageProvider.get("dialogs", "select"));162 new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true); 163 163 } 164 164 -
trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
r12846 r13130 39 39 */ 40 40 public RenameLayerAction(File file, Layer layer) { 41 super(tr("Rename layer"), ImageProvider.get("dialogs", "edit")); 41 super(tr("Rename layer")); 42 new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true); 42 43 this.file = file; 43 44 this.layer = layer; -
trunk/src/org/openstreetmap/josm/actions/ToggleUploadDiscouragedLayerAction.java
r13072 r13130 31 31 */ 32 32 public ToggleUploadDiscouragedLayerAction(OsmDataLayer layer) { 33 super(tr("Discourage upload"), ImageProvider.get("no_upload")); 33 super(tr("Discourage upload")); 34 new ImageProvider("no_upload").getResource().attachImageIcon(this, true); 34 35 this.layer = layer; 35 36 setEnabled(layer.isUploadable()); -
trunk/src/org/openstreetmap/josm/actions/relation/AddSelectionToRelations.java
r12641 r13130 31 31 */ 32 32 public AddSelectionToRelations() { 33 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copyendright"));33 new ImageProvider("dialogs/conflict", "copyendright").getResource().attachImageIcon(this, true); 34 34 putValue(SHORT_DESCRIPTION, tr("Add all objects selected in the current dataset after the last member")); 35 35 } -
trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java
r12636 r13130 28 28 putValue(SHORT_DESCRIPTION, tr("Download all members of the selected relations")); 29 29 putValue(NAME, tr("Download members")); 30 putValue(SMALL_ICON, ImageProvider.get("dialogs", "downloadincomplete"));30 new ImageProvider("dialogs", "downloadincomplete").getResource().attachImageIcon(this, true); 31 31 putValue("help", ht("/Dialog/RelationList#DownloadMembers")); 32 32 } -
trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java
r12636 r13130 31 31 public DownloadSelectedIncompleteMembersAction() { 32 32 putValue(SHORT_DESCRIPTION, tr("Download incomplete members of selected relations")); 33 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "downloadincompleteselected"));33 new ImageProvider("dialogs/relation", "downloadincompleteselected").getResource().attachImageIcon(this, true); 34 34 putValue(NAME, tr("Download incomplete members")); 35 35 } -
trunk/src/org/openstreetmap/josm/actions/relation/SelectInRelationListAction.java
r12630 r13130 22 22 putValue(NAME, tr("Select in relation list")); 23 23 putValue(SHORT_DESCRIPTION, tr("Select relation in relation list.")); 24 putValue(SMALL_ICON, ImageProvider.get("dialogs", "selectionlist"));24 new ImageProvider("dialogs", "selectionlist").getResource().attachImageIcon(this, true); 25 25 } 26 26 -
trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java
r12636 r13130 29 29 putValue(SHORT_DESCRIPTION, add ? tr("Add the members of all selected relations to current selection") 30 30 : tr("Select the members of all selected relations")); 31 putValue(SMALL_ICON, ImageProvider.get("selectall"));31 new ImageProvider("selectall").getResource().attachImageIcon(this, true); 32 32 putValue(NAME, add ? tr("Select members (add)") : tr("Select members")); 33 33 this.add = add; -
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r12678 r13130 552 552 putValue(SHORT_DESCRIPTION, tr("Show help information")); 553 553 putValue(NAME, tr("Help")); 554 putValue(SMALL_ICON, ImageProvider.get("help"));554 new ImageProvider("help").getResource().attachImageIcon(this, true); 555 555 setEnabled(!Main.isOffline(OnlineResource.JOSM_WEBSITE)); 556 556 } -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r12620 r13130 506 506 class ApplyTileAddressAction extends AbstractAction { 507 507 ApplyTileAddressAction() { 508 putValue(SMALL_ICON, ImageProvider.get("apply"));508 new ImageProvider("apply").getResource().attachImageIcon(this, true); 509 509 putValue(SHORT_DESCRIPTION, tr("Apply the tile address")); 510 510 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/AbstractListMerger.java
r12636 r13130 18 18 import javax.swing.AbstractAction; 19 19 import javax.swing.Action; 20 import javax.swing.ImageIcon;21 20 import javax.swing.JButton; 22 21 import javax.swing.JCheckBox; … … 42 41 import org.openstreetmap.josm.gui.widgets.OsmPrimitivesTable; 43 42 import org.openstreetmap.josm.tools.ImageProvider; 43 import org.openstreetmap.josm.tools.ImageResource; 44 44 45 45 /** … … 422 422 423 423 protected CopyAction(String iconName, String actionName, String shortDescription) { 424 ImageIcon icon = ImageProvider.get("dialogs/conflict", iconName); 425 putValue(Action.SMALL_ICON, icon); 424 ImageResource icon = new ImageProvider("dialogs/conflict", iconName).getResource(); 426 425 if (icon == null) { 427 426 putValue(Action.NAME, actionName); 427 } else { 428 icon.attachImageIcon(this, true); 428 429 } 429 430 putValue(Action.SHORT_DESCRIPTION, shortDescription); … … 627 628 628 629 CopyAllLeft() { 629 ImageIcon icon = ImageProvider.get("dialogs/conflict", "useallleft"); 630 putValue(Action.SMALL_ICON, icon); 630 new ImageProvider("dialogs/conflict", "useallleft").getResource().attachImageIcon(this, true); 631 631 putValue(Action.SHORT_DESCRIPTION, tr("Copy all my elements to the target")); 632 632 } … … 656 656 657 657 CopyAllRight() { 658 ImageIcon icon = ImageProvider.get("dialogs/conflict", "useallright"); 659 putValue(Action.SMALL_ICON, icon); 658 new ImageProvider("dialogs/conflict", "useallright").getResource().attachImageIcon(this, true); 660 659 putValue(Action.SHORT_DESCRIPTION, tr("Copy all their elements to the target")); 661 660 } … … 685 684 686 685 MoveUpMergedAction() { 687 ImageIcon icon = ImageProvider.get("dialogs/conflict", "moveup"); 688 putValue(Action.SMALL_ICON, icon); 686 ImageResource icon = new ImageProvider("dialogs/conflict", "moveup").getResource(); 689 687 if (icon == null) { 690 688 putValue(Action.NAME, tr("Up")); 689 } else { 690 icon.attachImageIcon(this, true); 691 691 } 692 692 putValue(Action.SHORT_DESCRIPTION, tr("Move up the selected entries by one position.")); … … 717 717 718 718 MoveDownMergedAction() { 719 ImageIcon icon = ImageProvider.get("dialogs/conflict", "movedown"); 720 putValue(Action.SMALL_ICON, icon); 719 ImageResource icon = new ImageProvider("dialogs/conflict", "movedown").getResource(); 721 720 if (icon == null) { 722 721 putValue(Action.NAME, tr("Down")); 722 } else { 723 icon.attachImageIcon(this, true); 723 724 } 724 725 putValue(Action.SHORT_DESCRIPTION, tr("Move down the selected entries by one position.")); … … 749 750 750 751 RemoveMergedAction() { 751 ImageIcon icon = ImageProvider.get("dialogs/conflict", "remove"); 752 putValue(Action.SMALL_ICON, icon); 752 ImageResource icon = new ImageProvider("dialogs/conflict", "remove").getResource(); 753 753 if (icon == null) { 754 754 putValue(Action.NAME, tr("Remove")); 755 } else { 756 icon.attachImageIcon(this, true); 755 757 } 756 758 putValue(Action.SHORT_DESCRIPTION, tr("Remove the selected entries from the list of merged elements.")); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
r12663 r13130 346 346 class KeepMyCoordinatesAction extends AbstractAction implements ChangeListener { 347 347 KeepMyCoordinatesAction() { 348 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagkeepmine"));348 new ImageProvider("dialogs/conflict", "tagkeepmine").getResource().attachImageIcon(this, true); 349 349 putValue(Action.SHORT_DESCRIPTION, tr("Keep my coordinates")); 350 350 } … … 363 363 class KeepTheirCoordinatesAction extends AbstractAction implements ChangeListener { 364 364 KeepTheirCoordinatesAction() { 365 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagkeeptheir"));365 new ImageProvider("dialogs/conflict", "tagkeeptheir").getResource().attachImageIcon(this, true); 366 366 putValue(Action.SHORT_DESCRIPTION, tr("Keep their coordinates")); 367 367 } … … 380 380 class UndecideCoordinateConflictAction extends AbstractAction implements ChangeListener { 381 381 UndecideCoordinateConflictAction() { 382 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagundecide"));382 new ImageProvider("dialogs/conflict", "tagundecide").getResource().attachImageIcon(this, true); 383 383 putValue(Action.SHORT_DESCRIPTION, tr("Undecide conflict between different coordinates")); 384 384 } … … 397 397 class KeepMyDeletedStateAction extends AbstractAction implements ChangeListener { 398 398 KeepMyDeletedStateAction() { 399 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagkeepmine"));399 new ImageProvider("dialogs/conflict", "tagkeepmine").getResource().attachImageIcon(this, true); 400 400 putValue(Action.SHORT_DESCRIPTION, tr("Keep my deleted state")); 401 401 } … … 414 414 class KeepTheirDeletedStateAction extends AbstractAction implements ChangeListener { 415 415 KeepTheirDeletedStateAction() { 416 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagkeeptheir"));416 new ImageProvider("dialogs/conflict", "tagkeeptheir").getResource().attachImageIcon(this, true); 417 417 putValue(Action.SHORT_DESCRIPTION, tr("Keep their deleted state")); 418 418 } … … 431 431 class UndecideDeletedStateConflictAction extends AbstractAction implements ChangeListener { 432 432 UndecideDeletedStateConflictAction() { 433 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagundecide"));433 new ImageProvider("dialogs/conflict", "tagundecide").getResource().attachImageIcon(this, true); 434 434 putValue(Action.SHORT_DESCRIPTION, tr("Undecide conflict between deleted state")); 435 435 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
r12050 r13130 17 17 import javax.swing.AbstractAction; 18 18 import javax.swing.Action; 19 import javax.swing.ImageIcon;20 19 import javax.swing.JButton; 21 20 import javax.swing.JComponent; … … 33 32 import org.openstreetmap.josm.tools.GBC; 34 33 import org.openstreetmap.josm.tools.ImageProvider; 34 import org.openstreetmap.josm.tools.ImageResource; 35 35 36 36 /** … … 180 180 class KeepMineAction extends AbstractAction implements ListSelectionListener { 181 181 KeepMineAction() { 182 Image Icon icon = ImageProvider.get("dialogs/conflict", "tagkeepmine");182 ImageResource icon = new ImageProvider("dialogs/conflict", "tagkeepmine").getResource(); 183 183 if (icon != null) { 184 putValue(Action.SMALL_ICON, icon);184 icon.attachImageIcon(this, true); 185 185 putValue(Action.NAME, ""); 186 186 } else { … … 212 212 class KeepTheirAction extends AbstractAction implements ListSelectionListener { 213 213 KeepTheirAction() { 214 Image Icon icon = ImageProvider.get("dialogs/conflict", "tagkeeptheir");214 ImageResource icon = new ImageProvider("dialogs/conflict", "tagkeeptheir").getResource(); 215 215 if (icon != null) { 216 putValue(Action.SMALL_ICON, icon);216 icon.attachImageIcon(this, true); 217 217 putValue(Action.NAME, ""); 218 218 } else { … … 310 310 311 311 UndecideAction() { 312 Image Icon icon = ImageProvider.get("dialogs/conflict", "tagundecide");312 ImageResource icon = new ImageProvider("dialogs/conflict", "tagundecide").getResource(); 313 313 if (icon != null) { 314 putValue(Action.SMALL_ICON, icon);314 icon.attachImageIcon(this, true); 315 315 putValue(Action.NAME, ""); 316 316 } else { -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java
r12301 r13130 44 44 */ 45 45 public InfoAction(Layer layer) { 46 super(tr("Info"), ImageProvider.get("info")); 46 super(tr("Info")); 47 new ImageProvider("info").getResource().attachImageIcon(this, true); 47 48 putValue("help", ht("/Action/LayerInfo")); 48 49 this.layer = layer; -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
r12636 r13130 295 295 DownloadObjectAction() { 296 296 putValue(NAME, tr("Download objects")); 297 putValue(SMALL_ICON, ImageProvider.get("downloadprimitive"));297 new ImageProvider("downloadprimitive").getResource().attachImageIcon(this, true); 298 298 putValue(SHORT_DESCRIPTION, tr("Download the current version of the selected objects")); 299 299 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/DuplicateAction.java
r12636 r13130 45 45 this.model = model; 46 46 putValue(NAME, tr("Duplicate")); 47 putValue(SMALL_ICON, ImageProvider.get("dialogs", "duplicatelayer"));47 new ImageProvider("dialogs", "duplicatelayer").getResource().attachImageIcon(this, true); 48 48 putValue(SHORT_DESCRIPTION, tr("Duplicate this layer")); 49 49 putValue("help", HelpUtil.ht("/Dialog/LayerList#DuplicateLayer")); -
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/ShowHideLayerAction.java
r12799 r13130 39 39 this.model = model; 40 40 putValue(NAME, tr("Show/hide")); 41 putValue(SMALL_ICON, ImageProvider.get("dialogs", "showhide"));41 new ImageProvider("dialogs", "showhide").getResource().attachImageIcon(this, true); 42 42 putValue(SHORT_DESCRIPTION, tr("Toggle visible state of the selected layer.")); 43 43 putValue("help", HelpUtil.ht("/Dialog/LayerList#ShowHideLayer")); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r12881 r13130 63 63 import org.openstreetmap.josm.command.ChangePropertyCommand; 64 64 import org.openstreetmap.josm.command.Command; 65 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;66 65 import org.openstreetmap.josm.data.SelectionChangedListener; 67 66 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; … … 101 100 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 102 101 import org.openstreetmap.josm.spi.preferences.Config; 102 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 103 103 import org.openstreetmap.josm.tools.AlphanumComparator; 104 104 import org.openstreetmap.josm.tools.GBC; … … 1126 1126 putValue(NAME, tr("Go to OSM wiki for tag help")); 1127 1127 putValue(SHORT_DESCRIPTION, tr("Launch browser with wiki help for selected object")); 1128 putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));1128 new ImageProvider("dialogs", "search").getResource().attachImageIcon(this, true); 1129 1129 putValue(ACCELERATOR_KEY, getKeyStroke()); 1130 1130 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
r12675 r13130 177 177 EditAction() { 178 178 putValue(SHORT_DESCRIPTION, tr("Edit the relation the currently selected relation member refers to.")); 179 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));179 new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true); 180 180 putValue(NAME, tr("Edit")); 181 181 refreshEnabled(); … … 222 222 DownloadAllChildRelationsAction() { 223 223 putValue(SHORT_DESCRIPTION, tr("Download all child relations (recursively)")); 224 putValue(SMALL_ICON, ImageProvider.get("download"));224 new ImageProvider("download").getResource().attachImageIcon(this, true); 225 225 putValue(NAME, tr("Download All Children")); 226 226 } … … 245 245 putValue(SHORT_DESCRIPTION, tr("Download selected relations")); 246 246 // FIXME: replace with better icon 247 // 248 putValue(SMALL_ICON, ImageProvider.get("download")); 247 new ImageProvider("download").getResource().attachImageIcon(this, true); 249 248 putValue(NAME, tr("Download Selected Children")); 250 249 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAfterSelection.java
r12620 r13130 28 28 super(null, memberTableModel, null, selectionTableModel, null, null, editor); 29 29 putValue(SHORT_DESCRIPTION, tr("Add all objects selected in the current dataset after the last selected member")); 30 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copyaftercurrentright"));30 new ImageProvider("dialogs/conflict", "copyaftercurrentright").getResource().attachImageIcon(this, true); 31 31 updateEnabledState(); 32 32 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtEndAction.java
r12620 r13130 28 28 super(null, memberTableModel, null, selectionTableModel, null, null, editor); 29 29 putValue(SHORT_DESCRIPTION, tr("Add all objects selected in the current dataset after the last member")); 30 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copyendright"));30 new ImageProvider("dialogs/conflict", "copyendright").getResource().attachImageIcon(this, true); 31 31 updateEnabledState(); 32 32 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtStartAction.java
r12620 r13130 28 28 super(null, memberTableModel, null, selectionTableModel, null, null, editor); 29 29 putValue(SHORT_DESCRIPTION, tr("Add all objects selected in the current dataset before the first member")); 30 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copystartright"));30 new ImageProvider("dialogs/conflict", "copystartright").getResource().attachImageIcon(this, true); 31 31 updateEnabledState(); 32 32 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedBeforeSelection.java
r12620 r13130 28 28 super(null, memberTableModel, null, selectionTableModel, null, null, editor); 29 29 putValue(SHORT_DESCRIPTION, tr("Add all objects selected in the current dataset before the first selected member")); 30 putValue(SMALL_ICON, ImageProvider.get("dialogs/conflict", "copybeforecurrentright"));30 new ImageProvider("dialogs/conflict", "copybeforecurrentright").getResource().attachImageIcon(this, true); 31 31 updateEnabledState(); 32 32 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ApplyAction.java
r10152 r13130 35 35 super(memberTable, memberTableModel, tagModel, layer, editor, null); 36 36 putValue(SHORT_DESCRIPTION, tr("Apply the current updates")); 37 putValue(SMALL_ICON, ImageProvider.get("save"));37 new ImageProvider("save").getResource().attachImageIcon(this, true); 38 38 putValue(NAME, tr("Apply")); 39 39 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DeleteCurrentRelationAction.java
r9665 r13130 29 29 super(null, null, null, layer, editor); 30 30 putValue(SHORT_DESCRIPTION, tr("Delete the currently edited relation")); 31 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));31 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true); 32 32 putValue(NAME, tr("Delete")); 33 33 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadIncompleteMembersAction.java
r12634 r13130 40 40 sc.setAccelerator(this); 41 41 putValue(SHORT_DESCRIPTION, Main.platform.makeTooltip(tr("Download all incomplete members"), sc)); 42 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "downloadincomplete"));42 new ImageProvider("dialogs/relation", "downloadincomplete").getResource().attachImageIcon(this, true); 43 43 putValue(NAME, tr("Download Members")); 44 44 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadSelectedIncompleteMembersAction.java
r12634 r13130 35 35 super(memberTable, memberTableModel, actionMapKey, layer, editor); 36 36 putValue(SHORT_DESCRIPTION, tr("Download selected incomplete members")); 37 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "downloadincompleteselected"));37 new ImageProvider("dialogs/relation", "downloadincompleteselected").getResource().attachImageIcon(this, true); 38 38 putValue(NAME, tr("Download Members")); 39 39 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DuplicateRelationAction.java
r9665 r13130 33 33 putValue(SHORT_DESCRIPTION, tr("Create a copy of this relation and open it in another editor window")); 34 34 // FIXME provide an icon 35 putValue(SMALL_ICON, ImageProvider.get("duplicate"));35 new ImageProvider("duplicate").getResource().attachImageIcon(this, true); 36 36 putValue(NAME, tr("Duplicate")); 37 37 setEnabled(true); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/EditAction.java
r9665 r13130 32 32 super(memberTable, memberTableModel, null, layer, null); 33 33 putValue(SHORT_DESCRIPTION, tr("Edit the relation the currently selected relation member refers to")); 34 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));34 new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true); 35 35 updateEnabledState(); 36 36 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveDownAction.java
r9665 r13130 27 27 public MoveDownAction(MemberTable memberTable, MemberTableModel memberTableModel, String actionMapKey) { 28 28 super(memberTable, memberTableModel, actionMapKey); 29 putValue(SMALL_ICON, ImageProvider.get("dialogs", "movedown"));29 new ImageProvider("dialogs", "movedown").getResource().attachImageIcon(this, true); 30 30 Shortcut sc = Shortcut.registerShortcut("relationeditor:movedown", tr("Relation Editor: Move Down"), KeyEvent.VK_DOWN, Shortcut.ALT); 31 31 sc.setAccelerator(this); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveUpAction.java
r9665 r13130 27 27 public MoveUpAction(MemberTable memberTable, MemberTableModel memberTableModel, String actionMapKey) { 28 28 super(memberTable, memberTableModel, actionMapKey); 29 putValue(SMALL_ICON, ImageProvider.get("dialogs", "moveup"));29 new ImageProvider("dialogs", "moveup").getResource().attachImageIcon(this, true); 30 30 Shortcut sc = Shortcut.registerShortcut("relationeditor:moveup", tr("Relation Editor: Move Up"), KeyEvent.VK_UP, Shortcut.ALT); 31 31 sc.setAccelerator(this); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RefreshAction.java
r12718 r13130 45 45 // CHECKSTYLE.ON: LineLength 46 46 putValue(SHORT_DESCRIPTION, Main.platform.makeTooltip(tr("Refresh relation from data layer"), sc)); 47 putValue(SMALL_ICON, ImageProvider.get("dialogs/refresh"));47 new ImageProvider("dialogs/refresh").getResource().attachImageIcon(this, true); 48 48 putValue(NAME, tr("Refresh")); 49 49 if (editor instanceof JComponent) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveAction.java
r9665 r13130 27 27 public RemoveAction(MemberTable memberTable, MemberTableModel memberTableModel, String actionMapKey) { 28 28 super(memberTable, memberTableModel, actionMapKey); 29 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));29 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true); 30 30 putValue(NAME, tr("Remove")); 31 31 Shortcut sc = Shortcut.registerShortcut("relationeditor:remove", tr("Relation Editor: Remove"), KeyEvent.VK_DELETE, Shortcut.ALT); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveSelectedAction.java
r10383 r13130 27 27 super(null, memberTableModel, null, selectionTableModel, null, layer, null); 28 28 putValue(SHORT_DESCRIPTION, tr("Remove all members referring to one of the selected objects")); 29 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "deletemembers"));29 new ImageProvider("dialogs/relation", "deletemembers").getResource().attachImageIcon(this, true); 30 30 updateEnabledState(); 31 31 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ReverseAction.java
r9991 r13130 24 24 super(memberTable, memberTableModel, null); 25 25 putValue(SHORT_DESCRIPTION, tr("Reverse the order of the relation members")); 26 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "reverse"));26 new ImageProvider("dialogs/relation", "reverse").getResource().attachImageIcon(this, true); 27 27 putValue(NAME, tr("Reverse")); 28 28 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectPrimitivesForSelectedMembersAction.java
r9665 r13130 27 27 super(memberTable, memberTableModel, null, layer, null); 28 28 putValue(SHORT_DESCRIPTION, tr("Select objects for selected relation members")); 29 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "selectprimitives"));29 new ImageProvider("dialogs/relation", "selectprimitives").getResource().attachImageIcon(this, true); 30 30 updateEnabledState(); 31 31 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectedMembersForSelectionAction.java
r9665 r13130 26 26 super(null, memberTableModel, null, selectionTableModel, null, layer, null); 27 27 putValue(SHORT_DESCRIPTION, tr("Select relation members which refer to objects in the current selection")); 28 putValue(SMALL_ICON, ImageProvider.get("dialogs/relation", "selectmembers"));28 new ImageProvider("dialogs/relation", "selectmembers").getResource().attachImageIcon(this, true); 29 29 updateEnabledState(); 30 30 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortAction.java
r9665 r13130 26 26 public SortAction(MemberTable memberTable, MemberTableModel memberTableModel) { 27 27 super(memberTable, memberTableModel, null); 28 putValue(SMALL_ICON, ImageProvider.get("dialogs", "sort"));28 new ImageProvider("dialogs", "sort").getResource().attachImageIcon(this, true); 29 29 putValue(NAME, tr("Sort")); 30 30 Shortcut sc = Shortcut.registerShortcut("relationeditor:sort", tr("Relation Editor: Sort"), KeyEvent.VK_END, Shortcut.ALT); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortBelowAction.java
r9665 r13130 23 23 public SortBelowAction(MemberTable memberTable, MemberTableModel memberTableModel) { 24 24 super(memberTable, memberTableModel, null); 25 putValue(SMALL_ICON, ImageProvider.get("dialogs", "sort_below"));25 new ImageProvider("dialogs", "sort_below").getResource().attachImageIcon(this, true); 26 26 putValue(NAME, tr("Sort below")); 27 27 putValue(SHORT_DESCRIPTION, tr("Sort the selected relation members and all members below")); -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
r12743 r13130 180 180 AddAction() { 181 181 putValue(NAME, tr("Create bookmark")); 182 putValue(SMALL_ICON, ImageProvider.get("dialogs", "bookmark-new"));182 new ImageProvider("dialogs", "bookmark-new").getResource().attachImageIcon(this, true); 183 183 putValue(SHORT_DESCRIPTION, tr("Add a bookmark for the currently selected download area")); 184 184 } … … 215 215 */ 216 216 RemoveAction() { 217 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));217 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true); 218 218 putValue(SHORT_DESCRIPTION, tr("Remove the currently selected bookmarks")); 219 219 updateEnabledState(); … … 246 246 */ 247 247 RenameAction() { 248 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));248 new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true); 249 249 putValue(SHORT_DESCRIPTION, tr("Rename the currently selected bookmark")); 250 250 updateEnabledState(); … … 288 288 */ 289 289 RefreshAction() { 290 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangeset"));290 new ImageProvider("dialogs/changeset", "downloadchangeset").getResource().attachImageIcon(this, true); 291 291 putValue(SHORT_DESCRIPTION, tr("Download bookmarks for my {0} last changesets", BookmarkList.MAX_CHANGESET_BOOKMARKS.get())); 292 292 setEnabled(!UserIdentityManager.getInstance().isAnonymous()); -
trunk/src/org/openstreetmap/josm/gui/download/OverpassDownloadSource.java
r13051 r13130 286 286 */ 287 287 AddSnippetAction() { 288 super(); 289 putValue(SMALL_ICON, ImageProvider.get(ACTION_IMG_SUBDIR, "add")); 288 new ImageProvider(ACTION_IMG_SUBDIR, "add").getResource().attachImageIcon(this, true); 290 289 putValue(SHORT_DESCRIPTION, tr("Add new snippet")); 291 290 } … … 306 305 */ 307 306 RemoveSnippetAction() { 308 super(); 309 putValue(SMALL_ICON, ImageProvider.get(ACTION_IMG_SUBDIR, "delete")); 307 new ImageProvider(ACTION_IMG_SUBDIR, "delete").getResource().attachImageIcon(this, true); 310 308 putValue(SHORT_DESCRIPTION, tr("Delete selected snippet")); 311 309 checkEnabled(); … … 340 338 EditSnippetAction() { 341 339 super(); 342 putValue(SMALL_ICON, ImageProvider.get(ACTION_IMG_SUBDIR, "edit"));340 new ImageProvider(ACTION_IMG_SUBDIR, "edit").getResource().attachImageIcon(this, true); 343 341 putValue(SHORT_DESCRIPTION, tr("Edit selected snippet")); 344 342 checkEnabled(); -
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r12846 r13130 180 180 SearchAction() { 181 181 putValue(NAME, tr("Search ...")); 182 putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));182 new ImageProvider("dialogs", "search").getResource().attachImageIcon(this, true); 183 183 putValue(SHORT_DESCRIPTION, tr("Click to start searching for places")); 184 184 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r12678 r13130 431 431 super(browser); 432 432 putValue(SHORT_DESCRIPTION, tr("Open the current help page in an external browser")); 433 putValue(SMALL_ICON, ImageProvider.get("help", "internet"));433 new ImageProvider("help", "internet").getResource().attachImageIcon(this, true); 434 434 } 435 435 … … 449 449 super(browser); 450 450 putValue(SHORT_DESCRIPTION, tr("Edit the current help page")); 451 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));451 new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true); 452 452 } 453 453 … … 489 489 super(browser); 490 490 putValue(SHORT_DESCRIPTION, tr("Reload the current help page")); 491 putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));491 new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this, true); 492 492 } 493 493 … … 508 508 browser.getHistory().addChangeListener(this); 509 509 putValue(SHORT_DESCRIPTION, tr("Go to the previous page")); 510 putValue(SMALL_ICON, ImageProvider.get("help", "previous"));510 new ImageProvider("help", "previous").getResource().attachImageIcon(this, true); 511 511 setEnabled(browser.getHistory().canGoBack()); 512 512 } … … 533 533 browser.getHistory().addChangeListener(this); 534 534 putValue(SHORT_DESCRIPTION, tr("Go to the next page")); 535 putValue(SMALL_ICON, ImageProvider.get("help", "next"));535 new ImageProvider("help", "next").getResource().attachImageIcon(this, true); 536 536 setEnabled(browser.getHistory().canGoForward()); 537 537 } … … 557 557 super(browser); 558 558 putValue(SHORT_DESCRIPTION, tr("Go to the JOSM help home page")); 559 putValue(SMALL_ICON, ImageProvider.get("help", "home"));559 new ImageProvider("help", "home").getResource().attachImageIcon(this, true); 560 560 } 561 561 -
trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java
r12636 r13130 240 240 putValue(NAME, tr("Zoom to node")); 241 241 putValue(SHORT_DESCRIPTION, tr("Zoom to this node in the current data layer")); 242 putValue(SMALL_ICON, ImageProvider.get("dialogs", "zoomin"));242 new ImageProvider("dialogs", "zoomin").getResource().attachImageIcon(this, true); 243 243 } 244 244 … … 285 285 putValue(NAME, tr("Show history")); 286 286 putValue(SHORT_DESCRIPTION, tr("Open a history browser with the history of this node")); 287 putValue(SMALL_ICON, ImageProvider.get("dialogs", "history"));287 new ImageProvider("dialogs", "history").getResource().attachImageIcon(this, true); 288 288 } 289 289 -
trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
r13014 r13130 307 307 308 308 OpenChangesetDialogAction(Class<? extends JComponent> componentToSelect) { 309 super(tr("Changeset"), new ImageProvider("dialogs/changeset", "changesetmanager").resetMaxSize(new Dimension(16, 16)).get()); 309 super(tr("Changeset")); 310 new ImageProvider("dialogs/changeset", "changesetmanager").resetMaxSize(new Dimension(16, 16)) 311 .getResource().attachImageIcon(this, true); 310 312 putValue(SHORT_DESCRIPTION, tr("Opens the Changeset Manager window for the selected changesets")); 311 313 this.componentToSelect = componentToSelect; -
trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java
r12846 r13130 155 155 putValue(NAME, tr("Changeset info")); 156 156 putValue(SHORT_DESCRIPTION, tr("Launch browser with information about the changeset")); 157 putValue(SMALL_ICON, ImageProvider.get("data/changeset"));157 new ImageProvider("data/changeset").getResource().attachImageIcon(this, true); 158 158 } 159 159 … … 192 192 putValue(NAME, tr("User info")); 193 193 putValue(SHORT_DESCRIPTION, tr("Launch browser with information about the user")); 194 putValue(SMALL_ICON, ImageProvider.get("data/user"));194 new ImageProvider("data/user").getResource().attachImageIcon(this, true); 195 195 } 196 196 -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
r12846 r13130 295 295 RefreshAction() { 296 296 putValue(SHORT_DESCRIPTION, tr("Load the list of your open changesets from the server")); 297 putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));297 new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this, true); 298 298 } 299 299 … … 310 310 class CloseChangesetAction extends AbstractAction implements ItemListener { 311 311 CloseChangesetAction() { 312 putValue(SMALL_ICON, ImageProvider.get("closechangeset"));312 new ImageProvider("closechangeset").getResource().attachImageIcon(this, true); 313 313 putValue(SHORT_DESCRIPTION, tr("Close the currently selected open changeset")); 314 314 refreshEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
r12678 r13130 116 116 CloseAction() { 117 117 putValue(NAME, tr("Close changesets")); 118 putValue(SMALL_ICON, ImageProvider.get("closechangeset"));118 new ImageProvider("closechangeset").getResource().attachImageIcon(this, true); 119 119 putValue(SHORT_DESCRIPTION, tr("Close the selected open changesets")); 120 120 refreshEnabledState(); … … 142 142 CancelAction() { 143 143 putValue(NAME, tr("Cancel")); 144 putValue(SMALL_ICON, ImageProvider.get("cancel"));144 new ImageProvider("cancel").getResource().attachImageIcon(this, true); 145 145 putValue(SHORT_DESCRIPTION, tr("Cancel closing of changesets")); 146 146 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r13069 r13130 364 364 putValue(NAME, tr("Cancel")); 365 365 putValue(SHORT_DESCRIPTION, tr("Close this dialog and resume editing in JOSM")); 366 putValue(SMALL_ICON, ImageProvider.get("cancel"));366 new ImageProvider("cancel").getResource().attachImageIcon(this, true); 367 367 InputMapUtils.addEscapeAction(getRootPane(), this); 368 368 } … … 398 398 putValue(NAME, tr("Exit now!")); 399 399 putValue(SHORT_DESCRIPTION, tr("Exit JOSM without saving. Unsaved changes are lost.")); 400 putValue(SMALL_ICON, ImageProvider.get("exit"));400 new ImageProvider("exit").getResource().attachImageIcon(this, true); 401 401 break; 402 402 case RESTART: 403 403 putValue(NAME, tr("Restart now!")); 404 404 putValue(SHORT_DESCRIPTION, tr("Restart JOSM without saving. Unsaved changes are lost.")); 405 putValue(SMALL_ICON, ImageProvider.get("restart"));405 new ImageProvider("restart").getResource().attachImageIcon(this, true); 406 406 break; 407 407 case DELETE: 408 408 putValue(NAME, tr("Delete now!")); 409 409 putValue(SHORT_DESCRIPTION, tr("Delete layers without saving. Unsaved changes are lost.")); 410 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));410 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true); 411 411 break; 412 412 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r12881 r13130 43 43 import org.openstreetmap.josm.Main; 44 44 import org.openstreetmap.josm.data.APIDataSet; 45 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;46 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;47 45 import org.openstreetmap.josm.data.Version; 48 46 import org.openstreetmap.josm.data.osm.Changeset; 49 47 import org.openstreetmap.josm.data.osm.DataSet; 50 48 import org.openstreetmap.josm.data.osm.OsmPrimitive; 51 import org.openstreetmap.josm.spi.preferences.Setting;52 49 import org.openstreetmap.josm.gui.ExtendedDialog; 53 50 import org.openstreetmap.josm.gui.HelpAwareOptionPane; … … 61 58 import org.openstreetmap.josm.io.UploadStrategySpecification; 62 59 import org.openstreetmap.josm.spi.preferences.Config; 60 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 61 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 62 import org.openstreetmap.josm.spi.preferences.Setting; 63 63 import org.openstreetmap.josm.tools.GBC; 64 64 import org.openstreetmap.josm.tools.ImageOverlay; … … 433 433 this.dialog = dialog; 434 434 putValue(NAME, tr("Upload Changes")); 435 putValue(SMALL_ICON, ImageProvider.get("upload"));435 new ImageProvider("upload").getResource().attachImageIcon(this, true); 436 436 putValue(SHORT_DESCRIPTION, tr("Upload the changed primitives")); 437 437 } … … 588 588 this.dialog = dialog; 589 589 putValue(NAME, tr("Cancel")); 590 putValue(SMALL_ICON, ImageProvider.get("cancel"));590 new ImageProvider("cancel").getResource().attachImageIcon(this, true); 591 591 putValue(SHORT_DESCRIPTION, tr("Cancel the upload and resume editing")); 592 592 } -
trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java
r12460 r13130 41 41 */ 42 42 public CustomizeColor(List<Layer> l) { 43 super(tr("Customize Color"), ImageProvider.get("colorchooser")); 43 super(tr("Customize Color")); 44 new ImageProvider("colorchooser").getResource().attachImageIcon(this, true); 44 45 colors = l.stream().map(Layer::getColorProperty).collect(Collectors.toList()); 45 46 CheckParameterUtil.ensureThat(colors.stream().allMatch(Objects::nonNull), "All layers must have colors."); -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r12987 r13130 543 543 */ 544 544 public LayerSaveAction(Layer layer) { 545 putValue(SMALL_ICON, ImageProvider.get("save"));545 new ImageProvider("save").getResource().attachImageIcon(this, true); 546 546 putValue(SHORT_DESCRIPTION, tr("Save the current data.")); 547 547 putValue(NAME, tr("Save")); … … 567 567 */ 568 568 public LayerSaveAsAction(Layer layer) { 569 putValue(SMALL_ICON, ImageProvider.get("save_as"));569 new ImageProvider("save_as").getResource().attachImageIcon(this, true); 570 570 putValue(SHORT_DESCRIPTION, tr("Save the current data to a new file.")); 571 571 putValue(NAME, tr("Save As...")); … … 591 591 */ 592 592 public LayerGpxExportAction(Layer layer) { 593 putValue(SMALL_ICON, ImageProvider.get("exportgpx"));593 new ImageProvider("exportgpx").getResource().attachImageIcon(this, true); 594 594 putValue(SHORT_DESCRIPTION, tr("Export the data to GPX file.")); 595 595 putValue(NAME, tr("Export to GPX...")); -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r12987 r13130 860 860 */ 861 861 public ConvertToGpxLayerAction() { 862 super(tr("Convert to GPX layer"), ImageProvider.get("converttogpx")); 862 super(tr("Convert to GPX layer")); 863 new ImageProvider("converttogpx").getResource().attachImageIcon(this, true); 863 864 putValue("help", ht("/Action/ConvertToGpxLayer")); 864 865 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r13093 r13130 107 107 */ 108 108 public CorrelateGpxWithImages(GeoImageLayer layer) { 109 super(tr("Correlate to GPX"), ImageProvider.get("dialogs/geoimage/gpx2img")); 109 super(tr("Correlate to GPX")); 110 new ImageProvider("dialogs/geoimage/gpx2img").getResource().attachImageIcon(this, true); 110 111 this.yLayer = layer; 111 112 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r13042 r13130 17 17 import javax.swing.AbstractAction; 18 18 import javax.swing.Box; 19 import javax.swing.ImageIcon;20 19 import javax.swing.JButton; 21 20 import javax.swing.JComponent; … … 95 94 Dimension buttonDim = new Dimension(26, 26); 96 95 97 ImageAction prevAction = new ImageAction(COMMAND_PREVIOUS, ImageProvider.get("dialogs", "previous"), tr("Previous"));96 ImageAction prevAction = new ImageAction(COMMAND_PREVIOUS, new ImageProvider("dialogs", "previous"), tr("Previous")); 98 97 btnPrevious = new JButton(prevAction); 99 98 btnPrevious.setPreferredSize(buttonDim); … … 107 106 108 107 final String removePhoto = tr("Remove photo from layer"); 109 ImageAction delAction = new ImageAction(COMMAND_REMOVE, ImageProvider.get("dialogs", "delete"), removePhoto);108 ImageAction delAction = new ImageAction(COMMAND_REMOVE, new ImageProvider("dialogs", "delete"), removePhoto); 110 109 JButton btnDelete = new JButton(delAction); 111 110 btnDelete.setPreferredSize(buttonDim); … … 117 116 118 117 ImageAction delFromDiskAction = new ImageAction(COMMAND_REMOVE_FROM_DISK, 119 ImageProvider.get("dialogs", "geoimage/deletefromdisk"), tr("Delete image file from disk"));118 new ImageProvider("dialogs", "geoimage/deletefromdisk"), tr("Delete image file from disk")); 120 119 JButton btnDeleteFromDisk = new JButton(delFromDiskAction); 121 120 btnDeleteFromDisk.setPreferredSize(buttonDim); … … 127 126 btnDeleteFromDisk.getActionMap().put(deleteImage, delFromDiskAction); 128 127 129 ImageAction copyPathAction = new ImageAction(COMMAND_COPY_PATH, ImageProvider.get("copy"), tr("Copy image path"));128 ImageAction copyPathAction = new ImageAction(COMMAND_COPY_PATH, new ImageProvider("copy"), tr("Copy image path")); 130 129 JButton btnCopyPath = new JButton(copyPathAction); 131 130 btnCopyPath.setPreferredSize(buttonDim); … … 137 136 btnCopyPath.getActionMap().put(copyImage, copyPathAction); 138 137 139 ImageAction nextAction = new ImageAction(COMMAND_NEXT, ImageProvider.get("dialogs", "next"), tr("Next"));138 ImageAction nextAction = new ImageAction(COMMAND_NEXT, new ImageProvider("dialogs", "next"), tr("Next")); 140 139 btnNext = new JButton(nextAction); 141 140 btnNext.setPreferredSize(buttonDim); … … 160 159 161 160 tbCentre = new JToggleButton(new ImageAction(COMMAND_CENTERVIEW, 162 ImageProvider.get("dialogs", "centreview"), tr("Center view")));161 new ImageProvider("dialogs", "centreview"), tr("Center view"))); 163 162 tbCentre.setPreferredSize(buttonDim); 164 163 165 164 JButton btnZoomBestFit = new JButton(new ImageAction(COMMAND_ZOOM, 166 ImageProvider.get("dialogs", "zoom-best-fit"), tr("Zoom best fit and 1:1")));165 new ImageProvider("dialogs", "zoom-best-fit"), tr("Zoom best fit and 1:1"))); 167 166 btnZoomBestFit.setPreferredSize(buttonDim); 168 167 169 168 btnCollapse = new JButton(new ImageAction(COMMAND_COLLAPSE, 170 ImageProvider.get("dialogs", "collapse"), tr("Move dialog to the side pane")));169 new ImageProvider("dialogs", "collapse"), tr("Move dialog to the side pane"))); 171 170 btnCollapse.setPreferredSize(new Dimension(20, 20)); 172 171 btnCollapse.setAlignmentY(Component.TOP_ALIGNMENT); … … 213 212 private final String action; 214 213 215 ImageAction(String action, Image Icon icon, String toolTipText) {214 ImageAction(String action, ImageProvider provider, String toolTipText) { 216 215 this.action = action; 217 216 putValue(SHORT_DESCRIPTION, toolTipText); 218 putValue(SMALL_ICON, icon); 217 if (provider != null) { 218 provider.getResource().attachImageIcon(this, true); 219 } 219 220 } 220 221 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ShowThumbnailAction.java
r12340 r13130 28 28 */ 29 29 public ShowThumbnailAction(GeoImageLayer layer) { 30 super(tr("Show thumbnails"), ImageProvider.get("dialogs/geoimage/togglegit")); 30 super(tr("Show thumbnails")); 31 new ImageProvider("dialogs/geoimage/togglegit").getResource().attachImageIcon(this, true); 31 32 putValue(SHORT_DESCRIPTION, tr("Show image thumbnails instead of icons.")); 32 33 this.layer = layer; -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
r12678 r13130 58 58 */ 59 59 public ChooseTrackVisibilityAction(final GpxLayer layer) { 60 super(tr("Choose visible tracks"), ImageProvider.get("dialogs/filter")); 60 super(tr("Choose visible tracks")); 61 new ImageProvider("dialogs/filter").getResource().attachImageIcon(this, true); 61 62 this.layer = layer; 62 63 putValue("help", ht("/Action/ChooseTrackVisibility")); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java
r12846 r13130 56 56 */ 57 57 protected ConvertToDataLayerAction(final T layer) { 58 super(tr("Convert to data layer"), ImageProvider.get("converttoosm")); 58 super(tr("Convert to data layer")); 59 new ImageProvider("converttoosm").getResource().attachImageIcon(this, true); 59 60 this.layer = layer; 60 61 putValue("help", ht("/Action/ConvertToDataLayer")); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java
r12630 r13130 54 54 55 55 private CustomizeDrawingAction() { 56 super(tr("Customize track drawing"), ImageProvider.get("mapmode/addsegment")); 56 super(tr("Customize track drawing")); 57 new ImageProvider("mapmode/addsegment").getResource().attachImageIcon(this, true); 57 58 putValue("help", ht("/Action/GPXLayerCustomizeLineDrawing")); 58 59 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java
r12636 r13130 43 43 */ 44 44 public DownloadWmsAlongTrackAction(final GpxData data) { 45 super(tr("Precache imagery tiles along this track"), ImageProvider.get("downloadalongtrack")); 45 super(tr("Precache imagery tiles along this track")); 46 new ImageProvider("downloadalongtrack").getResource().attachImageIcon(this, true); 46 47 this.data = data; 47 48 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
r12846 r13130 69 69 */ 70 70 public ImportAudioAction(final GpxLayer layer) { 71 super(tr("Import Audio"), ImageProvider.get("importaudio")); 71 super(tr("Import Audio")); 72 new ImageProvider("importaudio").getResource().attachImageIcon(this, true); 72 73 this.layer = layer; 73 74 putValue("help", ht("/Action/ImportAudio")); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
r12846 r13130 36 36 */ 37 37 public ImportImagesAction(final GpxLayer layer) { 38 super(tr("Import images"), ImageProvider.get("dialogs/geoimage")); 38 super(tr("Import images")); 39 new ImageProvider("dialogs/geoimage").getResource().attachImageIcon(this, true); 39 40 this.layer = layer; 40 41 putValue("help", ht("/Action/ImportImages")); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/MarkersFromNamedPointsAction.java
r12636 r13130 26 26 */ 27 27 public MarkersFromNamedPointsAction(final GpxLayer layer) { 28 super(tr("Markers From Named Points"), ImageProvider.get("addmarkers")); 28 super(tr("Markers From Named Points")); 29 new ImageProvider("addmarkers").getResource().attachImageIcon(this, true); 29 30 this.layer = layer; 30 31 putValue("help", ht("/Action/MarkersFromNamedPoints")); -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r12987 r13130 484 484 485 485 public ShowHideMarkerText(MarkerLayer layer) { 486 super(tr("Show Text/Icons"), ImageProvider.get("dialogs", "showhide")); 486 super(tr("Show Text/Icons")); 487 new ImageProvider("dialogs", "showhide").getResource().attachImageIcon(this, true); 487 488 putValue(SHORT_DESCRIPTION, tr("Toggle visible state of the marker text and icons.")); 488 489 putValue("help", ht("/Action/ShowHideTextIcons")); … … 515 516 */ 516 517 SynchronizeAudio() { 517 super(tr("Synchronize Audio"), ImageProvider.get("audio-sync")); 518 super(tr("Synchronize Audio")); 519 new ImageProvider("audio-sync").getResource().attachImageIcon(this, true); 518 520 putValue("help", ht("/Action/SynchronizeAudio")); 519 521 } … … 552 554 553 555 MoveAudio() { 554 super(tr("Make Audio Marker at Play Head"), ImageProvider.get("addmarkers")); 556 super(tr("Make Audio Marker at Play Head")); 557 new ImageProvider("addmarkers").getResource().attachImageIcon(this, true); 555 558 putValue("help", ht("/Action/MakeAudioMarkerAtPlayHead")); 556 559 } -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r12846 r13130 1054 1054 MoveUpDownAction(boolean isDown) { 1055 1055 increment = isDown ? 1 : -1; 1056 putValue(SMALL_ICON, isDown ? ImageProvider.get("dialogs", "down") : ImageProvider.get("dialogs", "up"));1056 new ImageProvider("dialogs", isDown ? "down" : "up").getResource().attachImageIcon(this, true); 1057 1057 putValue(SHORT_DESCRIPTION, isDown ? tr("Move the selected entry one row down.") : tr("Move the selected entry one row up.")); 1058 1058 updateEnabledState(); -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AbstractTableListEditor.java
r10763 r13130 69 69 putValue(NAME, tr("New")); 70 70 putValue(SHORT_DESCRIPTION, tr("add entry")); 71 putValue(SMALL_ICON, ImageProvider.get("dialogs", "add"));71 new ImageProvider("dialogs", "add").getResource().attachImageIcon(this, true); 72 72 } 73 73 … … 82 82 putValue(NAME, tr("Remove")); 83 83 putValue(SHORT_DESCRIPTION, tr("Remove the selected entry")); 84 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));84 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true); 85 85 updateEnabledState(); 86 86 } -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r13111 r13130 503 503 break; 504 504 } 505 putValue(SMALL_ICON, ImageProvider.get("dialogs", icon));505 new ImageProvider("dialogs", icon).getResource().attachImageIcon(this, true); 506 506 this.type = type; 507 507 } … … 551 551 putValue(NAME, tr("Remove")); 552 552 putValue(SHORT_DESCRIPTION, tr("Remove entry")); 553 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));553 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true); 554 554 updateEnabledState(); 555 555 } … … 581 581 putValue(NAME, tr("Activate")); 582 582 putValue(SHORT_DESCRIPTION, tr("copy selected defaults")); 583 putValue(SMALL_ICON, ImageProvider.get("preferences", "activate-down"));583 new ImageProvider("preferences", "activate-down").getResource().attachImageIcon(this, true); 584 584 } 585 585 … … 647 647 ReloadAction() { 648 648 putValue(SHORT_DESCRIPTION, tr("Update default entries")); 649 putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));649 new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this, true); 650 650 } 651 651 -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
r12926 r13130 617 617 */ 618 618 public ToolbarButtonAction() { 619 super("", ImageProvider.get("dialogs", "pin")); 619 super(""); 620 new ImageProvider("dialogs", "pin").getResource().attachImageIcon(this, true); 620 621 putValue(SHORT_DESCRIPTION, tr("Add or remove toolbar button")); 621 622 List<String> t = new LinkedList<>(ToolbarPreferences.getToolString());
Note:
See TracChangeset
for help on using the changeset viewer.