增加 AppConstants.java 的注释

This commit is contained in:
许轲 2023-10-11 02:08:20 +08:00
parent cf453a012c
commit 8cd73016c5

View File

@ -7,7 +7,15 @@ import java.util.regex.Pattern;
/** /**
* 应用常量类用于存放应用程序中的常量值 * 应用常量类用于存放应用程序中的常量值
* *
* @author 许轲 * <p>
* 该类包含了应用程序的一些常用常量如版本号作者软件名称初始宽度和高度Logo地址等
* </p>
*
* <p>
* 还包括了与标签页相关的正则表达式模式以及默认的属性和程序文件目录等常量
* </p>
*
* @author luke
*/ */
public class AppConstants { public class AppConstants {
/** /**
@ -37,6 +45,10 @@ public class AppConstants {
/** /**
* 默认标签页的正则 * 默认标签页的正则
*
* <p>
* 用于匹配默认标签页名称的正则表达式格式为"New File"后跟数字
* </p>
*/ */
public static final Pattern TABNAME_PATTERN = Pattern.compile("^" + Pattern.quote(UiResourceBundle.getContent(TextConstants.NEW_FILE)) + "\\d+$"); public static final Pattern TABNAME_PATTERN = Pattern.compile("^" + Pattern.quote(UiResourceBundle.getContent(TextConstants.NEW_FILE)) + "\\d+$");
@ -49,11 +61,9 @@ public class AppConstants {
*/ */
public static final String PROGRAM_FILE_DIRECTORY = ".jnotepad"; public static final String PROGRAM_FILE_DIRECTORY = ".jnotepad";
/** /**
* 私有构造函数防止该类被实例化 * 私有构造函数防止该类被实例化
*/ */
private AppConstants() { private AppConstants() {
} }
} }