Package org.mcpjava.server
Interface Icon.Builder
- Enclosing interface:
Icon
public static interface Icon.Builder
Builder for creating icons.
-
Method Summary
Modifier and TypeMethodDescriptionaddSize(int width, int height) Adds a size that this icon can be displayed at.build()Builds the iconSets that the icon may be used at any size.setMimeType(String mimeType) Sets the MIME type of the iconsetTheme(Icon.Theme theme) Sets the theme that this icon is designed for.
-
Method Details
-
setMimeType
Sets the MIME type of the icon- Parameters:
mimeType- the MIME type- Returns:
- this builder
-
addSize
Adds a size that this icon can be displayed at.May not be used with
setAnySize().- Parameters:
width- the widthheight- the height- Returns:
- this builder
-
setAnySize
Icon.Builder setAnySize()Sets that the icon may be used at any size. Usually for scalable icons.May not be used with
addSize(int, int).- Returns:
- this builder
-
setTheme
Sets the theme that this icon is designed for.- Parameters:
theme- the theme- Returns:
- this builder
-
build
Icon build()Builds the icon- Returns:
- the new icon
-