|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.guiclient.model.item.ItemIconMgr
public final class ItemIconMgr
The item icon manager manages and caches icons for particular item types.
All icons have to be registered using the registerIcon(String, Icon) method.
| Method Summary | |
|---|---|
javax.swing.Icon |
getIcon(Item item,
int preferredSize)
Returns the standard icon for the given item. |
javax.swing.Icon |
getIcon(java.lang.String iconName,
int preferredSize)
Returns an icon that has been registered with the icon model by its name. |
javax.swing.Icon |
getIcon(java.lang.String skinName,
Item item,
int preferredSize)
Returns the standard icon for the given item and the given skin. |
javax.swing.Icon |
getIcon(java.lang.String skinName,
java.lang.String iconName,
int preferredSize)
Returns an icon that has been registered with the icon model by its name and the given skin. |
static ItemIconMgr |
getInstance()
Gets the singleton instance for this class. |
static MultiIcon |
getMultiIcon(javax.swing.Icon icon)
Converts a regular icon to a multi icon. |
javax.swing.Icon |
getTypeIcon(DataTypeItem item,
int preferredSize)
Returns an icon for a data type item that can be used to visualize parameters. |
javax.swing.Icon |
getTypeIcon(java.lang.String skinName,
DataTypeItem item,
int preferredSize)
Returns an icon for a data type item and the given skin that can be used to visualize parameters. |
void |
registerIcon(java.lang.String name,
javax.swing.Icon icon)
Registers an icon with the icon model. |
void |
registerIcon(java.lang.String skinName,
java.lang.String name,
javax.swing.Icon icon)
Registers an icon with the icon model for the given skin. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ItemIconMgr getInstance()
public javax.swing.Icon getIcon(Item item,
int preferredSize)
item - The item for which the icon should be retrievedpreferredSize - The preferred size of the icon in pixel
public javax.swing.Icon getIcon(java.lang.String skinName,
Item item,
int preferredSize)
skinName - Name of the skin this icon should belong to; null for the default skinitem - The item for which the icon should be retrievedpreferredSize - The preferred size of the icon in pixel
public javax.swing.Icon getTypeIcon(DataTypeItem item,
int preferredSize)
item - The item for which the icon should be retrievedpreferredSize - The preferred size of the icon in pixel
public javax.swing.Icon getTypeIcon(java.lang.String skinName,
DataTypeItem item,
int preferredSize)
skinName - Name of the skin this icon should belong to; null for the default skinitem - The item for which the icon should be retrievedpreferredSize - The preferred size of the icon in pixel
public javax.swing.Icon getIcon(java.lang.String iconName,
int preferredSize)
iconName - Name of the iconpreferredSize - The preferred size of the icon in pixel
public javax.swing.Icon getIcon(java.lang.String skinName,
java.lang.String iconName,
int preferredSize)
skinName - Name of the skin this icon should belong to; null for the default skiniconName - Name of the iconpreferredSize - The preferred size of the icon in pixel
public void registerIcon(java.lang.String name,
javax.swing.Icon icon)
name - Name of the iconicon - Icon to add
public void registerIcon(java.lang.String skinName,
java.lang.String name,
javax.swing.Icon icon)
skinName - Name of the skin this icon should belong to; null for the default skinname - Name of the iconicon - Icon to addpublic static MultiIcon getMultiIcon(javax.swing.Icon icon)
icon - Icon to convert (if this is a MultiIcon itself, it will be returned directly)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||