- java.lang.Object
-
- org.icepdf.ri.images.IconPack
-
- org.icepdf.ri.images.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 pxLARGE: 32×32 pxSMALL: 24×24 pxMINI: 20×20 pxTINY: 16×16 px
ImageIcons created from PNG files- Author:
- Alexander Leithner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.icepdf.ri.images.IconPack
IconPack.Variant, IconPack.VariantPool
-
-
Constructor Summary
Constructors Constructor Description DefaultIconPack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IcongetIcon(String name, IconPack.Variant variant, Images.IconSize size)Gets a single icon with the given name in the given variant and size from the classpath.IconPack.VariantPoolgetProvidedVariants()Gets all variants this icon pack provides for at least one icon.
-
-
-
Method Detail
-
getProvidedVariants
public IconPack.VariantPool getProvidedVariants()
Description copied from class:IconPackGets all variants this icon pack provides for at least one icon. This method is called by theImagesutility class when deciding what icons to register to a given component. No guarantee regarding further usage is made.- Specified by:
getProvidedVariantsin classIconPack- 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:IconPackGets a single icon with the given name in the given variant and size from the classpath. Note that thesizeparameter 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:
getIconin classIconPack- Parameters:
name- The name of the icon to retrievevariant- The variant to retrievesize- 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
-
-