source:
osm/applications/editors/josm/plugins/scripting/scripts/HelloWorld.groovy@
25374
Last change on this file since 25374 was 25083, checked in by , 14 years ago | |
---|---|
File size: 344 bytes |
Line | |
---|---|
1 | /* |
2 | * HelloWorld.groovy - displays the number of actually open layers |
3 | */ |
4 | import javax.swing.JOptionPane; |
5 | import org.openstreetmap.josm.Main; |
6 | |
7 | def numlayers = Main.main?.map?.mapView?.numLayers |
8 | if (numlayers == null) numlayers = 0 |
9 | |
10 | JOptionPane.showMessageDialog(Main.parent, "[Groovy] Hello World!\nYou have ${numlayers} layer(s).") |
Note:
See TracBrowser
for help on using the repository browser.