private NSImage convert(final String name, final NSImage icon, final Integer width, final Integer height) { if(StringUtils.endsWith(name, "pdf")) { icon.setTemplate(true); } if(null == width || null == height) { log.debug(String.format("Return default size for %s", icon.name())); return icon; } // Cache sized image icon.setName(String.format("%d-%s", width, name)); icon.setSize(new NSSize(width, height)); return icon; } }
if(file.getType().contains(Path.Type.decrypted)) { final NSImage badge = this.iconNamed("unlockedbadge.tiff", size); badge.setName("unlockedbadge"); if(file.isDirectory()) { return this.folderIcon(size, badge); badge.setName("aliasbadge"); if(file.isDirectory()) { return this.folderIcon(size, badge); if(!file.attributes().getPermission().isExecutable()) { final NSImage badge = this.iconNamed("privatefolderbadge.tiff", size); badge.setName("privatefolderbadge"); return this.folderIcon(size, badge); if(file.attributes().getPermission().isWritable()) { final NSImage badge = this.iconNamed("dropfolderbadge.tiff", size); badge.setName("dropfolderbadge"); return this.folderIcon(size, badge); badge.setName("readonlyfolderbadge"); return this.folderIcon(size, badge);