Class DefaultIconPack


  • public class DefaultIconPack
    extends IconPack
    Icon pack definition for the default colour icons shipping with ICEpdf

    This icon pack supports all icon variants. Typical icon sizes are:

    • HUGE: 57×48 px
    • LARGE: 32×32 px
    • SMALL: 24×24 px
    • MINI: 20×20 px
    • TINY: 16×16 px
    All icons in this pack are returned as ImageIcons created from PNG files
    Author:
    Alexander Leithner
    • Constructor Detail

      • DefaultIconPack

        public DefaultIconPack()
    • Method Detail

      • getProvidedVariants

        public IconPack.VariantPool getProvidedVariants()
        Description copied from class: IconPack
        Gets all variants this icon pack provides for at least one icon.

        This method is called by the Images utility class when deciding what icons to register to a given component. No guarantee regarding further usage is made.

        Specified by:
        getProvidedVariants in class IconPack
        Returns:
        Information about what variant this icon pack provides.
      • getIcon

        public Icon getIcon​(String name,
                            IconPack.Variant variant,
                            Images.IconSize size)
                     throws RuntimeException
        Description copied from class: IconPack
        Gets a single icon with the given name in the given variant and size from the classpath.

        Note that the size parameter is to be regarded as a hint. If the icon pack deems it necessary to return another size for any given icon, the icon will be returned in this size instead. No guarantee is made that any icon return by this method is square

        Specified by:
        getIcon in class IconPack
        Parameters:
        name - The name of the icon to retrieve
        variant - The variant to retrieve
        size - The size to retrieve
        Returns:
        The icon requested in the given variant, either in the wanted size or a similar size
        Throws:
        RuntimeException - If the icon could not be retrieved from the classpath or any other error occurs