Package VASSAL.tools.icon
Class IconFactory
java.lang.Object
VASSAL.tools.icon.IconFactory
public final class IconFactory extends Object
Manage and Provide Icons in standard sizes.
-
Constructor Summary
Constructors Constructor Description IconFactory()Create a new IconFactory. -
Method Summary
Modifier and Type Method Description static voidaddIconFamily(IconFamily family)Add a new IconFamilystatic IcongetIcon(String iconFamilyName, int size)Return an Icon of the specified size.static IconFamilygetIconFamily(String name)static List<String>getIconFamilyNames()static BufferedImagegetImage(String iconFamilyName, int size)Return an Icon of the specified size as an Image.static voidremoveIconFamily(IconFamily family)Remove an IconFamilystatic voidrenameIconFamily(String oldName, IconFamily family)Rename an IconFamily
-
Constructor Details
-
IconFactory
public IconFactory()Create a new IconFactory.
-
-
Method Details
-
getIcon
Return an Icon of the specified size. Standard sizes are defined in IconFamily- Parameters:
iconFamilyName- Name of Icon familysize- Size (See IconFamily)- Returns:
- Sized Icon
-
getImage
Return an Icon of the specified size as an Image. Standard sizes are defined in IconFamily- Parameters:
iconFamilyName- Name of Icon familysize- Size (See IconFamily)- Returns:
- Sized Image
-
getIconFamilyNames
- Returns:
- Return a sorted list of all Icon Family names.
-
addIconFamily
Add a new IconFamily- Parameters:
family- Icon Family Name
-
removeIconFamily
Remove an IconFamily- Parameters:
family- Icon Family Name
-
renameIconFamily
Rename an IconFamily- Parameters:
oldName- Old Icon Family Namefamily- New Icon Family Name
-
getIconFamily
- Parameters:
name- name of family- Returns:
- Return an Icon Family
-