changed the icon usage. instead of scaling 512px icons in memory, there is an icon for every size. This helps with a bug in jdk8 where the Java-Image size is not used in the MenuButton but always the original size of the icon file.

This commit is contained in:
2014-01-05 01:33:25 +01:00
parent 754dc982ea
commit 6d5440d0cd
558 changed files with 14 additions and 80 deletions

View File

@@ -115,7 +115,7 @@ public class CacheListController implements Initializable, SessionContextListene
private void initListMenuButton(final ResourceBundle rb) {
addClasses(menuIcon, CACHE_LIST_ACTION_ICONS);
menuIcon.setGraphic(new ImageView(IconManager.getIcon("/icons/iconmonstr-menu-icon.png", IconManager.IconSize.SMALL)));
menuIcon.setGraphic(new ImageView(IconManager.getIcon("iconmonstr-menu-icon.png", IconManager.IconSize.SMALL)));
menuIcon.getItems().addAll(createSortMenu(rb));
}

View File

@@ -123,7 +123,7 @@ public class CacheListCell extends ListCell<Cache> {
owner.setText(ownerText);
if (cache.isFound()) {
foundIcon.setImage(IconManager.getIcon("/icons/iconmonstr-check-mark-11-icon.png", IconManager.IconSize.SMALL));
foundIcon.setImage(IconManager.getIcon("iconmonstr-check-mark-11-icon.png", IconManager.IconSize.SMALL));
} else {
foundIcon.setImage(null);
}

View File

@@ -39,45 +39,45 @@ public class GeocachingIcons {
}
public static Image getIcon(Cache cache, IconManager.IconSize size) {
String iconName = "/icons/iconmonstr-map-5-icon.png";
String iconName = "iconmonstr-map-5-icon.png";
switch (cache.getType()) {
case MULTI_CACHE:
iconName = "/icons/iconmonstr-map-6-icon.png";
iconName = "iconmonstr-map-6-icon.png";
break;
case TRADITIONAL_CACHE:
iconName = "/icons/iconmonstr-map-5-icon.png";
iconName = "iconmonstr-map-5-icon.png";
break;
case UNKNOWN_CACHE:
iconName = "/icons/iconmonstr-help-3-icon.png";
iconName = "iconmonstr-help-3-icon.png";
break;
case EARTH_CACHE:
iconName = "/icons/iconmonstr-globe-4-icon.png";
iconName = "iconmonstr-globe-4-icon.png";
break;
case LETTERBOX:
iconName = "/icons/iconmonstr-email-4-icon.png";
iconName = "iconmonstr-email-4-icon.png";
break;
case EVENT:
case CITO_EVENT:
case MEGA_EVENT:
iconName = "/icons/iconmonstr-calendar-4-icon.png";
iconName = "iconmonstr-calendar-4-icon.png";
break;
case WHERIGO:
iconName = "/icons/iconmonstr-navigation-6-icon.png";
iconName = "iconmonstr-navigation-6-icon.png";
break;
case WEBCAM_CACHE:
iconName = "/icons/iconmonstr-webcam-3-icon.png";
iconName = "iconmonstr-webcam-3-icon.png";
break;
case VIRTUAL_CACHE:
iconName = "/icons/iconmonstr-network-2-icon.png";
iconName = "iconmonstr-network-2-icon.png";
break;
default:
@@ -93,7 +93,7 @@ public class GeocachingIcons {
}
public static Image getMapIcon(Cache cache, IconManager.IconSize size) {
String iconName = "/icons/iconmonstr-location-icon.png";
String iconName = "iconmonstr-location-icon.png";
return IconManager.getIcon(iconName, size);
}

View File

@@ -54,15 +54,13 @@ public class IconManager {
}
}
;
public static Image getIcon(String iconName, IconSize size) {
final Image image;
String key = iconName + "_" + size;
if (container.containsKey(key)) {
image = container.get(key);
} else {
image = new Image(iconName, size.getValue(), size.getValue(), true, true);
image = new Image("/icons/"+(int)size.getValue()+"/"+iconName, size.getValue(), size.getValue(), true, true);
container.put(key, image);
}
return image;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Some files were not shown because too many files have changed in this diff Show More