Class IconDefaultService


  • @Service
    public class IconDefaultService
    extends Object
    A Service class that builds and/or caches default icons.
    Author:
    Julian David Camacho Erazo <julian.camacho@kuwaiba.org>
    • Field Detail

      • DEFAULT_ICON_WIDTH

        public static final int DEFAULT_ICON_WIDTH
        Default icon width (used in views)
        See Also:
        Constant Field Values
      • DEFAULT_ICON_HEIGHT

        public static final int DEFAULT_ICON_HEIGHT
        Default icon height (used in views)
        See Also:
        Constant Field Values
      • DEFAULT_SMALL_ICON_WIDTH

        public static final int DEFAULT_SMALL_ICON_WIDTH
        Default icon width (used in navigation trees)
        See Also:
        Constant Field Values
      • DEFAULT_SMALL_ICON_HEIGHT

        public static final int DEFAULT_SMALL_ICON_HEIGHT
        Default icon height (used in navigation trees)
        See Also:
        Constant Field Values
    • Constructor Detail

      • IconDefaultService

        public IconDefaultService()
    • Method Detail

      • getClassIconDefault

        public byte[] getClassIconDefault​(String className,
                                          int color)
        Builds an icon as a byte array
        Parameters:
        className - The className of the icon
        color - The color of the icon
        Returns:
        The default icon as a byte array
      • getClassIconDefault

        public byte[] getClassIconDefault()
        Builds an icon as a byte array
        Returns:
        The default icon as a byte array
      • getClassSmallIconDefault

        public byte[] getClassSmallIconDefault​(String className,
                                               int color)
        Builds a small icon as a byte array
        Parameters:
        className - The className of the small icon
        color - The color of the small Icon
        Returns:
        The small default icon as a byte array
      • getClassSmallIconDefault

        public byte[] getClassSmallIconDefault()
        Builds a small icon as a byte array
        Returns:
        The small default icon as a byte array
      • getRelationshipIconDefault

        public byte[] getRelationshipIconDefault​(int color,
                                                 int width,
                                                 int height)
        Builds an icon resource
        Parameters:
        color - The color of the icon
        width - The width of the icon
        height - The height of the icon
        Returns:
        The icon as a byte array