Serializable, Comparable<Image.ScaleMode>public static enum Image.ScaleMode extends Enum<Image.ScaleMode>
This enumeration scales the edges of an image to be the same as those of a component.
| 枚举常量 | 说明 |
|---|---|
CENTER |
Displays the image in the center of a component, without any scale.
|
CLIP_CENTER |
Scales the image to be of the same or a larger size than that of an
Image item according to a
ratio, and displays the image content in the center. |
INSIDE |
Scales the image to be of the same or a smaller size than that of an
Image item according to a
ratio, and displays the image content in the center. |
STRETCH |
Scales the image to be of the same size as that of an
Image item, without any ratio. |
ZOOM_CENTER |
Scales the image to be of the same width as that of an
Image item according to a ratio, and
displays the image content in the center. |
ZOOM_END |
Displays the image in the lower right corner of an
Image item. |
ZOOM_START |
Displays the image in the upper left corner of an
Image item. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static Image.ScaleMode |
getByInt(int enumInt) |
Obtains the enumeration object based on the value.
|
protected int |
getValue() |
Get the value of this scaling type.
|
static Image.ScaleMode |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static Image.ScaleMode[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (Image.ScaleMode c : Image.ScaleMode.values()) System.out.println(c); |
public static final Image.ScaleMode ZOOM_CENTER
Image item according to a ratio, and
displays the image content in the center.public static final Image.ScaleMode ZOOM_START
Image item.public static final Image.ScaleMode ZOOM_END
Image item.public static final Image.ScaleMode STRETCH
Image item, without any ratio.public static final Image.ScaleMode CENTER
public static final Image.ScaleMode INSIDE
Image item according to a
ratio, and displays the image content in the center.public static final Image.ScaleMode CLIP_CENTER
Image item according to a
ratio, and displays the image content in the center.public static Image.ScaleMode[] values()
for (Image.ScaleMode c : Image.ScaleMode.values()) System.out.println(c);
public static Image.ScaleMode valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值protected int getValue()
public static Image.ScaleMode getByInt(int enumInt)
enumInt - Indicates the enumeration value.