- Timestamp:
- 2015-01-10T00:38:05+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r7304 r7949 32 32 33 33 import org.openstreetmap.josm.Main; 34 import org.openstreetmap.josm.actions.AbstractSelectAction; 34 35 import org.openstreetmap.josm.data.SelectionChangedListener; 35 36 import org.openstreetmap.josm.data.conflict.Conflict; … … 441 442 } 442 443 443 class SelectAction extends AbstractAction implements ListSelectionListener { 444 public SelectAction() { 445 putValue(NAME, tr("Select")); 446 putValue(SHORT_DESCRIPTION, tr("Set the selected elements on the map to the selected items in the list above.")); 447 putValue(SMALL_ICON, ImageProvider.get("dialogs", "select")); 444 class SelectAction extends AbstractSelectAction implements ListSelectionListener { 445 private SelectAction() { 448 446 putValue("help", ht("/Dialog/ConflictList#SelectAction")); 449 447 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r7909 r7949 34 34 35 35 import org.openstreetmap.josm.Main; 36 import org.openstreetmap.josm.actions.AbstractSelectAction; 36 37 import org.openstreetmap.josm.actions.AutoScaleAction; 37 38 import org.openstreetmap.josm.actions.relation.DownloadSelectedIncompleteMembersAction; … … 318 319 * of this dialog 319 320 */ 320 class SelectAction extends Abstract Action implements ListSelectionListener {321 class SelectAction extends AbstractSelectAction implements ListSelectionListener { 321 322 /** 322 323 * Constructs a new {@code SelectAction}. 323 324 */ 324 325 public SelectAction() { 325 putValue(NAME, tr("Select"));326 putValue(SHORT_DESCRIPTION, tr("Set the selected elements on the map to the selected items in the list above."));327 putValue(SMALL_ICON, ImageProvider.get("dialogs","select"));328 326 updateEnabledState(); 329 327 } … … 336 334 if (editLayer == null) return; 337 335 editLayer.data.setSelected(sel); 336 model.selectionModel.setSelectionInterval(0, sel.size()-1); 338 337 } 339 338 … … 722 721 723 722 @Override 724 public void primitivesAdded(PrimitivesAddedEvent event) {/* ignored - handled by SelectionChangeListener */} 725 @Override 726 public void primitivesRemoved(PrimitivesRemovedEvent event) {/* ignored - handled by SelectionChangeListener*/} 723 public void primitivesAdded(PrimitivesAddedEvent event) { 724 /* ignored - handled by SelectionChangeListener */ 725 } 726 727 @Override 728 public void primitivesRemoved(PrimitivesRemovedEvent event) { 729 /* ignored - handled by SelectionChangeListener*/ 730 } 727 731 } 728 732 … … 736 740 737 741 public SearchMenuItem(SearchSetting s) { 738 super(Utils.shortenString(s.toString(), org.openstreetmap.josm.actions.search.SearchAction.MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY)); 742 super(Utils.shortenString(s.toString(), 743 org.openstreetmap.josm.actions.search.SearchAction.MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY)); 739 744 this.s = s; 740 745 addActionListener(this); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r7576 r7949 28 28 29 29 import org.openstreetmap.josm.Main; 30 import org.openstreetmap.josm.actions.AbstractSelectAction; 30 31 import org.openstreetmap.josm.actions.AutoScaleAction; 31 32 import org.openstreetmap.josm.actions.relation.EditRelationAction; … … 102 103 List<SideButton> buttons = new LinkedList<>(); 103 104 104 selectButton = new SideButton(new AbstractAction() { 105 { 106 putValue(NAME, tr("Select")); 107 putValue(SHORT_DESCRIPTION, tr("Set the selected elements on the map to the selected items in the list above.")); 108 putValue(SMALL_ICON, ImageProvider.get("dialogs","select")); 109 } 105 selectButton = new SideButton(new AbstractSelectAction() { 110 106 @Override 111 107 public void actionPerformed(ActionEvent e) {
Note:
See TracChangeset
for help on using the changeset viewer.