|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.util.IconManager
@Todo(priority=ENHANCEMENT,
compatibility=BREAK_MINOR,
target=VERSION_1_1_0,
description="IconManager extends UIManager, just like ColorManager and FontManager")
public class IconManager
A map of icons which are used by various objects. The icon is stored
under a given String-key. Every icon can be stored with three different
priorities, only the icon with the highest priority
will be returned when getIcon(String) is called. It is possible
to register a IconManagerListener which will receive an event
whenever an icon changes.
IconManagerListener| Constructor Summary | |
|---|---|
IconManager()
|
|
| Method Summary | |
|---|---|
void |
add(String key,
IconManagerListener listener)
Adds a listener to this manager. |
void |
clearThemeIcons()
Removes all icons which have the priority THEME. |
Icon |
getIcon(String key)
Gets the icon under key with the highest priority. |
void |
remove(String key,
IconManagerListener listener)
Removes a listener from this manager. |
void |
setIcon(String key,
Priority priority,
Icon icon)
Stores an icon. |
void |
setIconClient(String key,
Icon icon)
Sets an icon with client-priority. |
void |
setIconDefault(String key,
Icon icon)
Sets an icon with default-priority. |
void |
setIconTheme(String key,
Icon icon)
Sets an icon with theme-priority. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IconManager()
| Method Detail |
|---|
public void setIcon(String key,
Priority priority,
Icon icon)
key - the key of the iconpriority - the priority, where Priority.CLIENT is the
highest, Priority.DEFAULT the lowest. Icons stored with the
same key but another priority are not deleted.icon - the icon, null if the icon should be removed
public void setIconDefault(String key,
Icon icon)
key - the key of the iconicon - the icon or null
public void setIconTheme(String key,
Icon icon)
key - the key of the iconicon - the icon or null
public void setIconClient(String key,
Icon icon)
key - the key of the iconicon - the icon or nullpublic Icon getIcon(String key)
key with the highest priority.
key - the key of the icon
null
public void add(String key,
IconManagerListener listener)
key has been changed.
key - the key which is observedlistener - the new listener
public void remove(String key,
IconManagerListener listener)
key - the observed keylistener - the listener to removepublic void clearThemeIcons()
THEME.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||