public enum FontStyle extends Enum<FontStyle>
Description: 字体风格
定义此类的目的: 1. 设置字体风格和字体大小,最初都是使用int类型参数,很容混淆出错,增加个枚举类型以示区别 2. 枚举类型让配置参数配置更便捷。public static final FontStyle PLAIN
public static final FontStyle BOLD
public static final FontStyle ITALIC
public static FontStyle[] values()
for (FontStyle c : FontStyle.values()) System.out.println(c);
public static FontStyle valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getMapping()
Copyright © 2022. All rights reserved.