Class IconFactory

java.lang.Object
VASSAL.tools.icon.IconFactory

public final class IconFactory extends Object
Manage and Provide Icons in standard sizes.
  • Constructor Details

    • IconFactory

      public IconFactory()
      Create a new IconFactory.
  • Method Details

    • getIcon

      public static Icon getIcon(String iconFamilyName, int size)
      Return an Icon of the specified size. Standard sizes are defined in IconFamily
      Parameters:
      iconFamilyName - Name of Icon family
      size - Size (See IconFamily)
      Returns:
      Sized Icon
    • getImage

      public static BufferedImage getImage(String iconFamilyName, int size)
      Return an Icon of the specified size as an Image. Standard sizes are defined in IconFamily
      Parameters:
      iconFamilyName - Name of Icon family
      size - Size (See IconFamily)
      Returns:
      Sized Image
    • getIconFamilyNames

      public static List<String> getIconFamilyNames()
      Returns:
      Return a sorted list of all Icon Family names.
    • addIconFamily

      public static void addIconFamily(IconFamily family)
      Add a new IconFamily
      Parameters:
      family - Icon Family Name
    • removeIconFamily

      public static void removeIconFamily(IconFamily family)
      Remove an IconFamily
      Parameters:
      family - Icon Family Name
    • renameIconFamily

      public static void renameIconFamily(String oldName, IconFamily family)
      Rename an IconFamily
      Parameters:
      oldName - Old Icon Family Name
      family - New Icon Family Name
    • getIconFamily

      public static IconFamily getIconFamily(String name)
      Parameters:
      name - name of family
      Returns:
      Return an Icon Family