重新格式化代码

This commit is contained in:
gewuyou 2023-09-17 21:22:57 +08:00
parent 9303b023f2
commit 9f4c734b40
9 changed files with 150 additions and 154 deletions

View File

@ -63,7 +63,6 @@ JNotepad使用Java语言编写并基于JavaFX框架开发具有良好的
[docs-url]: https://gitee.com/jcnc-org/docs [docs-url]: https://gitee.com/jcnc-org/docs
- [下载][gitee-download] - [下载][gitee-download]
2. Linux/MacOS 平台,查看入门指南 2. Linux/MacOS 平台,查看入门指南
@ -103,13 +102,12 @@ JNotepad使用Java语言编写并基于JavaFX框架开发具有良好的
- `插件 > 增加插件`(管理插件系统,待完善)。 - `插件 > 增加插件`(管理插件系统,待完善)。
## 依赖项 ## 依赖项
POM文件中的全部依赖项 POM文件中的全部依赖项
| 组ID | 工件ID | 版本 | 功能描述 | | 组ID | 工件ID | 版本 | 功能描述 |
|--------------------------------|------------------------------|--------|------------------------------------------------| |----------------------------|----------------------------|--------|--------------------------------------------------------------|
| org.kordamp.ikonli | ikonli-javafx | 12.3.1 | 提供JavaFX应用程序中的图标集成。 | | org.kordamp.ikonli | ikonli-javafx | 12.3.1 | 提供JavaFX应用程序中的图标集成。 |
| org.kordamp.ikonli | ikonli-antdesignicons-pack | 12.3.1 | 包含Ant Design图标集的Ikonli图标包。 | | org.kordamp.ikonli | ikonli-antdesignicons-pack | 12.3.1 | 包含Ant Design图标集的Ikonli图标包。 |
| io.github.mkpaz | atlantafx-base | 2.0.1 | 提供Atlantafx库的基本功能。 | | io.github.mkpaz | atlantafx-base | 2.0.1 | 提供Atlantafx库的基本功能。 |
@ -121,7 +119,6 @@ POM文件中的全部依赖项
| ch.qos.logback | logback-classic | 1.4.11 | Logback的经典模块提供日志记录功能。 | | ch.qos.logback | logback-classic | 1.4.11 | Logback的经典模块提供日志记录功能。 |
| com.ibm.icu | icu4j | 73.2 | ICUInternational Components for Unicode用于处理Unicode字符和文本。 | | com.ibm.icu | icu4j | 73.2 | ICUInternational Components for Unicode用于处理Unicode字符和文本。 |
## 软件运行截图 ## 软件运行截图
- Windows 平台 - Windows 平台

View File

