Class IconElementFactory

java.lang.Object
noaa.coastwatch.render.IconElementFactory

public class IconElementFactory extends Object
The IconElementFactory class creates IconElement objects from either a user-specified file or from built in resource images.
Since:
3.1.9
Author:
Peter Hollemans
  • Constructor Details

    • IconElementFactory

      protected IconElementFactory()
  • Method Details

    • getInstance

      public static IconElementFactory getInstance()
    • getResourceNames

      public List<String> getResourceNames()
      Gets the list of names for the built-in icon resource images.
      Returns:
      the list of names for use in the create(java.lang.String) method.
      Since:
      3.7.1
    • getDefaultIcon

      public String getDefaultIcon()
      Gets the default icon name to be used in plot legends.
      Returns:
      the default icon name.
      Since:
      3.7.1
      See Also:
    • create

      public IconElement create(String icon) throws IOException
      Creates a new IconElement from the specified icon name. If the icon name is not one of the predefined icon resource names, it is assumed that the icon is a file name that should be read.
      Parameters:
      icon - the icon resource name or file name.
      Returns:
      the new image icon.
      Throws:
      IOException - if the icon could not be created from the icon resources or from a file.
      Since:
      3.7.1
      See Also: