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