/** * Normalize the supplied url. * * @param url The url to be normalized. * @return The normalized url. */ public static String toNormalizedIconUrl(String url) { return Icon.toNormalizedIconUrl(url); }
/** * Get an icon instance from it's url. * @param url The icon url. * @return The icon instance, or {@code null} if no such icon. */ public Icon getIconByUrl(String url) { if (url == null) { return null; } url = Icon.toNormalizedIconUrl(url); return iconsByUrl.get(url); }
/** * Normalize the supplied url. * * @param url The url to be normalized. * @return The normalized url. */ public static String toNormalizedIconUrl(GString url) { return Icon.toNormalizedIconUrl(url.toString()); }
/** * Icon instance. * * @param classSpec The icon class specification. * @param url The icon image url. * @param style The icon style. * @param iconType The icon type. */ public Icon(String classSpec, String url, String style, IconType iconType) { this.classSpec = classSpec; this.normalizedSelector = toNormalizedCSSSelector(classSpec); this.url = toNormalizedIconUrl(url); this.style = style; this.iconType = iconType; }