Changeset 18480 in josm for trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
- Timestamp:
- 2022-06-08T23:16:08+02:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r18187 r18480 1637 1637 } 1638 1638 if (Logging.isDebugEnabled()) { 1639 myDrawString(g, tr("Current zoom: {0}", currentZoomLevel), 50, 140); 1640 myDrawString(g, tr("Display zoom: {0}", displayZoomLevel), 50, 155); 1641 myDrawString(g, tr("Pixel scale: {0}", getScaleFactor(currentZoomLevel)), 50, 170); 1642 myDrawString(g, tr("Best zoom: {0}", getBestZoom()), 50, 185); 1643 myDrawString(g, tr("Estimated cache size: {0}", estimateTileCacheSize()), 50, 200); 1639 int xOffset = 50; 1640 myDrawString(g, tr("Current zoom: {0}", currentZoomLevel), xOffset, 165); 1641 myDrawString(g, tr("Display zoom: {0}", displayZoomLevel), xOffset, 180); 1642 myDrawString(g, tr("Pixel scale: {0}", getScaleFactor(currentZoomLevel)), xOffset, 195); 1643 myDrawString(g, tr("Best zoom: {0}", getBestZoom()), xOffset, 210); 1644 myDrawString(g, tr("Estimated cache size: {0}", estimateTileCacheSize()), xOffset, 225); 1644 1645 if (tileLoader instanceof TMSCachedTileLoader) { 1645 int offset = 200; 1646 int yOffset = 255; 1647 myDrawString(g, tr("=== Cache stats ==="), xOffset, yOffset); 1648 yOffset += 5; 1646 1649 for (String part: ((TMSCachedTileLoader) tileLoader).getStats().split("\n", -1)) { 1647 offset += 15; 1648 myDrawString(g, tr("Cache stats: {0}", part), 50, offset); 1650 String regex = "^-{3,}(.+)"; 1651 if (part.matches(regex)) { 1652 part = part.replaceAll(regex, "--- $1"); 1653 yOffset += 5; 1654 } 1655 yOffset += 15; 1656 myDrawString(g, tr(part), xOffset, yOffset); 1649 1657 } 1650 1658 }
Note:
See TracChangeset
for help on using the changeset viewer.