|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.application.helpers.ResourceLoaderWrapper
public final class ResourceLoaderWrapper
Wrapper around org.tigris.gef.util.ResourceLoader.
Necessary since ArgoUML needs some extra init.
Method Summary | |
---|---|
static void |
addResourceLocation(java.lang.String location)
This public operation is needed to allow modules to add their own images. |
static java.lang.String |
getImageBinding(java.lang.String name)
Convert the key to the image file name. |
static ResourceLoaderWrapper |
getInstance()
Returns the singleton instance. |
javax.swing.Icon |
lookupIcon(java.lang.Object value)
Find the Icon for a given model element. |
static javax.swing.ImageIcon |
lookupIcon(java.lang.String key)
Look up the Icon for a key. |
static javax.swing.ImageIcon |
lookupIconResource(java.lang.String resource)
Find the correct icon for a key. |
static javax.swing.ImageIcon |
lookupIconResource(java.lang.String resource,
java.lang.String desc)
Find the correct icon for a key. |
static java.net.URL |
lookupIconUrl(java.lang.String name)
Find the path to a given icon and return it as a URL. |
static java.net.URL |
lookupIconUrl(java.lang.String name,
java.lang.ClassLoader loader)
Find the path to a given icon and return it as a URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ResourceLoaderWrapper getInstance()
public static void addResourceLocation(java.lang.String location)
location
- the path were the images arepublic static javax.swing.ImageIcon lookupIconResource(java.lang.String resource)
resource
- The name of the resource to look up.
public static javax.swing.ImageIcon lookupIconResource(java.lang.String resource, java.lang.String desc)
resource
- The name of the resource to look up.desc
- The description for the icon.
public static javax.swing.ImageIcon lookupIcon(java.lang.String key)
key
- The key to find.
public javax.swing.Icon lookupIcon(java.lang.Object value)
value
- The model element.
TODO: This should not use string matching on classnames to do this
since this means that we have knowledge about how the model
elements are implemented outside of the Model component.
null
if there is no Icon.public static java.lang.String getImageBinding(java.lang.String name)
name
- the new i18n key
public static java.net.URL lookupIconUrl(java.lang.String name, java.lang.ClassLoader loader)
name
- base name of the icon to search forloader
- class loader to use or null to use the default class loader
public static java.net.URL lookupIconUrl(java.lang.String name)
name
- base name of the icon to search for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |