source: osm/applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java@ 33788

Last change on this file since 33788 was 33788, checked in by donvip, 7 years ago

update to JOSM 12643

File size: 752 bytes
Line 
1package nanolog;
2
3import javax.swing.JDialog;
4
5import org.openstreetmap.josm.gui.MainApplication;
6import org.openstreetmap.josm.gui.layer.GpxLayer;
7import org.openstreetmap.josm.gui.layer.Layer;
8
9/**
10 * A dialog to choose GPS trace.
11 *
12 * @author zverik
13 */
14public class GPXChooser extends JDialog {
15 public static GpxLayer chooseLayer() {
16 // temporary plug: return first found local layer
17 return topLayer();
18 }
19
20 public static GpxLayer topLayer() {
21 // return first found local layer
22 for (Layer layer : MainApplication.getLayerManager().getLayers()) {
23 if (layer instanceof GpxLayer && ((GpxLayer) layer).isLocalFile())
24 return (GpxLayer) layer;
25 }
26 return null;
27 }
28}
Note: See TracBrowser for help on using the repository browser.