Changeset 1477 in osm for utils/josm/plugins
- Timestamp:
- 2006-10-15T11:56:38+02:00 (18 years ago)
- Location:
- utils/josm/plugins/landsat/src/landsat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/josm/plugins/landsat/src/landsat/DownloadLandsatTask.java
r1436 r1477 51 51 } 52 52 53 public void setEnabled(boolean b) { 54 checkBox.setEnabled(b); 55 } 56 53 57 public String getPreferencesSuffix() { 54 58 return "landsat"; 55 59 } 60 56 61 } -
utils/josm/plugins/landsat/src/landsat/LandsatPlugin.java
r1471 r1477 3 3 import org.openstreetmap.josm.Main; 4 4 import org.openstreetmap.josm.plugins.Plugin; 5 import org.openstreetmap.josm.gui.MapFrame; 6 7 // NW 151006 only add the landsat task when the map frame is initialised with 8 // data. 5 9 6 10 public class LandsatPlugin extends Plugin { 7 11 12 DownloadLandsatTask task; 13 8 14 public LandsatPlugin() { 9 Main.main.menu.download.downloadTasks.add(new DownloadLandsatTask()); 15 task = new DownloadLandsatTask(); 16 task.setEnabled(false); 17 Main.main.menu.download.downloadTasks.add(task); 18 } 19 20 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 21 if(oldFrame==null && newFrame!=null) { 22 task.setEnabled(true); 23 } else if (oldFrame!=null && newFrame==null ) { 24 task.setEnabled(false); 25 } 10 26 } 11 27 }
Note:
See TracChangeset
for help on using the changeset viewer.