Class ImageParser
java.lang.Object
com.realtime.crossfire.jxclient.skin.io.ImageParser
Creates
BufferedImage instances from string representations. Each
image is loaded only once.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ImageParser
Creates a new instance.- Parameters:
skinSource- the skin source for loading resources
-
-
Method Details
-
clear
public void clear()Forgets all defined images. -
getImage
@Nullable public @Nullable Image getImage(@Nullable @Nullable Color color, @NotNull @NotNull String name) throws IOException Optionally loads an image by base file name.- Parameters:
color- if non-null, returnnullname- the base file name- Returns:
- the image, or
nullifcolor!=null - Throws:
IOException- if the image cannot be loaded
-
getImage
Loads an image by base file name.- Parameters:
name- the base file name- Returns:
- the image
- Throws:
IOException- if the image cannot be loaded
-