Ejemplo n.º 1
0
 public NSImage convert(final NSImage icon, final Integer width, final Integer height) {
   if (null == width || null == height) {
     log.debug(String.format("Return default size for %s", icon.name()));
     return icon;
   }
   icon.setSize(new NSSize(width, height));
   return icon;
 }
Ejemplo n.º 2
0
 private NSImage iconForFolder(final NSImage badge, final Integer size) {
   final String name = String.format("NSFolder-%s", badge.name());
   NSImage folder = this.iconForName(name, size);
   if (null == folder) {
     folder = this.badge(badge, this.convert(FOLDER_ICON, size));
     this.put(name, folder, size);
   }
   return folder;
 }
Ejemplo n.º 3
0
 public NSImage iconForExtension(final NSImage badge, final String extension, final Integer size) {
   final String name = extension + badge.name();
   NSImage icon = this.iconForName(name, size);
   if (null == icon) {
     icon = this.badge(badge, this.iconForExtension(extension, size));
     this.put(name, icon, size);
   }
   return icon;
 }