Changeset 13130 in josm for trunk/src/org/openstreetmap/josm/gui/conflict
- Timestamp:
- 2017-11-19T20:12:24+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/conflict/pair
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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 {
Note:
See TracChangeset
for help on using the changeset viewer.