|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.gui.service.icon.AbstractIconService
public abstract class AbstractIconService
Icon manager that loads icon from a map of icon definitions.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractIconService.IconItem
Associations between icon sizes and actual icons. |
| Constructor Summary | |
|---|---|
AbstractIconService()
Constructor. |
|
| Method Summary | |
|---|---|
Icon |
getIcon(String id,
IconSize size)
Looks for the icon ata given size. |
Map<String,IconDefinition> |
getIconDefinitions()
Gets the list of icon definitions |
URL |
getIconURL(String iconId,
IconSize size)
Returns the URL to an icon. |
protected void |
init()
Initializes the manager. |
protected void |
load()
This method actually initializes the icon manager. |
protected abstract Icon |
loadIconObject(String path)
This method must be overriden by subclasses in order to load an icon from a path. |
void |
setIconDefinitions(Map<String,IconDefinition> iconDefinitions)
Sets the list of icon definitions |
protected abstract URL |
toURL(String path)
This method must be overriden by subclasses in order to return the URL to an icon defined by the given path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractIconService()
URLUtils.registerURLStreamHandler(String, java.net.URLStreamHandler)| Method Detail |
|---|
public Icon getIcon(String id,
IconSize size)
getIcon in interface IconServiceid - Icon idsize - Required icon size
public Map<String,IconDefinition> getIconDefinitions()
public URL getIconURL(String iconId,
IconSize size)
IconService
getIconURL in interface IconServiceiconId - Icon idsize - Required icon size
protected void init()
load()protected void load()
protected abstract Icon loadIconObject(String path)
path - Path to the icon (could be a resource path but could be
something else according to the icon manager implementation).
public void setIconDefinitions(Map<String,IconDefinition> iconDefinitions)
iconDefinitions - List of icon definitionsprotected abstract URL toURL(String path)
path - Path to the icon (could be a resource path but could be
something else according to the icon manager implementation).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||