Package resources

Class IconProvider

  • public class IconProvider
    extends java.lang.Object
    A class that knows how to provide an icon and the URL for that icon. If getUrl() returns a non-null value, then that is the URL used to originally load the icon in this class.

    If getUrl() returns null, then getOrCreateUrl() can be used to create a value URL by writing out the image for this class's icon.

    • Constructor Summary

      Constructor Description
      IconProvider​(javax.swing.ImageIcon icon, url)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.swing.ImageIcon getIcon() getOrCreateUrl()
      Returns the value of getUrl() if it is non-null. getUrl()  
      boolean isInvalid()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IconProvider

        public IconProvider​(javax.swing.ImageIcon icon,
    • Method Detail

      • getIcon

        public javax.swing.ImageIcon getIcon()
      • isInvalid

        public boolean isInvalid()
      • getUrl

        public getUrl()
      • getOrCreateUrl

        public getOrCreateUrl()
        Returns the value of getUrl() if it is non-null. Otherwise, this class will attempt to create a temporary file containing the image of this class in order to return a URL for that temp file. If a temporary file could not be created, then the URL returned from this class will point to the default icon.
        the URL