Changeset 5357 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2012-07-23T19:28:33+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r5279 r5357 96 96 * it only shows the MOTD panel. 97 97 * 98 * @return trueif JOSM currently displays a map view98 * @return <code>true</code> if JOSM currently displays a map view 99 99 */ 100 100 static public boolean isDisplayingMapView() { … … 133 133 public static MapFrame map; 134 134 /** 135 * True, when in applet mode135 * Set to <code>true</code>, when in applet mode 136 136 */ 137 137 public static boolean applet = false; … … 376 376 377 377 /** 378 * Replies trueif there is an edit layer378 * Replies <code>true</code> if there is an edit layer 379 379 * 380 * @return trueif there is an edit layer380 * @return <code>true</code> if there is an edit layer 381 381 */ 382 382 public boolean hasEditLayer() { … … 388 388 * Replies the current edit layer 389 389 * 390 * @return the current edit layer. null, if no current edit layer exists390 * @return the current edit layer. <code>null</code>, if no current edit layer exists 391 391 */ 392 392 public OsmDataLayer getEditLayer() { … … 399 399 * Replies the current data set. 400 400 * 401 * @return the current data set. null, if no current data set exists401 * @return the current data set. <code>null</code>, if no current data set exists 402 402 */ 403 403 public DataSet getCurrentDataSet() { … … 409 409 * Returns the currently active layer 410 410 * 411 * @return the currently active layer. null, if currently no active layer exists411 * @return the currently active layer. <code>null</code>, if currently no active layer exists 412 412 */ 413 413 public Layer getActiveLayer() { … … 807 807 * Replies the current projection. 808 808 * 809 * @return 809 * @return the currently active projection 810 810 */ 811 811 public static Projection getProjection() { … … 859 859 * Register a projection change listener 860 860 * 861 * @param listener the listener. Ignored if null.861 * @param listener the listener. Ignored if <code>null</code>. 862 862 */ 863 863 public static void addProjectionChangeListener(ProjectionChangeListener listener) { … … 875 875 * Removes a projection change listener 876 876 * 877 * @param listener the listener. Ignored if null.877 * @param listener the listener. Ignored if <code>null</code>. 878 878 */ 879 879 public static void removeProjectionChangeListener(ProjectionChangeListener listener) { -
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r5046 r5357 184 184 public SlippyMapBBoxChooser() { 185 185 super(); 186 TMSLayer.setMaxWorkers(); 186 187 cachedLoader = null; 187 188 String cachePath = TMSLayer.PROP_TILECACHE_DIR.get(); -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r5311 r5357 105 105 //public static final BooleanProperty PROP_DRAW_DEBUG = new BooleanProperty(PREFERENCE_PREFIX + ".draw_debug", false); 106 106 public static final BooleanProperty PROP_ADD_TO_SLIPPYMAP_CHOOSER = new BooleanProperty(PREFERENCE_PREFIX + ".add_to_slippymap_chooser", true); 107 public static final IntegerProperty PROP_TMS_JOBS = new IntegerProperty("tmsloader.maxjobs", 25); 107 108 public static final StringProperty PROP_TILECACHE_DIR; 108 109 … … 121 122 protected TileSource tileSource; 122 123 protected OsmTileLoader tileLoader; 123 JobDispatcher jobDispatcher = JobDispatcher.getInstance();124 124 125 125 HashSet<Tile> tileRequestsOutstanding = new HashSet<Tile>(); … … 441 441 } 442 442 443 /** 444 * Function to set the maximum number of workers for tile loading to the value defined 445 * in preferences. 446 */ 447 static public void setMaxWorkers() { 448 JobDispatcher.getInstance().setMaxWorkers(PROP_TMS_JOBS.get()); 449 JobDispatcher.getInstance().setLIFO(true); 450 } 451 443 452 @SuppressWarnings("serial") 444 453 public TMSLayer(ImageryInfo info) { 445 454 super(info); 446 455 456 setMaxWorkers(); 447 457 if(!isProjectionSupported(Main.getProjection())) { 448 458 JOptionPane.showMessageDialog(Main.parent, … … 650 660 }*/ 651 661 needRedraw = true; 652 jobDispatcher.cancelOutstandingJobs();662 JobDispatcher.getInstance().cancelOutstandingJobs(); 653 663 tileRequestsOutstanding.clear(); 654 664 } … … 778 788 return false; 779 789 tileRequestsOutstanding.add(tile); 780 jobDispatcher.addJob(tileLoader.createTileLoaderJob(tileSource, 781 tile.getXtile(), tile.getYtile(), tile.getZoom())); 790 JobDispatcher.getInstance().addJob(tileLoader.createTileLoaderJob(tile)); 782 791 return true; 783 792 }
Note:
See TracChangeset
for help on using the changeset viewer.