org.openpermis.editor.policy.gui
Class PolicyIconRegistry

java.lang.Object
  extended by org.openpermis.editor.policy.gui.PolicyIconRegistry

public final class PolicyIconRegistry
extends Object

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.

Since:
0.3.0

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
 

Method Detail

create

public static final PolicyIconRegistry create(org.jdesktop.application.ApplicationContext context)
Creates a policy icon registry.

Parameters:
context - the application context to create the registry for.
Returns:
the icon registry requested.
Since:
0.3.0

getIcon

public Icon getIcon(org.openpermis.policy.bean.PartBean partBean,
                    IconAnnotation... annotations)
Returns an icon for the specified part bean.

Parameters:
partBean - the part bean for which to retrieve an icon.
annotations - an optional list of annotations for the icon.
Returns:
the icon requested or null if there is no icon available.
Since:
0.3.0

getIcon

public Icon getIcon(Class<? extends org.openpermis.policy.bean.PartBean> partBeanType,
                    IconAnnotation... annotations)
Returns an icon for the specified part type.

Parameters:
partBeanType - the part bean type for which to return an icon.
annotations - an optional list of annotations for the icon.
Returns:
the icon requested or null if there is no such icon.
Since:
0.3.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:33
Copyright (c) 2002-2007 Ergon Informatik AG