Changeset 16495 in josm for trunk/src/org
- Timestamp:
- 2020-05-24T21:27:18+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r16438 r16495 38 38 import javax.swing.event.PopupMenuEvent; 39 39 40 import org.openstreetmap.josm.actions.AbstractShowHistoryAction; 40 41 import org.openstreetmap.josm.actions.AbstractSelectAction; 41 42 import org.openstreetmap.josm.actions.AutoScaleAction; … … 348 349 * The action for showing history information of the current history item. 349 350 */ 350 class ShowHistoryAction extends AbstractAction implements ListSelectionListener, DataSelectionListener { 351 class ShowHistoryAction extends AbstractShowHistoryAction implements ListSelectionListener, DataSelectionListener { 351 352 /** 352 353 * Constructs a new {@code ShowHistoryAction}. 353 354 */ 354 355 ShowHistoryAction() { 355 putValue(NAME, tr("History")); 356 putValue(SHORT_DESCRIPTION, tr("Display the history of the selected objects.")); 357 new ImageProvider("dialogs", "history").getResource().attachImageIcon(this, true); 356 super(); 358 357 updateEnabledState(model.getSize()); 359 358 } … … 371 370 372 371 protected void updateEnabledState(int osmSelectionSize) { 373 // See #10830 - allow to click on history button i sa single object is selected, even if not selected again in the list372 // See #10830 - allow to click on history button if a single object is selected, even if not selected again in the list 374 373 setEnabled(!model.isSelectionEmpty() || osmSelectionSize == 1); 375 374 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
r16469 r16495 35 35 import javax.swing.event.ListSelectionListener; 36 36 37 import org.openstreetmap.josm.actions.AbstractShowHistoryAction; 37 38 import org.openstreetmap.josm.actions.AutoScaleAction; 38 39 import org.openstreetmap.josm.actions.HistoryInfoAction; … … 223 224 } 224 225 225 class ShowHistoryAction extends AbstractAction implements ListSelectionListener { 226 class ShowHistoryAction extends AbstractShowHistoryAction implements ListSelectionListener { 226 227 227 228 ShowHistoryAction() { 228 putValue(NAME, tr("Show history")); 229 new ImageProvider("dialogs", "history").getResource().attachImageIcon(this); 230 putValue(SHORT_DESCRIPTION, tr("Download and show the history of the selected objects")); 229 super(); 231 230 updateEnabledState(); 232 231 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
r16489 r16495 22 22 import javax.swing.event.ListSelectionListener; 23 23 24 import org.openstreetmap.josm.actions.AbstractShowHistoryAction; 24 25 import org.openstreetmap.josm.actions.AutoScaleAction; 25 26 import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode; … … 106 107 menu.add(new SelectPreviousGapAction()); 107 108 menu.add(new SelectNextGapAction()); 108 menu.add(new History InfoAction() {109 menu.add(new AbstractShowHistoryAction() { 109 110 @Override 110 111 public void actionPerformed(ActionEvent ae) { -
trunk/src/org/openstreetmap/josm/gui/history/ShowHistoryAction.java
r16461 r16495 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.history; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.awt.event.ActionEvent; … … 10 8 import java.util.function.Function; 11 9 12 import javax.swing.AbstractAction; 13 10 import org.openstreetmap.josm.actions.AbstractShowHistoryAction; 14 11 import org.openstreetmap.josm.data.osm.PrimitiveId; 15 import org.openstreetmap.josm.tools.ImageProvider;16 12 17 13 /** 18 14 * Open a history browser with the history of an object. 19 15 */ 20 class ShowHistoryAction extends AbstractAction { 16 class ShowHistoryAction extends AbstractShowHistoryAction { 21 17 private transient PrimitiveId primitiveId; 22 23 /**24 * Constructs a new {@code ShowHistoryAction}.25 */26 ShowHistoryAction() {27 putValue(NAME, tr("Show history"));28 putValue(SHORT_DESCRIPTION, tr("Display the history of the selected object."));29 new ImageProvider("dialogs", "history").getResource().attachImageIcon(this, true);30 }31 18 32 19 @Override
Note:
See TracChangeset
for help on using the changeset viewer.