Changeset 7119 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2014-05-14T00:51:20+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r7112 r7119 36 36 import org.openstreetmap.josm.data.osm.history.HistoryWay; 37 37 import org.openstreetmap.josm.gui.tagging.TaggingPreset; 38 import org.openstreetmap.josm.gui.tagging.TaggingPresetNameTemplateList; 38 39 import org.openstreetmap.josm.tools.AlphanumComparator; 39 40 import org.openstreetmap.josm.tools.I18n; 40 import org.openstreetmap.josm.tools.TaggingPresetNameTemplateList;41 41 import org.openstreetmap.josm.tools.Utils; 42 42 import org.openstreetmap.josm.tools.Utils.Function; -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r7005 r7119 67 67 import org.openstreetmap.josm.io.imagery.WMSRequest; 68 68 69 70 69 /** 71 70 * This is a layer that grabs the current screen from an WMS server. The data … … 156 155 private boolean isInvalidUrlConfirmed = false; 157 156 157 /** 158 * Constructs a new {@code WMSLayer}. 159 */ 158 160 public WMSLayer() { 159 161 this(new ImageryInfo(tr("Blank Layer"))); … … 338 340 339 341 attribution.paintAttribution(g, mv.getWidth(), mv.getHeight(), null, null, 0, this); 340 341 342 } 342 343 … … 453 454 GeorefImage img = images[modulo(x,dax)][modulo(y,day)]; 454 455 if (!img.paint(g, mv, x, y, leftEdge, bottomEdge)) { 455 WMSRequest request = new WMSRequest(x, y, info.getPixelPerDegree(), real, true); 456 addRequest(request); 456 addRequest(new WMSRequest(x, y, info.getPixelPerDegree(), real, true)); 457 457 areaToCache.add(new ProjectionBounds(getEastNorth(x, y), getEastNorth(x + 1, y + 1))); 458 458 } else if (img.getState() == State.PARTLY_IN_CACHE && autoDownloadEnabled) { 459 WMSRequest request = new WMSRequest(x, y, info.getPixelPerDegree(), real, false); 460 addRequest(request); 459 addRequest(new WMSRequest(x, y, info.getPixelPerDegree(), real, false)); 461 460 areaToCache.add(new ProjectionBounds(getEastNorth(x, y), getEastNorth(x + 1, y + 1))); 462 461 } … … 658 657 659 658 public class DownloadAction extends AbstractAction { 659 /** 660 * Constructs a new {@code DownloadAction}. 661 */ 660 662 public DownloadAction() { 661 663 super(tr("Download visible tiles")); … … 776 778 777 779 public class ReloadErrorTilesAction extends AbstractAction { 780 /** 781 * Constructs a new {@code ReloadErrorTilesAction}. 782 */ 778 783 public ReloadErrorTilesAction() { 779 784 super(tr("Reload erroneous tiles")); … … 797 802 798 803 public class ToggleAlphaAction extends AbstractAction implements LayerAction { 804 /** 805 * Constructs a new {@code ToggleAlphaAction}. 806 */ 799 807 public ToggleAlphaAction() { 800 808 super(tr("Alpha channel")); … … 815 823 Main.map.mapView.repaint(); 816 824 } 825 817 826 @Override 818 827 public Component createMenuComponent() { … … 821 830 return item; 822 831 } 832 823 833 @Override 824 834 public boolean supportLayers(List<Layer> layers) { … … 827 837 } 828 838 829 830 839 public class ToggleAutoResolutionAction extends AbstractAction implements LayerAction { 840 841 /** 842 * Constructs a new {@code ToggleAutoResolutionAction}. 843 */ 831 844 public ToggleAutoResolutionAction() { 832 845 super(tr("Automatically change resolution")); … … 858 871 */ 859 872 public class BookmarkWmsAction extends AbstractAction { 873 /** 874 * Constructs a new {@code BookmarkWmsAction}. 875 */ 860 876 public BookmarkWmsAction() { 861 877 super(tr("Set WMS Bookmark")); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java
r7005 r7119 8 8 import java.awt.Point; 9 9 import java.awt.event.ActionEvent; 10 import java.io.Serializable; 10 11 import java.util.ArrayList; 11 12 import java.util.Collections; 13 import java.util.Comparator; 12 14 import java.util.List; 13 15 … … 19 21 20 22 import org.openstreetmap.josm.Main; 21 import org.openstreetmap.josm.tools. PresetTextComparator;23 import org.openstreetmap.josm.tools.AlphanumComparator; 22 24 23 25 public class TaggingPresetMenu extends TaggingPreset { 24 public JMenu menu = null; // set by TaggingPresetPreferences 25 26 public JMenu menu = null; // set by TaggingPresets 27 28 private static class PresetTextComparator implements Comparator<JMenuItem>, Serializable { 29 @Override 30 public int compare(JMenuItem o1, JMenuItem o2) { 31 if (Main.main.menu.presetSearchAction.equals(o1.getAction())) 32 return -1; 33 else if (Main.main.menu.presetSearchAction.equals(o2.getAction())) 34 return 1; 35 else 36 return AlphanumComparator.getInstance().compare(o1.getText(), o2.getText()); 37 } 38 } 39 26 40 @Override 27 41 public void setDisplayName() { … … 67 81 } 68 82 } 69 83 70 84 /** 71 85 * Sorts the menu items using the translated item text -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java
r7116 r7119 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. tools;2 package org.openstreetmap.josm.gui.tagging; 3 3 4 4 import java.util.Collection; … … 9 9 import org.openstreetmap.josm.Main; 10 10 import org.openstreetmap.josm.data.osm.OsmPrimitive; 11 import org.openstreetmap.josm.gui.tagging.TaggingPreset;12 import org.openstreetmap.josm.gui.tagging.TaggingPresetListener;13 import org.openstreetmap.josm.gui.tagging.TaggingPresetType;14 import org.openstreetmap.josm.gui.tagging.TaggingPresets;15 11 16 12 /**
Note:
See TracChangeset
for help on using the changeset viewer.