- Timestamp:
- 2015-05-04T20:19:32+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r8320 r8323 687 687 * Replies the length of the longest segement of the way, in metres, as computed by {@link LatLon#greatCircleDistance}. 688 688 * @return The length of the segment, in metres 689 * @since 4138689 * @since 8320 690 690 */ 691 691 public double getLongestSegmentLength() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r8308 r8323 80 80 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 81 81 import org.openstreetmap.josm.tools.GBC; 82 import org.openstreetmap.josm.tools.ImageOverlay; 82 83 import org.openstreetmap.josm.tools.ImageProvider; 84 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 83 85 import org.openstreetmap.josm.tools.InputMapUtils; 84 86 import org.openstreetmap.josm.tools.Shortcut; … … 673 675 674 676 JMenu setMenu = new JMenu(tr("Style settings")); 675 setMenu.setIcon(ImageProvider.overlay(ImageProvider.get("preference"), 676 ImageProvider.get("dialogs/mappaint", "pencil"), 677 ImageProvider.OverlayPosition.SOUTHEAST)); 677 setMenu.setIcon(new ImageProvider("preference").setMaxSize(ImageSizes.POPUPMENU).addOverlay( 678 new ImageOverlay(new ImageProvider("dialogs/mappaint", "pencil"), 0.5, 0.5, 1.0, 1.0)).get()); 678 679 setMenu.setToolTipText(tr("Customize the style")); 679 680 add(setMenu); -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r8308 r8323 50 50 import org.openstreetmap.josm.io.OsmApi; 51 51 import org.openstreetmap.josm.tools.GBC; 52 import org.openstreetmap.josm.tools.ImageOverlay; 52 53 import org.openstreetmap.josm.tools.ImageProvider; 54 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 53 55 import org.openstreetmap.josm.tools.InputMapUtils; 54 56 import org.openstreetmap.josm.tools.Utils; … … 426 428 dlg.setContent("<html>" + message + "</html>"); 427 429 dlg.setButtonIcons(new Icon[] { 428 ImageProvider.get("ok"), 429 ImageProvider.get("cancel"), 430 ImageProvider.overlay( 431 ImageProvider.get("upload"), 432 new ImageIcon(ImageProvider.get("warning-small").getImage().getScaledInstance(10 , 10, Image.SCALE_SMOOTH)), 433 ImageProvider.OverlayPosition.SOUTHEAST)}); 430 new ImageProvider("ok").setMaxSize(ImageSizes.LARGEICON).get(), 431 new ImageProvider("cancel").setMaxSize(ImageSizes.LARGEICON).get(), 432 new ImageProvider("upload").setMaxSize(ImageSizes.LARGEICON).addOverlay( 433 new ImageOverlay(new ImageProvider("warning-small"), 0.5,0.5,1.0,1.0)).get()}); 434 434 dlg.setToolTipTexts(new String[] { 435 435 tr("Return to the previous dialog to enter a more descriptive comment"), -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r8158 r8323 90 90 import org.openstreetmap.josm.tools.FilteredCollection; 91 91 import org.openstreetmap.josm.tools.GBC; 92 import org.openstreetmap.josm.tools.ImageOverlay; 92 93 import org.openstreetmap.josm.tools.ImageProvider; 94 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 93 95 import org.openstreetmap.josm.tools.date.DateUtils; 94 96 … … 286 288 } 287 289 288 protected Icon getBaseIcon() { 289 return ImageProvider.get("layer", "osmdata_small"); 290 } 291 292 /** 293 * TODO: @return Return a dynamic drawn icon of the map data. The icon is 294 * updated by a background thread to not disturb the running programm. 295 */ 296 @Override public Icon getIcon() { 297 Icon baseIcon = getBaseIcon(); 290 /** 291 * Return the image provider to get the base icon 292 * @return image provider class which can be modified 293 * @since 8323 294 */ 295 protected ImageProvider getBaseIconProvider() { 296 return new ImageProvider("layer", "osmdata_small"); 297 } 298 299 @Override 300 public Icon getIcon() { 301 ImageProvider base = getBaseIconProvider().setMaxSize(ImageSizes.LAYER); 298 302 if (isUploadDiscouraged()) { 299 return ImageProvider.overlay(baseIcon, 300 new ImageIcon(ImageProvider.get("warning-small").getImage().getScaledInstance(8, 8, Image.SCALE_SMOOTH)), 301 ImageProvider.OverlayPosition.SOUTHEAST); 302 } else { 303 return baseIcon; 304 } 303 base.addOverlay(new ImageOverlay(new ImageProvider("warning-small"), 0.5, 0.5, 1.0, 1.0)); 304 } 305 return base.get(); 305 306 } 306 307 -
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r8282 r8323 47 47 import org.openstreetmap.josm.tools.CheckParameterUtil; 48 48 import org.openstreetmap.josm.tools.GBC; 49 import org.openstreetmap.josm.tools.ImageOverlay; 49 50 import org.openstreetmap.josm.tools.ImageProvider; 51 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 50 52 import org.openstreetmap.josm.tools.LanguageInfo; 51 53 … … 156 158 dlg.setContent(content); 157 159 dlg.setButtonIcons(new Icon[] { 158 ImageProvider.get("cancel"), 159 ImageProvider.overlay( 160 ImageProvider.get("upload"), 161 new ImageIcon(ImageProvider.get("warning-small").getImage().getScaledInstance(10 , 10, Image.SCALE_SMOOTH)), 162 ImageProvider.OverlayPosition.SOUTHEAST)}); 160 new ImageProvider("cancel").setMaxSize(ImageSizes.LARGEICON).get(), 161 new ImageProvider("upload").setMaxSize(ImageSizes.LARGEICON).addOverlay( 162 new ImageOverlay(new ImageProvider("warning-small"), 0.5,0.5,1.0,1.0)).get()}); 163 163 dlg.setToolTipTexts(new String[] { 164 164 tr("Cancel"), -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r8304 r8323 130 130 /** map icon maximum size */ 131 131 MAPMAX, 132 /** cursor icon size */ 133 CURSOR, 134 /** cursor overlay icon size */ 135 CURSOROVERLAY, 132 136 /** menu icon size */ 133 CURSOR,134 /** Cursor overlay icon size */135 CURSOROVERLAY,136 /** Cursor icon size */137 137 MENU, 138 /** menu icon size in popup menus 139 * @since 8323 140 */ 141 POPUPMENU, 142 /** Layer list icon size 143 * @since 8323 144 */ 145 LAYER 138 146 } 139 147 … … 332 340 case MAPMAX: sizeval = Main.pref.getInteger("iconsize.mapmax", 48); break; 333 341 case MAP: sizeval = Main.pref.getInteger("iconsize.mapmax", 16); break; 342 case POPUPMENU: /* POPUPMENU is LARGELICON - only provided in case of future changes */ 334 343 case LARGEICON: sizeval = Main.pref.getInteger("iconsize.largeicon", 24); break; 335 344 case MENU: /* MENU is SMALLICON - only provided in case of future changes */ … … 337 346 case CURSOROVERLAY: /* same as cursor - only provided in case of future changes */ 338 347 case CURSOR: sizeval = Main.pref.getInteger("iconsize.cursor", 32); break; 348 case LAYER: sizeval = Main.pref.getInteger("iconsize.layer", 16); break; 339 349 default: sizeval = Main.pref.getInteger("iconsize.default", 24); break; 340 350 }
Note:
See TracChangeset
for help on using the changeset viewer.