Line | |
---|
1 | package cadastre_fr;
|
---|
2 |
|
---|
3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
4 |
|
---|
5 | import java.awt.event.ActionEvent;
|
---|
6 |
|
---|
7 | import org.openstreetmap.josm.actions.JosmAction;
|
---|
8 |
|
---|
9 | @SuppressWarnings("serial")
|
---|
10 | public class MenuActionCancelGrab extends JosmAction {
|
---|
11 |
|
---|
12 | public static String name = "Cancel current grab";
|
---|
13 |
|
---|
14 | private WMSLayer wmsLayer;
|
---|
15 |
|
---|
16 | public MenuActionCancelGrab(WMSLayer wmsLayer) {
|
---|
17 | super(tr(name), null, tr("Cancel current grab (only vector images)"), null, false);
|
---|
18 | this.wmsLayer = wmsLayer;
|
---|
19 | }
|
---|
20 |
|
---|
21 |
|
---|
22 | @Override
|
---|
23 | public void actionPerformed(ActionEvent arg0) {
|
---|
24 | if (wmsLayer.grabThread.getImagesToGrabSize() > 0) {
|
---|
25 | wmsLayer.grabThread.cancel();
|
---|
26 | }
|
---|
27 | }
|
---|
28 |
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.