@ -40,4 +40,5 @@ jar uf libs/icu4j-73.2.jar -C libs/tmpOut/com.ibm.icu module-info.class
``` ```
## Reference ## Reference
1. [java_jlink_automatic_module_cannot_be_used_with_jlink](https://tacosteemers.com/articles/java_jlink_automatic_module_cannot_be_used_with_jlink.html) 1. [java_jlink_automatic_module_cannot_be_used_with_jlink](https://tacosteemers.com/articles/java_jlink_automatic_module_cannot_be_used_with_jlink.html)

View File

@ -28,7 +28,6 @@ import static org.jcnc.jnotepad.plugin.PluginLoader.readPlugin;
*/ */
public class PluginManager { public class PluginManager {
private static final PluginManager INSTANCE = new PluginManager(); private static final PluginManager INSTANCE = new PluginManager();
Logger logger = LogUtil.getLogger(this.getClass());
/** /**
* 插件类别 * 插件类别
*/ */
@ -37,6 +36,7 @@ public class PluginManager {
* 插件信息 * 插件信息
*/ */
private final List<PluginInfo> pluginInfos = new ArrayList<>(); private final List<PluginInfo> pluginInfos = new ArrayList<>();
Logger logger = LogUtil.getLogger(this.getClass());
private PluginManager() { private PluginManager() {

View File

@ -27,6 +27,10 @@ public class PluginManagerInterface {
private static final PluginManagerInterface INSTANCE = new PluginManagerInterface(); private static final PluginManagerInterface INSTANCE = new PluginManagerInterface();
Logger logger = LogUtil.getLogger(this.getClass()); Logger logger = LogUtil.getLogger(this.getClass());
public static PluginManagerInterface getInstance() {
return INSTANCE;
}
/** /**
* 启动插件演示界面 * 启动插件演示界面
* *
@ -54,10 +58,6 @@ public class PluginManagerInterface {
primaryStage.show(); primaryStage.show();
} }
public static PluginManagerInterface getInstance() {
return INSTANCE;
}
/** /**
* 显示已加载插件的信息 * 显示已加载插件的信息
* *

View File

@ -86,112 +86,11 @@ public class AppDialogBuilder {
} }
} }
/**
* 设置应用图标
*/
public AppDialogBuilder setAppIcon(Image appIcon) {
this.appIcon = appIcon;
return this;
}
public AppDialog build() { public AppDialog build() {
appDialog = new AppDialog(this); appDialog = new AppDialog(this);
return appDialog; return appDialog;
} }
/**
* 设置对话框标题
*/
public AppDialogBuilder setTitle(String title) {
this.title = title;
return this;
}
/**
* 设置对话框头部文本
*/
public AppDialogBuilder setHeaderText(String headerText) {
this.headerText = headerText;
return this;
}
/**
* 设置自定义文本
*/
public AppDialogBuilder setCustomText(String customText) {
this.customText = customText;
return this;
}
/**
* 设置对话框宽度
*/
public AppDialogBuilder setWidth(double width) {
this.width = width;
return this;
}
/**
* 设置对话框高度
*/
public AppDialogBuilder setHeight(double height) {
this.height = height;
return this;
}
/**
* 设置对话框左侧图标
*/
public AppDialogBuilder setIcon(FontIcon icon) {
this.icon = icon;
return this;
}
/**
* 设置左按钮操作
*/
public AppDialogBuilder setLeftBtnAction(DialogButtonAction leftBtnAction) {
if (leftBtnAction != null) {
this.leftBtnAction = leftBtnAction;
}
return this;
}
/**
* 设置右按钮操作
*/
public AppDialogBuilder setRightBtnAction(DialogButtonAction rightBtnAction) {
if (rightBtnAction != null) {
this.rightBtnAction = rightBtnAction;
}
return this;
}
/**
* 设置左按钮文本
*/
public AppDialogBuilder setLeftBtnText(String leftBtnText) {
this.leftBtnText = leftBtnText;
return this;
}
/**
* 设置右按钮文本
*/
public AppDialogBuilder setRightBtnText(String rightBtnText) {
this.rightBtnText = rightBtnText;
return this;
}
/**
* 设置图标边距
*/
public AppDialogBuilder setIconCoxPaddingInsets(Insets iconCoxPaddingInsets) {
this.iconCoxPaddingInsets = iconCoxPaddingInsets;
return this;
}
/** /**
* 设置水平盒子边距 * 设置水平盒子边距
*/ */
@ -200,14 +99,6 @@ public class AppDialogBuilder {
return this; return this;
} }
/**
* 设置是否可调整大小
*/
public AppDialogBuilder setResizable(boolean resizable) {
isResizable = resizable;
return this;
}
/** /**
* 设置水平盒子间距 * 设置水平盒子间距
*/ */
@ -216,14 +107,6 @@ public class AppDialogBuilder {
return this; return this;
} }
/**
* 设置垂直盒子位置
*/
public AppDialogBuilder setVboxPos(Pos vboxPos) {
this.vboxPos = vboxPos;
return this;
}
/** /**
* 设置水平盒子位置 * 设置水平盒子位置
*/ */
@ -232,62 +115,154 @@ public class AppDialogBuilder {
return this; return this;
} }
/**
* 设置模态性
*/
public AppDialogBuilder setModality(Modality modality) {
this.modality = modality;
return this;
}
public Image getAppIcon() { public Image getAppIcon() {
return appIcon; return appIcon;
} }
/**
* 设置应用图标
*/
public AppDialogBuilder setAppIcon(Image appIcon) {
this.appIcon = appIcon;
return this;
}
public String getTitle() { public String getTitle() {
return title; return title;
} }
/**
* 设置对话框标题
*/
public AppDialogBuilder setTitle(String title) {
this.title = title;
return this;
}
public String getHeaderText() { public String getHeaderText() {
return headerText; return headerText;
} }
/**
* 设置对话框头部文本
*/
public AppDialogBuilder setHeaderText(String headerText) {
this.headerText = headerText;
return this;
}
public String getCustomText() { public String getCustomText() {
return customText; return customText;
} }
/**
* 设置自定义文本
*/
public AppDialogBuilder setCustomText(String customText) {
this.customText = customText;
return this;
}
public double getWidth() { public double getWidth() {
return width; return width;
} }
/**
* 设置对话框宽度
*/
public AppDialogBuilder setWidth(double width) {
this.width = width;
return this;
}
public double getHeight() { public double getHeight() {
return height; return height;
} }
/**
* 设置对话框高度
*/
public AppDialogBuilder setHeight(double height) {
this.height = height;
return this;
}
public FontIcon getIcon() { public FontIcon getIcon() {
return icon; return icon;
} }
/**
* 设置对话框左侧图标
*/
public AppDialogBuilder setIcon(FontIcon icon) {
this.icon = icon;
return this;
}
public DialogButtonAction getLeftBtnAction() { public DialogButtonAction getLeftBtnAction() {
return leftBtnAction; return leftBtnAction;
} }
/**
* 设置左按钮操作
*/
public AppDialogBuilder setLeftBtnAction(DialogButtonAction leftBtnAction) {
if (leftBtnAction != null) {
this.leftBtnAction = leftBtnAction;
}
return this;
}
public DialogButtonAction getRightBtnAction() { public DialogButtonAction getRightBtnAction() {
return rightBtnAction; return rightBtnAction;
} }
/**
* 设置右按钮操作
*/
public AppDialogBuilder setRightBtnAction(DialogButtonAction rightBtnAction) {
if (rightBtnAction != null) {
this.rightBtnAction = rightBtnAction;
}
return this;
}
public String getLeftBtnText() { public String getLeftBtnText() {
return leftBtnText; return leftBtnText;
} }
/**
* 设置左按钮文本
*/
public AppDialogBuilder setLeftBtnText(String leftBtnText) {
this.leftBtnText = leftBtnText;
return this;
}
public String getRightBtnText() { public String getRightBtnText() {
return rightBtnText; return rightBtnText;
} }
/**
* 设置右按钮文本
*/
public AppDialogBuilder setRightBtnText(String rightBtnText) {
this.rightBtnText = rightBtnText;
return this;
}
public Insets getIconCoxPaddingInsets() { public Insets getIconCoxPaddingInsets() {
return iconCoxPaddingInsets; return iconCoxPaddingInsets;
} }
/**
* 设置图标边距
*/
public AppDialogBuilder setIconCoxPaddingInsets(Insets iconCoxPaddingInsets) {
this.iconCoxPaddingInsets = iconCoxPaddingInsets;
return this;
}
public Insets gethBoxPaddingInsets() { public Insets gethBoxPaddingInsets() {
return hBoxPaddingInsets; return hBoxPaddingInsets;
} }
@ -296,6 +271,14 @@ public class AppDialogBuilder {
return isResizable; return isResizable;
} }
/**
* 设置是否可调整大小
*/
public AppDialogBuilder setResizable(boolean resizable) {
isResizable = resizable;
return this;
}
public double getHBoxSpacing() { public double getHBoxSpacing() {
return hBoxSpacing; return hBoxSpacing;
} }
@ -304,6 +287,14 @@ public class AppDialogBuilder {
return vboxPos; return vboxPos;
} }
/**
* 设置垂直盒子位置
*/
public AppDialogBuilder setVboxPos(Pos vboxPos) {
this.vboxPos = vboxPos;
return this;
}
public Pos getHboxPos() { public Pos getHboxPos() {
return hboxPos; return hboxPos;
} }
@ -311,4 +302,12 @@ public class AppDialogBuilder {
public Modality getModality() { public Modality getModality() {
return modality; return modality;
} }
/**
* 设置模态性
*/
public AppDialogBuilder setModality(Modality modality) {
this.modality = modality;
return this;
}
} }

View File

@ -44,9 +44,6 @@ public class UiUtil {
private static final FontIcon SUCCESS_ICON = FontIcon.of(CHECK_CIRCLE); private static final FontIcon SUCCESS_ICON = FontIcon.of(CHECK_CIRCLE);
private UiUtil() {
}
static { static {
// 暂时设置颜色 // 暂时设置颜色
ERROR_ICON.getStyleClass().addAll(Styles.DANGER); ERROR_ICON.getStyleClass().addAll(Styles.DANGER);
@ -56,6 +53,9 @@ public class UiUtil {
SUCCESS_ICON.getStyleClass().addAll(Styles.SUCCESS); SUCCESS_ICON.getStyleClass().addAll(Styles.SUCCESS);
} }
private UiUtil() {
}
/** /**
* 获取应用程序图标 * 获取应用程序图标
* *

View File

@ -5,7 +5,6 @@
} }
/* tab修改标签样式 */ /* tab修改标签样式 */
.tab-title-editable { .tab-title-editable {
-fx-fx-border-width: 0; -fx-fx-border-width: 0;