|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.gui.PolicyIconRegistry
public final class PolicyIconRegistry
Helper class to create the policy icon registry.
This class is mainly used since the swing application framework only permits creation of resource maps based on classes.
Field Summary | |
---|---|
private static String |
ANNOTATION_PREFIX
Prefix for annotation icons. |
private IconRegistry |
iconRegistry
The actual icon registry used internally. |
private static String |
PART_TYPE_PREFIX
Prefix for part type icons. |
private static IconRegistry |
singleton
Unfortunately we are forced to use a singleton here. |
Constructor Summary | |
---|---|
private |
PolicyIconRegistry(IconRegistry iconRegistry)
Creates a new policy icon registry for the specified icon registry. |
Method Summary | |
---|---|
static PolicyIconRegistry |
create(org.jdesktop.application.ApplicationContext context)
Creates a policy icon registry. |
Icon |
getIcon(Class<? extends org.openpermis.policy.bean.PartBean> partBeanType,
IconAnnotation... annotations)
Returns an icon for the specified part type. |
Icon |
getIcon(org.openpermis.policy.bean.PartBean partBean,
IconAnnotation... annotations)
Returns an icon for the specified part bean. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String ANNOTATION_PREFIX
"annotation."
private static final String PART_TYPE_PREFIX
"part."
private static IconRegistry singleton
See IconRegistryConverter
for the gory details.
private final IconRegistry iconRegistry
Constructor Detail |
---|
private PolicyIconRegistry(IconRegistry iconRegistry)
create(ApplicationContext)
Method Detail |
---|
public static final PolicyIconRegistry create(org.jdesktop.application.ApplicationContext context)
context
- the application context to create the registry for.
public Icon getIcon(org.openpermis.policy.bean.PartBean partBean, IconAnnotation... annotations)
partBean
- the part bean for which to retrieve an icon.annotations
- an optional list of annotations for the icon.
null
if there is no icon available.public Icon getIcon(Class<? extends org.openpermis.policy.bean.PartBean> partBeanType, IconAnnotation... annotations)
partBeanType
- the part bean type for which to return an icon.annotations
- an optional list of annotations for the icon.
null
if there is no such icon.
|
![]() |
||||||||
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