Class IconPool
- java.lang.Object
-
- org.opends.guitools.controlpanel.browser.IconPool
-
public class IconPool extends Object
This class is used as a cache containing the icons that are used by the BrowserController to update the nodes. It keeps some icons associated with some entry types, to suffixes, to the root node, etc.
-
-
Field Summary
Fields Modifier and Type Field Description static StringIMAGE_PATHThe path that contains the icons.static intMODIFIER_ERRORMask for the node that has an error.static intMODIFIER_LEAFMask for the leaf node.static intMODIFIER_REFERRALMask for the referral node.
-
Constructor Summary
Constructors Constructor Description IconPool()The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageIcongetDefaultContainerIcon()Returns the icon associated with a container node.ImageIcongetDefaultLeafIcon()Returns the icon associated with a leaf node.ImageIcongetErrorIcon()Returns the icon associated with a node for which an error occurred.ImageIcongetErrorMaskIcon()Returns the icon associated with the error mask icon.ImageIcongetIcon(SortedSet<String> objectClasses, int modifiers)If objectClass is null, a default icon is used.ImageIcongetIconForRootNode()Returns the icon associated with a root node.ImageIcongetReferralMaskIcon()Returns the icon associated with the referral mask icon.ImageIcongetSuffixIcon()Returns the icon associated with a suffix node.
-
-
-
Field Detail
-
MODIFIER_LEAF
public static final int MODIFIER_LEAF
Mask for the leaf node.- See Also:
- Constant Field Values
-
MODIFIER_REFERRAL
public static final int MODIFIER_REFERRAL
Mask for the referral node.- See Also:
- Constant Field Values
-
MODIFIER_ERROR
public static final int MODIFIER_ERROR
Mask for the node that has an error.- See Also:
- Constant Field Values
-
IMAGE_PATH
public static final String IMAGE_PATH
The path that contains the icons.- See Also:
- Constant Field Values
-
-
Method Detail
-
getIcon
public ImageIcon getIcon(SortedSet<String> objectClasses, int modifiers)
If objectClass is null, a default icon is used.- Parameters:
objectClasses- the objectclass values of the entry for which we want an icon.modifiers- the modifiers associated with the entry (if there was an error, if it is a referral, etc.).- Returns:
- the icon corresponding to the provided object classes and modifiers.
-
getDefaultLeafIcon
public ImageIcon getDefaultLeafIcon()
Returns the icon associated with a leaf node.- Returns:
- the icon associated with a leaf node.
-
getDefaultContainerIcon
public ImageIcon getDefaultContainerIcon()
Returns the icon associated with a container node.- Returns:
- the icon associated with a container node.
-
getSuffixIcon
public ImageIcon getSuffixIcon()
Returns the icon associated with a suffix node.- Returns:
- the icon associated with a suffix node.
-
getIconForRootNode
public ImageIcon getIconForRootNode()
Returns the icon associated with a root node.- Returns:
- the icon associated with a root node.
-
getErrorIcon
public ImageIcon getErrorIcon()
Returns the icon associated with a node for which an error occurred.- Returns:
- the icon associated with a node for which an error occurred.
-
getErrorMaskIcon
public ImageIcon getErrorMaskIcon()
Returns the icon associated with the error mask icon.- Returns:
- the icon associated with the error mask icon.
-
getReferralMaskIcon
public ImageIcon getReferralMaskIcon()
Returns the icon associated with the referral mask icon.- Returns:
- the icon associated with the referral mask icon.
-
-