com.jivesoftware.community.util
Interface IconGenerator
public interface IconGenerator
An interface for defining icon generators that work in conjunction with
SkinUtils#getJiveObjectIcon. Create an implementation of this interface and register
it by calling SkinUtils.addIconGenerator(int objectType, IconGenerator generator). Gives
customers the ability to override the icons generated for existing content types and
gives them the ability to add icons for new content types.
- See Also:
SkinUtils.addIconGenerator(int, IconGenerator),
SkinUtils.removeIconGenerator(int),
SkinUtils.getIcon(String, boolean, int)
|
Method Summary |
String |
getIcon(JiveObject object,
boolean returnAsCssClass,
int type)
Fetch an icon for the given JiveObject, return null if the method declines
to provide an icon and the SkinUtils implementation will delegate
to the system default. |
getIcon
String getIcon(JiveObject object,
boolean returnAsCssClass,
int type)
- Fetch an icon for the given JiveObject, return null if the method declines
to provide an icon and the SkinUtils implementation will delegate
to the system default.
- Parameters:
object - the object to fetch an icon forreturnAsCssClass - true to return a css class (may be partial), false to return the path
to the image (not including the context root i.e. /clearspace/)type - 0 for small, 1 for medium, 2 for large, 3 for xlarge, 4 for a label icon, 5 for
no type
- Returns:
- a css class (may be partial) or the path to the image (not including the context
root) depending on the value of the returnAsCssClass parameter or null if the generator
shouldn't handle the object.
Copyright © 1999-2007 Jive Software.