/** * Gets a brighter ImageIcon by passing class, a relative image file path and a percentage of brightness. * * @param clazz the Class<?> * @param fileName relative file name * @param percent percentage of brightness * @return the ImageIcon */ public static ImageIcon getBrighterImageIcon(Class<?> clazz, String fileName, int percent) { String id = clazz.getName() + ":" + fileName + ":" + percent; ImageIcon saved = _brighterIcons.get(id); if (saved != null) return saved; else { ImageIcon icon = createBrighterImage(getImageIcon(clazz, fileName), percent); _brighterIcons.put(id, icon); return icon; } }
/** * Gets a brighter ImageIcon by passing class and a relative image file path. * * @param clazz the Class<?> * @param fileName relative file name * @return the ImageIcon */ public static ImageIcon getBrighterImageIcon(Class<?> clazz, String fileName) { String id = clazz.getName() + ":" + fileName + ":" + ColorFilter.getPercent(); ImageIcon saved = _brighterIcons.get(id); if (saved != null) return saved; else { ImageIcon icon = createBrighterImage(getImageIcon(clazz, fileName)); _brighterIcons.put(id, icon); return icon; } }