|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.application.ResourceConverter
org.openpermis.editor.policy.gui.IconRegistryConverter
public final class IconRegistryConverter
Resource converter that looks up icon keys in an icon registry.
An icon key is a key enclosed in angle brackets, e.g. <foo>. Icon keys may have annotations as in the following example: <foo[add,error]>.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jdesktop.application.ResourceConverter |
---|
org.jdesktop.application.ResourceConverter.ResourceConverterException |
Field Summary | |
---|---|
private org.jdesktop.application.ResourceConverter |
delegate
The resource converter to delegate unhandled requests to. |
private static String |
ICON_REGISTRY_KEY_END
|
private static String |
ICON_REGISTRY_KEY_START
|
private IconRegistry |
iconRegistry
The primary handler for requests. |
private static IconRegistryConverter |
SINGLETON
The singleton icon registry converter instance. |
Fields inherited from class org.jdesktop.application.ResourceConverter |
---|
type |
Constructor Summary | |
---|---|
private |
IconRegistryConverter()
Creates an icon registry converter that is not active yet. |
Method Summary | |
---|---|
static void |
activate(IconRegistry iconRegistry)
Initializes the singleton resource converter. |
private static String |
getIconRegistryKey(String key)
Returns the icon registry key for the specified key. |
static void |
initialize()
Reserves a resource converter slot for the icon registry converter. |
private void |
initialize(org.jdesktop.application.ResourceConverter resourceConverter,
IconRegistry registry)
Activates this resource converter. |
Object |
parseString(String key,
org.jdesktop.application.ResourceMap resourceMap)
|
boolean |
supportsType(Class type)
|
Methods inherited from class org.jdesktop.application.ResourceConverter |
---|
forType, register, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final IconRegistryConverter SINGLETON
Due to the poor design of the resource converter class we have to use a singleton
which is plugged in at application startup (see initialize
) and
activate
at a later stage.
private static final String ICON_REGISTRY_KEY_START
"<"
private static final String ICON_REGISTRY_KEY_END
">"
private org.jdesktop.application.ResourceConverter delegate
private IconRegistry iconRegistry
Constructor Detail |
---|
private IconRegistryConverter()
Method Detail |
---|
public static void initialize()
The slot has to be reserver prior to initialization of the default icon resource converter since the converter cannot be removed once its registered.
public static void activate(IconRegistry iconRegistry)
iconRegistry
- the icon registry to use.private static String getIconRegistryKey(String key)
If the key starts and ends with angle brackets it returns the contents between the
brackets. Returns null
if the key is no icon registry key.
key
- the key for which to retrieve the icon registry key.
null
if the key is no icon registry key.private void initialize(org.jdesktop.application.ResourceConverter resourceConverter, IconRegistry registry)
resourceConverter
- the delegate to use.registry
- the icon registry to use.public Object parseString(String key, org.jdesktop.application.ResourceMap resourceMap) throws org.jdesktop.application.ResourceConverter.ResourceConverterException
parseString
in class org.jdesktop.application.ResourceConverter
org.jdesktop.application.ResourceConverter.ResourceConverterException
public boolean supportsType(Class type)
supportsType
in class org.jdesktop.application.ResourceConverter
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG