Serializable, Comparable<TextLayout.HyphenationStrategy>public static enum TextLayout.HyphenationStrategy extends Enum<TextLayout.HyphenationStrategy>
| 枚举常量 | 说明 |
|---|---|
COMPLETE |
Indicates the complete hyphenation strategy, in which automatic hyphenation may occur at any valid position.
|
NONE |
Indicates no automatic hyphenation.
|
STANDARD |
Indicates the standard hyphenation strategy, in which automatic hyphenation occurs only at fixed positions
of long words, but not at short words.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static TextLayout.HyphenationStrategy |
getByInt(int enumInt) |
Obtains the
HyphenationStrategy object based on the specified enumInt. |
int |
getValue() |
Obtains the value of
HyphenationStrategy in this TextLayout. |
static TextLayout.HyphenationStrategy |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static TextLayout.HyphenationStrategy[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (TextLayout.HyphenationStrategy c : TextLayout.HyphenationStrategy.values()) System.out.println(c); |
public static final TextLayout.HyphenationStrategy NONE
public static final TextLayout.HyphenationStrategy STANDARD
public static final TextLayout.HyphenationStrategy COMPLETE
public static TextLayout.HyphenationStrategy[] values()
for (TextLayout.HyphenationStrategy c : TextLayout.HyphenationStrategy.values()) System.out.println(c);
public static TextLayout.HyphenationStrategy valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getValue()
HyphenationStrategy in this TextLayout.HyphenationStrategy.public static TextLayout.HyphenationStrategy getByInt(int enumInt)
HyphenationStrategy object based on the specified enumInt.enumInt - Indicates the enumeration value.HyphenationStrategy object of the matched enumInt value.