Class PackageIcon

    • Constructor Detail

      • PackageIcon

        public PackageIcon​(ResourceReference reference)
        Creates a new icon instance.
        Parameters:
        reference - resource reference that can be used to get the icon
      • PackageIcon

        public PackageIcon​(Class<?> scope,
                           String name)
        Creates a new icon instance.
        Parameters:
        scope - Class relative to which the icon is placed in classpath
        name - Icon name relative to the scope class
    • Method Detail

      • getHeight

        public int getHeight()
        Returns the icon height.
        Specified by:
        getHeight in interface Icon
        Returns:
        icon height (in pixels) or -1 if the height can not be determined
      • getWidth

        public int getWidth()
        Returns the icon width.
        Specified by:
        getWidth in interface Icon
        Returns:
        icon width (in pixels) or -1 if the width can not be determined
      • getUrl

        public CharSequence getUrl()
        Returns the URL of icon image.
        Specified by:
        getUrl in interface Icon
        Returns:
        icon URL