Last change
on this file since 11124 was 8510, checked in by Don-vip, 9 years ago |
checkstyle: enable relevant whitespace checks and fix them
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions.relation;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.awt.event.ActionEvent;
|
---|
7 |
|
---|
8 | import org.openstreetmap.josm.Main;
|
---|
9 | import org.openstreetmap.josm.tools.ImageProvider;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * The action for activating a relation in relation list dialog
|
---|
13 | * @since 5793
|
---|
14 | */
|
---|
15 | public class SelectInRelationListAction extends AbstractRelationAction {
|
---|
16 |
|
---|
17 | /**
|
---|
18 | * Constructs a new <code>SelectInRelationListAction</code>.
|
---|
19 | */
|
---|
20 | public SelectInRelationListAction() {
|
---|
21 | putValue(NAME, tr("Select in relation list"));
|
---|
22 | putValue(SHORT_DESCRIPTION, tr("Select relation in relation list."));
|
---|
23 | putValue(SMALL_ICON, ImageProvider.get("dialogs", "selectionlist"));
|
---|
24 | }
|
---|
25 |
|
---|
26 | @Override
|
---|
27 | public void actionPerformed(ActionEvent e) {
|
---|
28 | if (!isEnabled() || relations.isEmpty() || Main.map == null || Main.map.relationListDialog == null) return;
|
---|
29 | Main.map.relationListDialog.unfurlDialog();
|
---|
30 | Main.map.relationListDialog.selectRelations(relations);
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.