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 void
addIconFamily(IconFamily family)
Add a new IconFamilyprotected void
findLocalSizedIcons(int size)
Record all icons of the specified size found in the local file system NB.static Icon
getIcon(String iconFamilyName, int size)
Return an Icon of the specified size.static IconFamily
getIconFamily(String name)
Return an Icon Familystatic List<String>
getIconFamilyNames()
Return a sorted list of all Icon Family names.static BufferedImage
getImage(String iconFamilyName, int size)
Return an Icon of the specified size as an Image.static void
removeIconFamily(IconFamily family)
Remove an IconFamilystatic void
renameIconFamily(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
Return a sorted list of all Icon Family names.- Returns:
-
addIconFamily
Add a new IconFamily- Parameters:
family
- Icon Family Name
-
removeIconFamily
Remove an IconFamily- Parameters:
name
- Icon Family Name
-
renameIconFamily
Rename an IconFamily- Parameters:
oldName
- Old Icon Family NamenewName
- New Icon Family Name
-
getIconFamily
Return an Icon Family- Parameters:
name
-- Returns:
-
findLocalSizedIcons
Record all icons of the specified size found in the local file system NB. Vassal is not running from a bundled Jar file- Parameters:
size
-- Throws:
IOException
-