source: josm/trunk/src/org/openstreetmap/josm/actions/relation/SelectInRelationListAction.java@ 13632

Last change on this file since 13632 was 13130, checked in by Don-vip, 6 years ago

fix #15572 - use ImageProvider attach API for all JOSM actions to ensure proper icon size everywhere

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions.relation;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.ActionEvent;
7
8import org.openstreetmap.josm.gui.MainApplication;
9import org.openstreetmap.josm.gui.MapFrame;
10import org.openstreetmap.josm.tools.ImageProvider;
11
12/**
13 * The action for activating a relation in relation list dialog
14 * @since 5793
15 */
16public class SelectInRelationListAction extends AbstractRelationAction {
17
18 /**
19 * Constructs a new <code>SelectInRelationListAction</code>.
20 */
21 public SelectInRelationListAction() {
22 putValue(NAME, tr("Select in relation list"));
23 putValue(SHORT_DESCRIPTION, tr("Select relation in relation list."));
24 new ImageProvider("dialogs", "selectionlist").getResource().attachImageIcon(this, true);
25 }
26
27 @Override
28 public void actionPerformed(ActionEvent e) {
29 MapFrame map = MainApplication.getMap();
30 if (!isEnabled() || relations.isEmpty() || map == null || map.relationListDialog == null) return;
31 map.relationListDialog.unfurlDialog();
32 map.relationListDialog.selectRelations(relations);
33 }
34}
Note: See TracBrowser for help on using the repository browser.