|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.util.UIProperties<Icon,DockIcon,DockIconBridge> bibliothek.gui.dock.util.IconManager
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.
Clients have to add an DockIcon
in order to read values from this
manager.
The default icons are stored as png files alongside the framework, the "icons.ini" files
tells what keys are used for the icons. Additional keys for icons are:
DropDownIcon.ICON_KEY
: this icon is painted for DropDownAction
s, it is
a small triangle pointing downwards. DockUI.OVERFLOW_MENU_ICON
: the icon used for the menu that is created if there are too many buttons
of actions in a row.
Field Summary | |
---|---|
static PropertyKey<Dimension> |
MINIMUM_ICON_SIZE
What size the framework should expect the smallest icon to be. |
Constructor Summary | |
---|---|
IconManager(DockController controller)
Creates a new IconManager . |
Method Summary | |
---|---|
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 bibliothek.gui.dock.util.UIProperties |
---|
add, clear, get, get, getBridge, getBridgeFor, getController, getScheme, isObserved, isObserved, isStored, lockUpdate, publish, put, remove, setScheme, unlockUpdate, unpublish, unpublish |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final PropertyKey<Dimension> MINIMUM_ICON_SIZE
Component
s. This is not a hard boundary, just expect any
icon smaller than this constant to be surrounded by some addional empty space. The default size
is 16x16 pixels.
Constructor Detail |
---|
public IconManager(DockController controller)
IconManager
.
controller
- the owner of this mapMethod 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 removedpublic 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 null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |