BallColor(String image, Localizable description, Color baseColor) { this.iconName = Icon.toNormalizedIconName(image); this.iconClassName = Icon.toNormalizedIconNameClass(image); this.baseColor = baseColor; // name() is not usable in the constructor, so I have to repeat the name twice // in the constants definition. this.image = image+ (image.endsWith("_anime")?".gif":".png"); this.description = description; }
/** * Normalize the supplied string to an Icon name class e.g. "blue_anime" to "icon-blue-anime". * * @param string The string to be normalized. * @return The normalized icon name class. */ public static String toNormalizedIconNameClass(String string) { return Icon.toNormalizedIconNameClass(string); }
/** * Normalize the supplied string to an Icon name class e.g. "blue_anime" to "icon-blue-anime". * * @param string The string to be normalized. * @return The normalized icon name class. */ public static String toNormalizedIconNameClass(GString string) { return Icon.toNormalizedIconNameClass(string.toString()); }
BallColor(String image, Localizable description, Color baseColor) { this.iconName = Icon.toNormalizedIconName(image); this.iconClassName = Icon.toNormalizedIconNameClass(image); this.baseColor = baseColor; // name() is not usable in the constructor, so I have to repeat the name twice // in the constants definition. this.image = image+ (image.endsWith("_anime")?".gif":".png"); this.description = description; }