Class 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 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
    • Constructor Detail

      • IconPool

        public IconPool()
        The default constructor.
    • 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.