Changeset 7731 in josm for trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
- Timestamp:
- 2014-11-18T23:34:19+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r7706 r7731 95 95 */ 96 96 public static enum OverlayPosition { 97 NORTHWEST, NORTHEAST, SOUTHWEST, SOUTHEAST 97 /** North west */ 98 NORTHWEST, 99 /** North east */ 100 NORTHEAST, 101 /** South west */ 102 SOUTHWEST, 103 /** South east */ 104 SOUTHEAST 98 105 } 99 106 … … 113 120 */ 114 121 public static enum ImageSizes { 115 /* SMALL_ICON value of on Action */122 /** SMALL_ICON value of on Action */ 116 123 SMALLICON, 117 /* LARGE_ICON_KEY value of on Action */124 /** LARGE_ICON_KEY value of on Action */ 118 125 LARGEICON, 119 /* MAP icon */126 /** MAP icon */ 120 127 MAP, 121 /* MAP icon maximum size */128 /** MAP icon maximum size */ 122 129 MAPMAX, 123 /* MENU icon size */130 /** MENU icon size */ 124 131 MENU, 125 132 } … … 169 176 */ 170 177 public interface ImageCallback { 178 /** 179 * Called when image loading has finished. 180 * @param result the loaded image icon 181 */ 171 182 void finished(ImageIcon result); 172 183 } … … 177 188 */ 178 189 public interface ImageResourceCallback { 190 /** 191 * Called when image loading has finished. 192 * @param result the loaded image resource 193 */ 179 194 void finished(ImageResource result); 180 195 } … … 247 262 /** 248 263 * Convert enumerated size values to real numbers 249 * @return dimension of image 264 * @param size the size enumeration 265 * @return dimension of image in pixels 250 266 * @since 7687 251 267 */ … … 496 512 497 513 /** 514 * Load an image with a given file name. 515 * 498 516 * @param name The icon name (base name with or without '.png' or '.svg' extension) 499 517 * @return the requested image or null if the request failed … … 933 951 } 934 952 953 /** 954 * Load a cursor with a given file name, optionally decorated with an overlay image. 955 * 956 * @param name the cursor image filename in "cursor" directory 957 * @param overlay optional overlay image 958 * @return cursor with a given file name, optionally decorated with an overlay image 959 */ 935 960 public static Cursor getCursor(String name, String overlay) { 936 961 ImageIcon img = get("cursor", name); … … 1111 1136 } 1112 1137 1138 /** 1139 * Constructs an image from the given SVG data. 1140 * @param svg the SVG data 1141 * @param dim the desired image dimension 1142 * @return an image from the given SVG data at the desired dimension. 1143 */ 1113 1144 public static BufferedImage createImageFromSvg(SVGDiagram svg, Dimension dim) { 1114 1145 float realWidth = svg.getWidth();
Note:
See TracChangeset
for help on using the changeset viewer.