增加 UserConfig.java 的注释

This commit is contained in:
许轲 2023-10-11 02:05:37 +08:00
parent 8e2d7c53de
commit c9c6152df2

View File

@ -8,7 +8,12 @@ import java.util.List;
/** /**
* 用户配置文件类 * 用户配置文件类
* *
* @author 许轲 * <p>
* 此类用于存储用户的配置信息包括语言设置文本自动换行设置和快捷键配置
* </p>
*
* @author luke
*
*/ */
public class UserConfig { public class UserConfig {
@ -17,27 +22,56 @@ public class UserConfig {
private boolean textWrap; private boolean textWrap;
private List<ShortcutKey> shortcutKey; private List<ShortcutKey> shortcutKey;
/**
* 获取语言设置
*
* @return 语言设置
*/
public String getLanguage() { public String getLanguage() {
return language; return language;
} }
/**
* 设置语言设置
*
* @param language 语言设置
*/
public void setLanguage(String language) { public void setLanguage(String language) {
this.language = language; this.language = language;
} }
/**
* 获取快捷键配置列表
*
* @return 快捷键配置列表
*/
public List<ShortcutKey> getShortcutKey() { public List<ShortcutKey> getShortcutKey() {
return shortcutKey; return shortcutKey;
} }
/**
* 设置快捷键配置列表
*
* @param shortcutKey 快捷键配置列表
*/
public void setShortcutKey(List<ShortcutKey> shortcutKey) { public void setShortcutKey(List<ShortcutKey> shortcutKey) {
this.shortcutKey = shortcutKey; this.shortcutKey = shortcutKey;
} }
/**
* 获取文本自动换行设置
*
* @return 是否启用文本自动换行
*/
public boolean isTextWrap() { public boolean isTextWrap() {
return textWrap; return textWrap;
} }
/**
* 设置文本自动换行设置
*
* @param textWrap 是否启用文本自动换行
*/
public void setTextWrap(boolean textWrap) { public void setTextWrap(boolean textWrap) {
this.textWrap = textWrap; this.textWrap = textWrap;
} }