public static enum ButtonGuiImpl.Images extends java.lang.Enum<ButtonGuiImpl.Images>
Enum Constant and Description |
---|
IMAGE_DOWN
Button down image.
|
IMAGE_INS
Button disabled image.
|
IMAGE_UP
Button up image.
|
Modifier and Type | Field and Description |
---|---|
private java.util.function.Function<ButtonGuiImpl,ButtonImageDefinition> |
getImageDefinition
Get button image definition method
|
private java.util.function.Function<ButtonGuiImpl,java.util.function.Consumer<ImageWrapper<?>>> |
setImage
Set button image method
|
private int |
type
|
Modifier and Type | Method and Description |
---|---|
private ImageWrapper |
loadImage(ButtonGuiImpl bt,
java.lang.String fullName)
Load image from a file, and install into the button.
|
private ImageWrapper |
loadImage(ButtonGuiImpl button,
java.lang.String fullName,
byte[] bytes)
Create an image from bytes, and install into the button.
|
private static ButtonGuiImpl.Images |
valueOf(int type)
Find this enum value by the type.
|
static ButtonGuiImpl.Images |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ButtonGuiImpl.Images[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ButtonGuiImpl.Images IMAGE_DOWN
public static final ButtonGuiImpl.Images IMAGE_INS
public static final ButtonGuiImpl.Images IMAGE_UP
private final java.util.function.Function<ButtonGuiImpl,ButtonImageDefinition> getImageDefinition
private final java.util.function.Function<ButtonGuiImpl,java.util.function.Consumer<ImageWrapper<?>>> setImage
private final int type
public static ButtonGuiImpl.Images[] values()
for (ButtonGuiImpl.Images c : ButtonGuiImpl.Images.values()) System.out.println(c);
public static ButtonGuiImpl.Images valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullprivate static ButtonGuiImpl.Images valueOf(int type)
type
- the type: one of ButtonConfig.IMAGE_UP
, ButtonConfig.IMAGE_DOWN
or ButtonConfig.IMAGE_DISABLED
.private final ImageWrapper loadImage(ButtonGuiImpl bt, java.lang.String fullName)
bt
- the button to read and write imagesfullName
- the image file namenull
if the image cannot be loaded from the fileprivate final ImageWrapper loadImage(ButtonGuiImpl button, java.lang.String fullName, byte[] bytes)
button
- the button to install image tofullName
- the image file name, used to deduce the image type, can be null
bytes
- the image bytesnull
if image cannot be read