@Test public void testDocumentIconNullExtension() { final NSImage icon = new NSImageIconCache().documentIcon(null, 64); assertNotNull(icon); assertTrue(icon.isValid()); assertFalse(icon.isTemplate()); assertEquals(64, icon.size().width.intValue()); assertEquals(64, icon.size().height.intValue()); }
@Override public NSImage documentIcon(final String extension, final Integer size) { NSImage image = this.load(extension, size); if(null == image) { return this.cache(extension, this.convert(extension, NSWorkspace.sharedWorkspace().iconForFileType(extension), size), size); } return image; }
NSImageIconCache implements IconCache<NSImage> { @Override public NSImage documentIcon(final String extension, final Integer size) { NSImage image = this.load(extension, size); if(null == image) { return this.cache(extension, this.convert(extension, NSWorkspace.sharedWorkspace().iconForFileType(extension), size), size); } return image; } }
NSImageIconCache implements IconCache<NSImage> { @Override public NSImage documentIcon(final String extension, final Integer size) { NSImage image = this.load(extension, size); if(null == image) { return this.cache(extension, this.convert(extension, NSWorkspace.sharedWorkspace().iconForFileType(extension), size), size); } return image; }  }
NSImageIconCache implements IconCache<NSImage> { @Override public NSImage documentIcon(final String extension, final Integer size) { NSImage image = this.load(extension, size); if(null == image) { return this.cache(extension, this.convert(extension, NSWorkspace.sharedWorkspace().iconForFileType(extension), size), size); } return image; }  @Override NSImage documentIcon(final String extension, final Integer size); @Override NSImage documentIcon(final String extension, final Integer size, final NSImage badge); @Override NSImage folderIcon(final Integer size); @Override NSImage folderIcon(final Integer size, final NSImage badge); @Override NSImage iconNamed(final String name, final Integer width, final Integer height); @Override NSImage fileIcon(final Local file, final Integer size); @Override NSImage applicationIcon(final Application app, final Integer size); @Override NSImage fileIcon(final Path file, final Integer size); @Override NSImage aliasIcon(final String extension, final Integer size); }
NSImageIconCache implements IconCache<NSImage> { @Override public NSImage documentIcon(final String extension, final Integer size) { NSImage image = this.load(extension, size); if(null == image) { return this.cache(extension, this.convert(extension, NSWorkspace.sharedWorkspace().iconForFileType(extension), size), size); } return image; }  @Override NSImage documentIcon(final String extension, final Integer size); @Override NSImage documentIcon(final String extension, final Integer size, final NSImage badge); @Override NSImage folderIcon(final Integer size); @Override NSImage folderIcon(final Integer size, final NSImage badge); @Override NSImage iconNamed(final String name, final Integer width, final Integer height); @Override NSImage fileIcon(final Local file, final Integer size); @Override NSImage applicationIcon(final Application app, final Integer size); @Override NSImage fileIcon(final Path file, final Integer size); @Override NSImage aliasIcon(final String extension, final Integer size);  }