Changeset 8864 in josm
- Timestamp:
- 2015-10-12T23:27:10+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java
r8863 r8864 2 2 package org.openstreetmap.josm.gui.dialogs.properties; 3 3 4 import org.openstreetmap.josm.data.osm.OsmPrimitive;5 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetHandler;6 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetLabel;7 import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset;8 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetType;9 import org.openstreetmap.josm.tools.GBC;10 11 import javax.swing.JLabel;12 import javax.swing.JPanel;13 4 import java.awt.Dimension; 14 5 import java.awt.GridBagLayout; … … 17 8 import java.util.Collection; 18 9 import java.util.Map; 10 11 import javax.swing.JLabel; 12 import javax.swing.JPanel; 13 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset; 16 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetHandler; 17 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetLabel; 18 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetType; 19 import org.openstreetmap.josm.tools.GBC; 19 20 20 21 /** … … 34 35 * and associates an interaction with (matching) presets via {@code presetHandler}. 35 36 */ 36 public void updatePresets(final Collection<TaggingPresetType> types, final Map<String, String> tags, final TaggingPresetHandler presetHandler) { 37 public void updatePresets(final Collection<TaggingPresetType> types, final Map<String, String> tags, 38 final TaggingPresetHandler presetHandler) { 37 39 38 40 removeAll(); -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r8862 r8864 672 672 } 673 673 // as we can see part of the tile at the top and at the bottom, use Math.ceil(...) + 1 to accommodate for that 674 int visibileTiles = (int) (Math.ceil( (double)height / tileSize + 1) * Math.ceil((double)width / tileSize + 1));674 int visibileTiles = (int) (Math.ceil((double) height / tileSize + 1) * Math.ceil((double) width / tileSize + 1)); 675 675 // add 10% for tiles from different zoom levels 676 return (int) Math.ceil(676 return (int) Math.ceil( 677 677 Math.pow(2d, ZOOM_OFFSET.get()) * visibileTiles // use offset to decide, how many tiles are visible 678 678 * 2); -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r8860 r8864 155 155 } 156 156 if (memoryBytesRequired > Runtime.getRuntime().maxMemory()) { 157 throw new IllegalArgumentException(tr("To add another layer you need to allocate at least {0,number,#}MB memory to JOSM using -Xmx{0,number,#}M " 157 throw new IllegalArgumentException( 158 tr("To add another layer you need to allocate at least {0,number,#}MB memory to JOSM using -Xmx{0,number,#}M " 158 159 + "option (see http://forum.openstreetmap.org/viewtopic.php?id=25677).\n" 159 + "Currently you have {1,number,#}MB memory allocated for JOSM", memoryBytesRequired / 1024 / 1024, Runtime.getRuntime().maxMemory() / 1024 / 1024)); 160 + "Currently you have {1,number,#}MB memory allocated for JOSM", 161 memoryBytesRequired / 1024 / 1024, Runtime.getRuntime().maxMemory() / 1024 / 1024)); 160 162 } 161 163 }
Note:
See TracChangeset
for help on using the changeset viewer.