!163 refactor: #I8719S 重构项目结构
Merge pull request !163 from Luke/refactor-I8719S
This commit is contained in:
commit
2486b9bbb5
@ -24,30 +24,30 @@ module org.jcnc.jnotepad {
|
|||||||
exports org.jcnc.jnotepad.model.enums;
|
exports org.jcnc.jnotepad.model.enums;
|
||||||
exports org.jcnc.jnotepad.app.config;
|
exports org.jcnc.jnotepad.app.config;
|
||||||
exports org.jcnc.jnotepad.app.i18n;
|
exports org.jcnc.jnotepad.app.i18n;
|
||||||
exports org.jcnc.jnotepad.common.constants;
|
exports org.jcnc.jnotepad.app.common.constants;
|
||||||
exports org.jcnc.jnotepad.controller.config;
|
exports org.jcnc.jnotepad.controller.config;
|
||||||
exports org.jcnc.jnotepad.controller.manager;
|
exports org.jcnc.jnotepad.controller.manager;
|
||||||
exports org.jcnc.jnotepad.controller.i18n;
|
exports org.jcnc.jnotepad.controller.i18n;
|
||||||
exports org.jcnc.jnotepad.controller.event.handler.toolbar;
|
exports org.jcnc.jnotepad.controller.event.handler.toolbar;
|
||||||
exports org.jcnc.jnotepad.controller.event.handler.menuitem;
|
exports org.jcnc.jnotepad.controller.event.handler.menuitem;
|
||||||
exports org.jcnc.jnotepad.component.module.interfaces;
|
exports org.jcnc.jnotepad.ui.component.module.interfaces;
|
||||||
opens org.jcnc.jnotepad.app.config;
|
opens org.jcnc.jnotepad.app.config;
|
||||||
exports org.jcnc.jnotepad.plugin.interfaces;
|
exports org.jcnc.jnotepad.controller.plugin.interfaces;
|
||||||
exports org.jcnc.jnotepad.views.root.bottom.function;
|
exports org.jcnc.jnotepad.ui.views.root.bottom.function;
|
||||||
|
|
||||||
exports org.jcnc.jnotepad.component.module;
|
exports org.jcnc.jnotepad.ui.component.module;
|
||||||
exports org.jcnc.jnotepad.model.entity;
|
exports org.jcnc.jnotepad.model.entity;
|
||||||
exports org.jcnc.jnotepad.views.root.bottom;
|
exports org.jcnc.jnotepad.ui.views.root.bottom;
|
||||||
exports org.jcnc.jnotepad.views.root.bottom.status;
|
exports org.jcnc.jnotepad.ui.views.root.bottom.status;
|
||||||
exports org.jcnc.jnotepad.api.core.views.sidebar.bottom;
|
exports org.jcnc.jnotepad.api.core.views.sidebar.bottom;
|
||||||
exports org.jcnc.jnotepad.api.core.controller.config;
|
exports org.jcnc.jnotepad.api.core.controller.config;
|
||||||
exports org.jcnc.jnotepad.component.module.base;
|
exports org.jcnc.jnotepad.ui.component.module.base;
|
||||||
exports org.jcnc.jnotepad.component.stage.setting;
|
exports org.jcnc.jnotepad.ui.component.stage.setting;
|
||||||
exports org.jcnc.jnotepad.component.module.vbox;
|
exports org.jcnc.jnotepad.ui.component.module.vbox;
|
||||||
exports org.jcnc.jnotepad.component.module.hbox;
|
exports org.jcnc.jnotepad.ui.component.module.hbox;
|
||||||
exports org.jcnc.jnotepad.component.stage.topmenu.help;
|
exports org.jcnc.jnotepad.ui.component.stage.topmenu.help;
|
||||||
exports org.jcnc.jnotepad.component.stage.topmenu.plugin;
|
exports org.jcnc.jnotepad.ui.component.stage.topmenu.plugin;
|
||||||
exports org.jcnc.jnotepad.component.module.vbox.components;
|
exports org.jcnc.jnotepad.ui.component.module.vbox.components;
|
||||||
exports org.jcnc.jnotepad.views.root.center.main.center.tab;
|
exports org.jcnc.jnotepad.ui.views.root.center.main.center.tab;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3,7 +3,7 @@ package org.jcnc.jnotepad;
|
|||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,138 @@
|
|||||||
|
package org.jcnc.jnotepad.api.core.component.stage;
|
||||||
|
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
|
import javafx.event.ActionEvent;
|
||||||
|
import javafx.event.EventHandler;
|
||||||
|
import javafx.scene.control.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽象菜单建造者类
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 该抽象类用于构建菜单,包括菜单项、单选菜单项、复选菜单项、分割线等。
|
||||||
|
* 子类应继承此类以实现具体的菜单构建逻辑。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param <B> 建造者类型
|
||||||
|
* @param <T> 构建结果类型
|
||||||
|
*
|
||||||
|
* @author gewuyou
|
||||||
|
*/
|
||||||
|
public abstract class AbstractMenuBuilder<B, T> {
|
||||||
|
/**
|
||||||
|
* 获取子类的建造者实例
|
||||||
|
*
|
||||||
|
* @return 建造者实例
|
||||||
|
*/
|
||||||
|
protected abstract B getBuilder();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取菜单的菜单项列表
|
||||||
|
*
|
||||||
|
* @return 菜单项列表
|
||||||
|
*/
|
||||||
|
protected abstract ObservableList<MenuItem> getItems();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加菜单项
|
||||||
|
*
|
||||||
|
* @param label 菜单项名称
|
||||||
|
* @param eventHandler 事件处理器
|
||||||
|
* @return 当前建造者实例
|
||||||
|
*/
|
||||||
|
public B addMenuItem(String label, EventHandler<ActionEvent> eventHandler) {
|
||||||
|
MenuItem menuItem = new MenuItem(label);
|
||||||
|
menuItem.setOnAction(eventHandler);
|
||||||
|
getItems().add(menuItem);
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加菜单项
|
||||||
|
*
|
||||||
|
* @param label 菜单项名称
|
||||||
|
* @param eventHandler 事件处理器
|
||||||
|
* @param disable 是否禁用
|
||||||
|
* @return 当前建造者实例
|
||||||
|
*/
|
||||||
|
public B addMenuItem(String label, EventHandler<ActionEvent> eventHandler, boolean disable) {
|
||||||
|
if (!disable) {
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
MenuItem menuItem = new MenuItem(label);
|
||||||
|
menuItem.setOnAction(eventHandler);
|
||||||
|
getItems().add(menuItem);
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加单选菜单项
|
||||||
|
*
|
||||||
|
* @param label 菜单项名称
|
||||||
|
* @param eventHandler 事件处理器
|
||||||
|
* @return 当前建造者实例
|
||||||
|
*/
|
||||||
|
public B addRadioMenuItem(String label, EventHandler<ActionEvent> eventHandler) {
|
||||||
|
RadioMenuItem menuItem = new RadioMenuItem(label);
|
||||||
|
menuItem.setOnAction(eventHandler);
|
||||||
|
getItems().add(menuItem);
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加复选菜单项
|
||||||
|
*
|
||||||
|
* @param label 菜单项名称
|
||||||
|
* @param eventHandler 事件处理器
|
||||||
|
* @return 当前建造者实例
|
||||||
|
*/
|
||||||
|
public B addCheckMenuItem(String label, EventHandler<ActionEvent> eventHandler) {
|
||||||
|
CheckMenuItem menuItem = new CheckMenuItem(label);
|
||||||
|
menuItem.setOnAction(eventHandler);
|
||||||
|
getItems().add(menuItem);
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加菜单
|
||||||
|
*
|
||||||
|
* @param menu 菜单
|
||||||
|
* @return 当前建造者实例
|
||||||
|
*/
|
||||||
|
public B addMenu(Menu menu) {
|
||||||
|
getItems().add(menu);
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加菜单
|
||||||
|
*
|
||||||
|
* @param menu 菜单
|
||||||
|
* @param disable 是否禁用
|
||||||
|
* @return 当前建造者实例
|
||||||
|
*/
|
||||||
|
public B addMenu(Menu menu, boolean disable) {
|
||||||
|
if (!disable) {
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
getItems().add(menu);
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加分割线
|
||||||
|
*
|
||||||
|
* @return 当前建造者实例
|
||||||
|
*/
|
||||||
|
public B addSeparatorMenuItem() {
|
||||||
|
getItems().add(new SeparatorMenuItem());
|
||||||
|
return getBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建菜单
|
||||||
|
*
|
||||||
|
* @return 构建的菜单
|
||||||
|
*/
|
||||||
|
public abstract T build();
|
||||||
|
}
|
||||||
@ -7,7 +7,10 @@ import javafx.stage.Modality;
|
|||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抽象窗格舞台
|
* 抽象窗格舞台。
|
||||||
|
* <p>
|
||||||
|
* 该类是一个抽象的窗格舞台,用于创建自定义的JavaFX窗口。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
@ -15,40 +18,46 @@ public abstract class AbstractPaneStage extends BorderPane {
|
|||||||
private final Stage stage = new Stage();
|
private final Stage stage = new Stage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取舞台图标
|
* 获取舞台图标。
|
||||||
*
|
*
|
||||||
* @return 舞台图标
|
* @return 舞台图标
|
||||||
*/
|
*/
|
||||||
protected abstract Image getStageIcon();
|
protected abstract Image getStageIcon();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取舞台标题
|
* 获取舞台标题。
|
||||||
*
|
*
|
||||||
* @return 舞台标题
|
* @return 舞台标题
|
||||||
*/
|
*/
|
||||||
protected abstract String getStageTitle();
|
protected abstract String getStageTitle();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取自定义舞台
|
* 获取自定义舞台场景。
|
||||||
*
|
*
|
||||||
* @return 舞台
|
* @return 舞台场景
|
||||||
*/
|
*/
|
||||||
protected abstract Scene getCustomizationScene();
|
protected abstract Scene getCustomizationScene();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化方法
|
* 初始化方法。
|
||||||
|
* <p>
|
||||||
|
* 在此方法中,您可以进行与窗口相关的初始化操作。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
protected abstract void initialize();
|
protected abstract void initialize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义启动方法
|
* 自定义启动方法。
|
||||||
*
|
*
|
||||||
* @param stage 自定义舞台
|
* @param stage 自定义舞台
|
||||||
*/
|
*/
|
||||||
public abstract void run(Stage stage);
|
public abstract void run(Stage stage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动方法
|
* 启动方法。
|
||||||
|
* <p>
|
||||||
|
* 该方法设置窗口的图标、标题、场景,并将窗口设置为模态对话框,然后显示窗口。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void run() {
|
public void run() {
|
||||||
stage.getIcons().add(getStageIcon());
|
stage.getIcons().add(getStageIcon());
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package org.jcnc.jnotepad.api.core.controller.config;
|
package org.jcnc.jnotepad.api.core.controller.config;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.api.core.controller.interfaces.ConfigController;
|
import org.jcnc.jnotepad.api.core.controller.interfaces.ConfigController;
|
||||||
|
import org.jcnc.jnotepad.app.utils.JsonUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.PopUpUtil;
|
||||||
import org.jcnc.jnotepad.controller.exception.AppException;
|
import org.jcnc.jnotepad.controller.exception.AppException;
|
||||||
import org.jcnc.jnotepad.util.JsonUtil;
|
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
|
||||||
import org.jcnc.jnotepad.util.PopUpUtil;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
@ -16,7 +16,12 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基本配置文件控制器抽象类
|
* 抽象基本配置文件控制器类。
|
||||||
|
* <p>
|
||||||
|
* 该类是基本配置文件控制器的抽象实现,提供了加载、持久化配置文件以及其他相关方法。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param <T> 配置文件类型
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
@ -27,41 +32,40 @@ public abstract class BaseConfigController<T> implements ConfigController<T> {
|
|||||||
protected static final String SYSTEM_CONFIG_DIR = "system";
|
protected static final String SYSTEM_CONFIG_DIR = "system";
|
||||||
|
|
||||||
protected T config;
|
protected T config;
|
||||||
Logger logger = LogUtil.getLogger(this.getClass());
|
private final Logger logger = LogUtil.getLogger(getClass());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取配置文件Class类
|
* 获取配置文件Class类。
|
||||||
*
|
*
|
||||||
* @return 配置文件Class类
|
* @return 配置文件Class类
|
||||||
*/
|
*/
|
||||||
protected abstract Class<T> getConfigClass();
|
protected abstract Class<T> getConfigClass();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取配置文件名称
|
* 获取配置文件名称。
|
||||||
*
|
*
|
||||||
* @return 配置文件名称
|
* @return 配置文件名称
|
||||||
*/
|
*/
|
||||||
protected abstract String getConfigName();
|
protected abstract String getConfigName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取配置文件文件夹路径
|
* 获取配置文件文件夹路径。
|
||||||
*
|
*
|
||||||
* @return 配置文件夹路径
|
* @return 配置文件夹路径
|
||||||
*/
|
*/
|
||||||
protected abstract String getConfigDir();
|
protected abstract String getConfigDir();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取配置文件类
|
* 获取配置文件对象。
|
||||||
*
|
*
|
||||||
* @return 获取配置文件类
|
* @return 配置文件对象
|
||||||
*/
|
*/
|
||||||
public T getConfig() {
|
public T getConfig() {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载配置文件内容
|
* 加载配置文件内容。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void loadConfig() {
|
public void loadConfig() {
|
||||||
@ -79,7 +83,7 @@ public abstract class BaseConfigController<T> implements ConfigController<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置文件持久化
|
* 配置文件持久化。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void writeConfig() {
|
public void writeConfig() {
|
||||||
@ -88,7 +92,7 @@ public abstract class BaseConfigController<T> implements ConfigController<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置文件持久化
|
* 配置文件持久化。
|
||||||
*
|
*
|
||||||
* @param config 配置文件对象
|
* @param config 配置文件对象
|
||||||
*/
|
*/
|
||||||
@ -106,7 +110,7 @@ public abstract class BaseConfigController<T> implements ConfigController<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 如果配置文件不存在则创建
|
* 如果配置文件不存在则创建。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void createConfigIfNotExists() {
|
public void createConfigIfNotExists() {
|
||||||
@ -122,7 +126,7 @@ public abstract class BaseConfigController<T> implements ConfigController<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取配置文件路径
|
* 获取配置文件路径。
|
||||||
*
|
*
|
||||||
* @return 配置文件路径
|
* @return 配置文件路径
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -4,22 +4,35 @@ import java.nio.file.Path;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置文件控制器接口
|
* 配置文件控制器接口
|
||||||
|
* <p>
|
||||||
|
* 该接口定义了配置文件相关的操作,包括加载、持久化、创建和获取配置文件路径等。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
|
* @param <T> 配置文件类型
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
public interface ConfigController<T> {
|
public interface ConfigController<T> {
|
||||||
/**
|
/**
|
||||||
* 加载配置文件内容
|
* 加载配置文件内容
|
||||||
|
* <p>
|
||||||
|
* 从配置文件中加载配置信息。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
void loadConfig();
|
void loadConfig();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置文件持久化
|
* 配置文件持久化
|
||||||
|
* <p>
|
||||||
|
* 将配置信息持久化到配置文件中。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
void writeConfig();
|
void writeConfig();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置文件持久化
|
* 配置文件持久化
|
||||||
|
* <p>
|
||||||
|
* 将指定的配置对象持久化到配置文件中。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @param config 配置文件对象
|
* @param config 配置文件对象
|
||||||
*/
|
*/
|
||||||
@ -27,19 +40,28 @@ public interface ConfigController<T> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 如果配置文件不存在则创建
|
* 如果配置文件不存在则创建
|
||||||
|
* <p>
|
||||||
|
* 在需要的情况下创建配置文件,如果配置文件已存在,则不执行任何操作。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
void createConfigIfNotExists();
|
void createConfigIfNotExists();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建配置文件实体
|
* 创建配置文件实体
|
||||||
|
* <p>
|
||||||
|
* 生成默认的配置文件实体对象,用于后续的序列化操作。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @return 默认的配置文件实体
|
* @return 默认的配置文件实体
|
||||||
* @apiNote 返回默认的配置文件实体用于序列化json
|
* @apiNote 返回默认的配置文件实体用于序列化 JSON 数据。
|
||||||
*/
|
*/
|
||||||
T generateDefaultConfig();
|
T generateDefaultConfig();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取配置文件路径
|
* 获取配置文件路径
|
||||||
|
* <p>
|
||||||
|
* 返回配置文件的路径。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @return 配置文件路径
|
* @return 配置文件路径
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -7,6 +7,10 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 抽象缓存管理类
|
* 抽象缓存管理类
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* 该类是缓存管理的抽象基类,用于管理不同类型的缓存。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractCacheManager {
|
public abstract class AbstractCacheManager {
|
||||||
@ -41,7 +45,6 @@ public abstract class AbstractCacheManager {
|
|||||||
*
|
*
|
||||||
* @return 缓存集合
|
* @return 缓存集合
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public Map<String, Cache> getCaches() {
|
public Map<String, Cache> getCaches() {
|
||||||
return caches;
|
return caches;
|
||||||
}
|
}
|
||||||
@ -112,5 +115,4 @@ public abstract class AbstractCacheManager {
|
|||||||
}
|
}
|
||||||
return cache.getCacheData();
|
return cache.getCacheData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,20 +7,27 @@ import javafx.scene.control.MenuItem;
|
|||||||
/**
|
/**
|
||||||
* 上下文菜单建造者类
|
* 上下文菜单建造者类
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* 此类用于构建上下文菜单对象,可以添加菜单项、单选菜单项、复选菜单项以及分割线等。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class ContextMenuBuilder extends AbstractMenuBuilder<ContextMenuBuilder, ContextMenu> {
|
public class ContextMenuBuilder extends AbstractMenuBuilder<ContextMenuBuilder, ContextMenu> {
|
||||||
private final ContextMenu contextMenu;
|
private final ContextMenu contextMenu;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造上下文菜单建造者
|
||||||
|
*/
|
||||||
public ContextMenuBuilder() {
|
public ContextMenuBuilder() {
|
||||||
contextMenu = new ContextMenu();
|
contextMenu = new ContextMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds and returns the ContextMenu object.
|
* 构建并返回上下文菜单对象。
|
||||||
*
|
*
|
||||||
* @return the built ContextMenu object
|
* @return 构建的上下文菜单对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ContextMenu build() {
|
public ContextMenu build() {
|
||||||
@ -28,9 +35,9 @@ public class ContextMenuBuilder extends AbstractMenuBuilder<ContextMenuBuilder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get subclass builder
|
* 获取子类的建造者实例
|
||||||
*
|
*
|
||||||
* @return builder
|
* @return 建造者实例
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected ContextMenuBuilder getBuilder() {
|
protected ContextMenuBuilder getBuilder() {
|
||||||
@ -38,9 +45,9 @@ public class ContextMenuBuilder extends AbstractMenuBuilder<ContextMenuBuilder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the items of the menu.
|
* 获取上下文菜单的菜单项列表
|
||||||
*
|
*
|
||||||
* @return an ObservableList of MenuItems
|
* @return 菜单项列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected ObservableList<MenuItem> getItems() {
|
protected ObservableList<MenuItem> getItems() {
|
||||||
|
|||||||
@ -7,19 +7,29 @@ import javafx.scene.control.MenuItem;
|
|||||||
/**
|
/**
|
||||||
* 菜单建造者类
|
* 菜单建造者类
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* 此类用于构建菜单对象,可以添加菜单项、单选菜单项、复选菜单项以及分割线等。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class MenuBuilder extends AbstractMenuBuilder<MenuBuilder, Menu> {
|
public class MenuBuilder extends AbstractMenuBuilder<MenuBuilder, Menu> {
|
||||||
private final Menu menu;
|
private final Menu menu;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造菜单建造者
|
||||||
|
*
|
||||||
|
* @param label 菜单的标签
|
||||||
|
*/
|
||||||
public MenuBuilder(String label) {
|
public MenuBuilder(String label) {
|
||||||
menu = new Menu(label);
|
menu = new Menu(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get subclass builder
|
* 获取子类的建造者实例
|
||||||
*
|
*
|
||||||
* @return builder
|
* @return 建造者实例
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected MenuBuilder getBuilder() {
|
protected MenuBuilder getBuilder() {
|
||||||
@ -27,9 +37,9 @@ public class MenuBuilder extends AbstractMenuBuilder<MenuBuilder, Menu> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the items of the menu.
|
* 获取菜单的菜单项列表
|
||||||
*
|
*
|
||||||
* @return an ObservableList of MenuItems
|
* @return 菜单项列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected ObservableList<MenuItem> getItems() {
|
protected ObservableList<MenuItem> getItems() {
|
||||||
@ -37,9 +47,9 @@ public class MenuBuilder extends AbstractMenuBuilder<MenuBuilder, Menu> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build menu
|
* 构建菜单
|
||||||
*
|
*
|
||||||
* @return menu
|
* @return 构建的菜单对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Menu build() {
|
public Menu build() {
|
||||||
|
|||||||
@ -3,12 +3,17 @@ package org.jcnc.jnotepad.api.core.views.sidebar.bottom;
|
|||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.Menu;
|
import javafx.scene.control.Menu;
|
||||||
import javafx.scene.control.MenuBar;
|
import javafx.scene.control.MenuBar;
|
||||||
import org.jcnc.jnotepad.views.root.bottom.function.FunctionBox;
|
import org.jcnc.jnotepad.ui.views.root.bottom.function.FunctionBox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子功能栏抽象类(用于构建一个基本的子功能栏)
|
* 子功能栏抽象类
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此抽象类用于构建一个基本的子功能栏,包括功能按钮的初始化和添加到功能栏中。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractFunctionChildrenBox {
|
public abstract class AbstractFunctionChildrenBox {
|
||||||
protected final FunctionBox functionBox;
|
protected final FunctionBox functionBox;
|
||||||
@ -19,11 +24,17 @@ public abstract class AbstractFunctionChildrenBox {
|
|||||||
|
|
||||||
protected Menu menu = new Menu();
|
protected Menu menu = new Menu();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造子功能栏抽象类
|
||||||
|
*/
|
||||||
protected AbstractFunctionChildrenBox() {
|
protected AbstractFunctionChildrenBox() {
|
||||||
functionBox = FunctionBox.getInstance();
|
functionBox = FunctionBox.getInstance();
|
||||||
menuBar = FunctionBox.getMenuBar();
|
menuBar = FunctionBox.getMenuBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化子功能栏,包括将功能按钮添加到菜单栏中
|
||||||
|
*/
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
menu.setGraphic(label);
|
menu.setGraphic(label);
|
||||||
menuBar.getMenus().add(menu);
|
menuBar.getMenus().add(menu);
|
||||||
|
|||||||
@ -8,14 +8,18 @@ import javafx.scene.control.Menu;
|
|||||||
import javafx.scene.control.MenuItem;
|
import javafx.scene.control.MenuItem;
|
||||||
import javafx.scene.control.RadioMenuItem;
|
import javafx.scene.control.RadioMenuItem;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.views.root.top.menubar.TopMenuBar;
|
import org.jcnc.jnotepad.ui.views.root.top.menubar.TopMenuBar;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抽象顶部菜单
|
* 抽象顶部菜单类
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此抽象类用于创建顶部菜单,包括菜单项的注册和初始化。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
@ -56,7 +60,7 @@ public abstract class AbstractTopMenu {
|
|||||||
* @param menuItem 菜单项
|
* @param menuItem 菜单项
|
||||||
* @param menuItemName 菜单项名称
|
* @param menuItemName 菜单项名称
|
||||||
* @param userData 用户数据,用来存放必要的数据,比如按钮菜单项名称
|
* @param userData 用户数据,用来存放必要的数据,比如按钮菜单项名称
|
||||||
* @param eventHandler 事件
|
* @param eventHandler 事件处理器
|
||||||
*/
|
*/
|
||||||
public void registerMenuItem(MenuItem menuItem, String menuItemName, Object userData, EventHandler<ActionEvent> eventHandler) {
|
public void registerMenuItem(MenuItem menuItem, String menuItemName, Object userData, EventHandler<ActionEvent> eventHandler) {
|
||||||
getMenuItems().put(menuItemName, menuItem);
|
getMenuItems().put(menuItemName, menuItem);
|
||||||
@ -70,9 +74,8 @@ public abstract class AbstractTopMenu {
|
|||||||
* @param checkMenuItem 检查菜单项
|
* @param checkMenuItem 检查菜单项
|
||||||
* @param menuItemName 菜单项名称
|
* @param menuItemName 菜单项名称
|
||||||
* @param userData 用户数据,用来存放必要的数据,比如按钮菜单项名称
|
* @param userData 用户数据,用来存放必要的数据,比如按钮菜单项名称
|
||||||
* @param listener 监听事件
|
* @param listener 监听器
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void registerMenuItem(CheckMenuItem checkMenuItem, String menuItemName, Object userData, ChangeListener<Boolean> listener) {
|
public void registerMenuItem(CheckMenuItem checkMenuItem, String menuItemName, Object userData, ChangeListener<Boolean> listener) {
|
||||||
getMenuItems().put(menuItemName, checkMenuItem);
|
getMenuItems().put(menuItemName, checkMenuItem);
|
||||||
checkMenuItem.setUserData(userData);
|
checkMenuItem.setUserData(userData);
|
||||||
@ -85,9 +88,8 @@ public abstract class AbstractTopMenu {
|
|||||||
* @param radioMenuItem 单选菜单项
|
* @param radioMenuItem 单选菜单项
|
||||||
* @param menuItemName 菜单项名称
|
* @param menuItemName 菜单项名称
|
||||||
* @param userData 用户数据,用来存放必要的数据
|
* @param userData 用户数据,用来存放必要的数据
|
||||||
* @param eventHandler 操作事件
|
* @param eventHandler 事件处理器
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void registerRadioMenuItem(Map<String, RadioMenuItem> radioMenuItems, RadioMenuItem radioMenuItem, String menuItemName, Object userData, EventHandler<ActionEvent> eventHandler) {
|
public void registerRadioMenuItem(Map<String, RadioMenuItem> radioMenuItems, RadioMenuItem radioMenuItem, String menuItemName, Object userData, EventHandler<ActionEvent> eventHandler) {
|
||||||
radioMenuItems.put(menuItemName, radioMenuItem);
|
radioMenuItems.put(menuItemName, radioMenuItem);
|
||||||
radioMenuItem.setUserData(userData);
|
radioMenuItem.setUserData(userData);
|
||||||
@ -101,7 +103,7 @@ public abstract class AbstractTopMenu {
|
|||||||
registerTopMenu();
|
registerTopMenu();
|
||||||
logger.info("初始化菜单!");
|
logger.info("初始化菜单!");
|
||||||
Menu menu = getMenu();
|
Menu menu = getMenu();
|
||||||
// 文件菜单
|
// 菜单名称国际化
|
||||||
UiResourceBundle.bindStringProperty(menu.textProperty(), getMenuName());
|
UiResourceBundle.bindStringProperty(menu.textProperty(), getMenuName());
|
||||||
// 初始化菜单项
|
// 初始化菜单项
|
||||||
initMenuItems(getMenuItems(), menu);
|
initMenuItems(getMenuItems(), menu);
|
||||||
@ -113,7 +115,6 @@ public abstract class AbstractTopMenu {
|
|||||||
* @param menuItems 菜单项集合
|
* @param menuItems 菜单项集合
|
||||||
* @param menu 菜单
|
* @param menu 菜单
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private void initMenuItems(Map<String, MenuItem> menuItems, Menu menu) {
|
private void initMenuItems(Map<String, MenuItem> menuItems, Menu menu) {
|
||||||
logger.info("初始化菜单项!");
|
logger.info("初始化菜单项!");
|
||||||
var itemMap = topMenuBar.getAllItemMap();
|
var itemMap = topMenuBar.getAllItemMap();
|
||||||
|
|||||||
1
src/main/java/org/jcnc/jnotepad/app/aReadme.md
Normal file
1
src/main/java/org/jcnc/jnotepad/app/aReadme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
app 目录存放应用程序配置、应用程序缓存、通用常量和国际化文件。
|
||||||
1
src/main/java/org/jcnc/jnotepad/app/common/aReadme.md
Normal file
1
src/main/java/org/jcnc/jnotepad/app/common/aReadme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
common 目录存放应用程序的通用组卷
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.common.constants;
|
package org.jcnc.jnotepad.app.common.constants;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
|
|
||||||
@ -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() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package org.jcnc.jnotepad.app.common.constants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SplitPane常量类
|
||||||
|
*
|
||||||
|
* <p>用于记录SplitPane中子组件的索引</p>
|
||||||
|
*
|
||||||
|
* @author cccqyu
|
||||||
|
*/
|
||||||
|
public class SplitPaneItemConstants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rootSplitPane中的上部分隔栏索引。
|
||||||
|
*/
|
||||||
|
public static final int ROOT_SPLIT_PANE_TOP_SPLIT_PANE = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rootSplitPane中的底部指令框索引。
|
||||||
|
*/
|
||||||
|
public static final int ROOT_SPLIT_PANE_CMD_BOX = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rootSplitPane中的上部面板的左侧索引。
|
||||||
|
*/
|
||||||
|
public static final int TOP_SPLIT_PANE_DIRECTORY_SIDEBAR_PANE = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rootSplitPane中的上部面板的右侧索引。
|
||||||
|
*/
|
||||||
|
public static final int TOP_SPLIT_PANE_CENTER_TAB_PANE = 1;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,55 +1,171 @@
|
|||||||
package org.jcnc.jnotepad.common.constants;
|
package org.jcnc.jnotepad.app.common.constants;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文本常量,被多处使用的常量放到此处。如果只有一个class使用,在class中使用private static final声明。
|
* 文本常量类,包含多处使用的文本常量。
|
||||||
|
*
|
||||||
|
* <p>如果只有一个类使用常量,请在该类中使用 <code>private static final</code> 声明。</p>
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
public class TextConstants {
|
public class TextConstants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题文本常量
|
||||||
|
*/
|
||||||
public static final String TITLE = "title";
|
public static final String TITLE = "title";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存文本常量
|
||||||
|
*/
|
||||||
public static final String SAVE = "SAVE";
|
public static final String SAVE = "SAVE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件文本常量
|
||||||
|
*/
|
||||||
public static final String FILE = "FILE";
|
public static final String FILE = "FILE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建文本常量
|
||||||
|
*/
|
||||||
public static final String BUILD = "BUILD";
|
public static final String BUILD = "BUILD";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端文本常量
|
||||||
|
*/
|
||||||
public static final String TERMINAL = "TERMINAL";
|
public static final String TERMINAL = "TERMINAL";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行文本常量
|
||||||
|
*/
|
||||||
public static final String RUN = "RUN";
|
public static final String RUN = "RUN";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调试文本常量
|
||||||
|
*/
|
||||||
public static final String DE_BUG = "DE_BUG";
|
public static final String DE_BUG = "DE_BUG";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新建文本常量
|
||||||
|
*/
|
||||||
public static final String NEW = "NEW";
|
public static final String NEW = "NEW";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开文本常量
|
||||||
|
*/
|
||||||
public static final String OPEN = "OPEN";
|
public static final String OPEN = "OPEN";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开目录文本常量
|
||||||
|
*/
|
||||||
public static final String OPEN_DIRECTORY = "OPEN_DIRECTORY";
|
public static final String OPEN_DIRECTORY = "OPEN_DIRECTORY";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 另存为文本常量
|
||||||
|
*/
|
||||||
public static final String SAVE_AS = "SAVE_AS";
|
public static final String SAVE_AS = "SAVE_AS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重命名文本常量
|
||||||
|
*/
|
||||||
public static final String RENAME = "RENAME";
|
public static final String RENAME = "RENAME";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置文本常量
|
||||||
|
*/
|
||||||
public static final String SET = "SET";
|
public static final String SET = "SET";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 帮助文本常量
|
||||||
|
*/
|
||||||
public static final String HELP = "HELP";
|
public static final String HELP = "HELP";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动换行文本常量
|
||||||
|
*/
|
||||||
public static final String WORD_WRAP = "WORD_WRAP";
|
public static final String WORD_WRAP = "WORD_WRAP";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插件文本常量
|
||||||
|
*/
|
||||||
public static final String PLUGIN = "PLUGIN";
|
public static final String PLUGIN = "PLUGIN";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理插件文本常量
|
||||||
|
*/
|
||||||
public static final String MANAGER_PLUGIN = "MANAGER_PLUGIN";
|
public static final String MANAGER_PLUGIN = "MANAGER_PLUGIN";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关于文本常量
|
||||||
|
*/
|
||||||
public static final String ABOUT = "ABOUT";
|
public static final String ABOUT = "ABOUT";
|
||||||
|
|
||||||
public static final String DEVELOPER = "DEVELOPER";
|
|
||||||
public static final String STATISTICS = "STATISTICS";
|
|
||||||
public static final String OPEN_CONFIGURATION_FILE = "OPEN_CONFIGURATION_FILE";
|
|
||||||
public static final String TOP = "TOP";
|
|
||||||
public static final String LANGUAGE = "LANGUAGE";
|
|
||||||
public static final String UPPER_CHINESE = "CHINESE";
|
|
||||||
public static final String UPPER_ENGLISH = "ENGLISH";
|
|
||||||
public static final String NEW_FILE = "NEW_FILE";
|
|
||||||
public static final String ROW = "ROW";
|
|
||||||
public static final String COLUMN = "COLUMN";
|
|
||||||
public static final String WORD_COUNT = "WORD_COUNT";
|
|
||||||
public static final String ENCODE = "ENCODE";
|
|
||||||
/**
|
/**
|
||||||
* 英文小写
|
* 开发者文本常量
|
||||||
|
*/
|
||||||
|
public static final String DEVELOPER = "DEVELOPER";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计文本常量
|
||||||
|
*/
|
||||||
|
public static final String STATISTICS = "STATISTICS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开配置文件文本常量
|
||||||
|
*/
|
||||||
|
public static final String OPEN_CONFIGURATION_FILE = "OPEN_CONFIGURATION_FILE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部文本常量
|
||||||
|
*/
|
||||||
|
public static final String TOP = "TOP";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 语言文本常量
|
||||||
|
*/
|
||||||
|
public static final String LANGUAGE = "LANGUAGE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中文文本常量
|
||||||
|
*/
|
||||||
|
public static final String UPPER_CHINESE = "CHINESE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 英文文本常量
|
||||||
|
*/
|
||||||
|
public static final String UPPER_ENGLISH = "ENGLISH";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新建文件文本常量
|
||||||
|
*/
|
||||||
|
public static final String NEW_FILE = "NEW_FILE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行文本常量
|
||||||
|
*/
|
||||||
|
public static final String ROW = "ROW";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列文本常量
|
||||||
|
*/
|
||||||
|
public static final String COLUMN = "COLUMN";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字数统计文本常量
|
||||||
|
*/
|
||||||
|
public static final String WORD_COUNT = "WORD_COUNT";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码文本常量
|
||||||
|
*/
|
||||||
|
public static final String ENCODE = "ENCODE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 英文小写文本常量
|
||||||
*/
|
*/
|
||||||
public static final String ENGLISH = "english";
|
public static final String ENGLISH = "english";
|
||||||
|
|
||||||
/// BaseConfig 文本常量
|
|
||||||
/**
|
/**
|
||||||
* 中文小写
|
* 中文小写文本常量
|
||||||
*/
|
*/
|
||||||
public static final String CHINESE = "chinese";
|
public static final String CHINESE = "chinese";
|
||||||
|
|
||||||
@ -1,9 +1,12 @@
|
|||||||
package org.jcnc.jnotepad.common.manager;
|
package org.jcnc.jnotepad.app.common.manager;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.api.core.manager.AbstractCacheManager;
|
import org.jcnc.jnotepad.api.core.manager.AbstractCacheManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用程序缓存管理类
|
* 应用程序缓存管理类。
|
||||||
|
* <p>
|
||||||
|
* 该类用于管理应用程序中的缓存数据。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
@ -15,10 +18,20 @@ public class ApplicationCacheManager extends AbstractCacheManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 ApplicationCacheManager 的实例。
|
||||||
|
*
|
||||||
|
* @return ApplicationCacheManager 实例
|
||||||
|
*/
|
||||||
public static ApplicationCacheManager getInstance() {
|
public static ApplicationCacheManager getInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全局命名空间。
|
||||||
|
*
|
||||||
|
* @return 全局命名空间字符串
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getGlobalNamespace() {
|
public String getGlobalNamespace() {
|
||||||
return "jcnc";
|
return "jcnc";
|
||||||
@ -1,15 +1,16 @@
|
|||||||
package org.jcnc.jnotepad.common.manager;
|
package org.jcnc.jnotepad.app.common.manager;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线程池管理类
|
* 线程池管理类。
|
||||||
*
|
* <p>
|
||||||
* <p>该类用于管理应用程序中的线程池,提供了异步操作的执行环境。</p>
|
* 该类用于管理应用程序中的线程池,提供了异步操作的执行环境。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
@ -68,9 +69,11 @@ public class ThreadPoolManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前运行线程数自减
|
* 当前运行线程数自减。
|
||||||
|
* <p>
|
||||||
|
* 当你创建任务时,务必在最后执行一次该方法。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @apiNote 当你创建任务时,务必在最后执行一次该方法
|
|
||||||
* @see ThreadPoolManager
|
* @see ThreadPoolManager
|
||||||
*/
|
*/
|
||||||
public static void threadContSelfSubtracting() {
|
public static void threadContSelfSubtracting() {
|
||||||
@ -8,13 +8,18 @@ import java.util.Collections;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.DEFAULT_PROPERTY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.DEFAULT_PROPERTY;
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用程序配置文件
|
* 应用程序配置文件
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* 此类用于存储应用程序的配置信息,包括程序根路径、排除的文件夹和文件等。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class AppConfig {
|
public class AppConfig {
|
||||||
/**
|
/**
|
||||||
@ -37,6 +42,9 @@ public class AppConfig {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String lastRootPath;
|
private String lastRootPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造应用程序配置对象
|
||||||
|
*/
|
||||||
public AppConfig() {
|
public AppConfig() {
|
||||||
ignoreFolder = Set.of(
|
ignoreFolder = Set.of(
|
||||||
new File(Paths.get(System.getProperty(DEFAULT_PROPERTY), PROGRAM_FILE_DIRECTORY, "system").toString()),
|
new File(Paths.get(System.getProperty(DEFAULT_PROPERTY), PROGRAM_FILE_DIRECTORY, "system").toString()),
|
||||||
@ -45,26 +53,56 @@ public class AppConfig {
|
|||||||
ignoreFile = Collections.emptySet();
|
ignoreFile = Collections.emptySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取程序根路径
|
||||||
|
*
|
||||||
|
* @return 程序根路径
|
||||||
|
*/
|
||||||
public String getRootPath() {
|
public String getRootPath() {
|
||||||
return Optional.ofNullable(rootPath).orElse(System.getProperty(DEFAULT_PROPERTY));
|
return Optional.ofNullable(rootPath).orElse(System.getProperty(DEFAULT_PROPERTY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置程序根路径
|
||||||
|
*
|
||||||
|
* @param rootPath 程序根路径
|
||||||
|
*/
|
||||||
public void setRootPath(String rootPath) {
|
public void setRootPath(String rootPath) {
|
||||||
this.rootPath = rootPath;
|
this.rootPath = rootPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上次的程序根路径
|
||||||
|
*
|
||||||
|
* @return 上次的程序根路径
|
||||||
|
*/
|
||||||
public String getLastRootPath() {
|
public String getLastRootPath() {
|
||||||
return lastRootPath;
|
return lastRootPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置上次的程序根路径
|
||||||
|
*
|
||||||
|
* @param lastRootPath 上次的程序根路径
|
||||||
|
*/
|
||||||
public void setLastRootPath(String lastRootPath) {
|
public void setLastRootPath(String lastRootPath) {
|
||||||
this.lastRootPath = lastRootPath;
|
this.lastRootPath = lastRootPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取排除的文件夹集合
|
||||||
|
*
|
||||||
|
* @return 排除的文件夹集合
|
||||||
|
*/
|
||||||
public Set<File> getIgnoreFolder() {
|
public Set<File> getIgnoreFolder() {
|
||||||
return ignoreFolder;
|
return ignoreFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取排除的文件集合
|
||||||
|
*
|
||||||
|
* @return 排除的文件集合
|
||||||
|
*/
|
||||||
public Set<File> getIgnoreFile() {
|
public Set<File> getIgnoreFile() {
|
||||||
return ignoreFile;
|
return ignoreFile;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,15 +7,30 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 插件配置文件
|
* 插件配置文件
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* 此类用于存储插件的配置信息,包括插件描述符的列表。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class PluginConfig {
|
public class PluginConfig {
|
||||||
private List<PluginDescriptor> plugins;
|
private List<PluginDescriptor> plugins;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取插件描述符列表
|
||||||
|
*
|
||||||
|
* @return 插件描述符列表
|
||||||
|
*/
|
||||||
public List<PluginDescriptor> getPlugins() {
|
public List<PluginDescriptor> getPlugins() {
|
||||||
return plugins;
|
return plugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置插件描述符列表
|
||||||
|
*
|
||||||
|
* @param plugins 插件描述符列表
|
||||||
|
*/
|
||||||
public void setPlugins(List<PluginDescriptor> plugins) {
|
public void setPlugins(List<PluginDescriptor> plugins) {
|
||||||
this.plugins = plugins;
|
this.plugins = plugins;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,22 @@ import java.util.ResourceBundle;
|
|||||||
/**
|
/**
|
||||||
* UI资源绑定,用于加载语言文件。
|
* UI资源绑定,用于加载语言文件。
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* 此类用于加载和管理UI资源文件,支持国际化和多语言功能。可以通过绑定StringProperty和键值对应的内容,以及获取当前资源文件的内容。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 该类是一个单例类,通过getInstance方法获取实例。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 使用方法示例:
|
||||||
|
* <code>
|
||||||
|
* UiResourceBundle.bindStringProperty(stringProperty, "key");
|
||||||
|
* String content = UiResourceBundle.getContent("key");
|
||||||
|
* </code>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
* @author songdragon
|
* @author songdragon
|
||||||
*/
|
*/
|
||||||
public class UiResourceBundle {
|
public class UiResourceBundle {
|
||||||
@ -35,6 +51,11 @@ public class UiResourceBundle {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取UiResourceBundle的单例实例
|
||||||
|
*
|
||||||
|
* @return UiResourceBundle的单例实例
|
||||||
|
*/
|
||||||
public static UiResourceBundle getInstance() {
|
public static UiResourceBundle getInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
@ -81,6 +102,8 @@ public class UiResourceBundle {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置当前local
|
* 重置当前local
|
||||||
|
*
|
||||||
|
* @param toLocal 要设置的新的Locale
|
||||||
*/
|
*/
|
||||||
public final void resetLocal(Locale toLocal) {
|
public final void resetLocal(Locale toLocal) {
|
||||||
if (this.currentLocale == toLocal) {
|
if (this.currentLocale == toLocal) {
|
||||||
|
|||||||
@ -8,22 +8,22 @@ import javafx.scene.layout.Pane;
|
|||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.Window;
|
import javafx.stage.Window;
|
||||||
import org.jcnc.jnotepad.JnotepadApp;
|
import org.jcnc.jnotepad.JnotepadApp;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.AppConstants;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.TextConstants;
|
||||||
|
import org.jcnc.jnotepad.app.common.manager.ThreadPoolManager;
|
||||||
import org.jcnc.jnotepad.app.config.AppConfig;
|
import org.jcnc.jnotepad.app.config.AppConfig;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.common.constants.AppConstants;
|
import org.jcnc.jnotepad.app.utils.FileUtil;
|
||||||
import org.jcnc.jnotepad.common.constants.TextConstants;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.common.manager.ThreadPoolManager;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
import org.jcnc.jnotepad.controller.ResourceController;
|
import org.jcnc.jnotepad.controller.ResourceController;
|
||||||
import org.jcnc.jnotepad.controller.cache.CacheController;
|
import org.jcnc.jnotepad.controller.cache.CacheController;
|
||||||
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
||||||
import org.jcnc.jnotepad.controller.config.PluginConfigController;
|
import org.jcnc.jnotepad.controller.config.PluginConfigController;
|
||||||
import org.jcnc.jnotepad.controller.exception.AppException;
|
import org.jcnc.jnotepad.controller.exception.AppException;
|
||||||
import org.jcnc.jnotepad.controller.manager.Controller;
|
import org.jcnc.jnotepad.controller.manager.Controller;
|
||||||
import org.jcnc.jnotepad.plugin.manager.PluginManager;
|
import org.jcnc.jnotepad.controller.plugin.manager.PluginManager;
|
||||||
import org.jcnc.jnotepad.util.FileUtil;
|
import org.jcnc.jnotepad.ui.views.manager.*;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
|
||||||
import org.jcnc.jnotepad.views.manager.*;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -34,13 +34,19 @@ import java.util.Objects;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.DEFAULT_PROPERTY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.DEFAULT_PROPERTY;
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用程序管理类<br/>
|
* 应用程序管理类
|
||||||
* 此类负责管理应用程序的生命周期等操作
|
*
|
||||||
|
* <p>
|
||||||
|
* 此类负责管理应用程序的生命周期和操作。它包括初始化应用程序、执行默认操作、加载缓存、加载资源、迁移程序根文件夹、停止前操作等功能。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 该类是一个单例类,通过getInstance方法获取实例。
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @author gewuyou
|
* @author gewuyou
|
||||||
*/
|
*/
|
||||||
@ -55,22 +61,27 @@ public class ApplicationManager {
|
|||||||
private Stage primaryStage;
|
private Stage primaryStage;
|
||||||
private Application application;
|
private Application application;
|
||||||
|
|
||||||
|
|
||||||
private ApplicationManager() {
|
private ApplicationManager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取ApplicationManager的单例实例
|
||||||
|
*
|
||||||
|
* @return ApplicationManager的单例实例
|
||||||
|
*/
|
||||||
public static ApplicationManager getInstance() {
|
public static ApplicationManager getInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化程序(Initializes the application)
|
* 初始化应用程序
|
||||||
*
|
*
|
||||||
* @apiNote
|
* <p>
|
||||||
* @since 2023/9/20 17:26
|
* 此方法用于初始化应用程序的各个组件,包括设置应用程序主题、初始化UI组件、初始化插件、初始化顶部菜单栏、初始化侧边工具栏、初始化下方状态栏、初始化标签页布局等。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void initializeApp() {
|
public void initializeApp() {
|
||||||
// 设置应用程序主题 SetTheApplicationTheme
|
// 设置应用程序主题
|
||||||
Application.setUserAgentStylesheet(new PrimerLight().getUserAgentStylesheet());
|
Application.setUserAgentStylesheet(new PrimerLight().getUserAgentStylesheet());
|
||||||
// 初始化scene
|
// 初始化scene
|
||||||
initScene();
|
initScene();
|
||||||
@ -92,6 +103,10 @@ public class ApplicationManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行默认操作
|
* 执行默认操作
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此方法用于执行应用程序的默认操作,例如根据参数打开关联文件并创建文本区域,加载已打开的文件夹等。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void executeDefaultAction() {
|
public void executeDefaultAction() {
|
||||||
// 使用加载关联文件并创建文本区域
|
// 使用加载关联文件并创建文本区域
|
||||||
@ -124,6 +139,10 @@ public class ApplicationManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载缓存
|
* 加载缓存
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此方法用于加载应用程序的缓存。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void loadAppCache() {
|
public void loadAppCache() {
|
||||||
// 加载缓存
|
// 加载缓存
|
||||||
@ -132,6 +151,10 @@ public class ApplicationManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载资源
|
* 加载资源
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此方法用于加载应用程序的资源,包括加载资源文件和绑定快捷键。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void loadAppResources() {
|
public void loadAppResources() {
|
||||||
// 加载资源
|
// 加载资源
|
||||||
@ -142,6 +165,10 @@ public class ApplicationManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 迁移程序根文件夹
|
* 迁移程序根文件夹
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此方法用于迁移应用程序的根文件夹,将根文件夹从之前的位置迁移到新的位置。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void migrateFileRootFolder() {
|
public void migrateFileRootFolder() {
|
||||||
AppConfig config = AppConfigController.getInstance().getConfig();
|
AppConfig config = AppConfigController.getInstance().getConfig();
|
||||||
@ -174,7 +201,9 @@ public class ApplicationManager {
|
|||||||
/**
|
/**
|
||||||
* 停止前操作
|
* 停止前操作
|
||||||
*
|
*
|
||||||
* @apiNote 在停止程序之前会执行此操作
|
* <p>
|
||||||
|
* 在停止应用程序之前,执行一系列操作,包括刷新插件配置、销毁插件、保存已打开的文件标签页、将缓存写入本地、迁移程序根文件夹、关闭线程池等。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void operationBeforeStopping() {
|
public void operationBeforeStopping() {
|
||||||
PluginConfigController pluginConfigController = PluginConfigController.getInstance();
|
PluginConfigController pluginConfigController = PluginConfigController.getInstance();
|
||||||
@ -195,7 +224,7 @@ public class ApplicationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前窗口。
|
* 获取当前窗口
|
||||||
*
|
*
|
||||||
* @return 当前窗口
|
* @return 当前窗口
|
||||||
*/
|
*/
|
||||||
@ -206,8 +235,7 @@ public class ApplicationManager {
|
|||||||
/**
|
/**
|
||||||
* 获取当前窗口的场景
|
* 获取当前窗口的场景
|
||||||
*
|
*
|
||||||
* @return javafx.scene.Scene
|
* @return 当前窗口的场景
|
||||||
* @since 2023/9/20 18:21
|
|
||||||
*/
|
*/
|
||||||
public Scene getScene() {
|
public Scene getScene() {
|
||||||
return scene;
|
return scene;
|
||||||
@ -220,8 +248,9 @@ public class ApplicationManager {
|
|||||||
/**
|
/**
|
||||||
* 加载程序布局
|
* 加载程序布局
|
||||||
*
|
*
|
||||||
* @apiNote
|
* <p>
|
||||||
* @since 2023/9/20 17:25
|
* 此方法用于加载应用程序的布局,包括根布局容器、底部根侧边栏垂直布局、主界面边界布局、顶部边界面板、右侧边栏垂直布局、根布局等组件。
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public void initAppLayout() {
|
public void initAppLayout() {
|
||||||
// 加载根布局容器
|
// 加载根布局容器
|
||||||
@ -237,9 +266,15 @@ public class ApplicationManager {
|
|||||||
RootRightSideBarVerticalBoxManager.getInstance().initRootRightSideBarVerticalBox();
|
RootRightSideBarVerticalBoxManager.getInstance().initRootRightSideBarVerticalBox();
|
||||||
// 初始化根布局
|
// 初始化根布局
|
||||||
RootBorderPaneManager.getInstance().initRootBorderPane();
|
RootBorderPaneManager.getInstance().initRootBorderPane();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重启应用程序
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此方法用于重启当前的Java应用程序。
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
public void restart() {
|
public void restart() {
|
||||||
try {
|
try {
|
||||||
// 获取当前Java应用程序的命令
|
// 获取当前Java应用程序的命令
|
||||||
@ -250,14 +285,12 @@ public class ApplicationManager {
|
|||||||
ProcessBuilder builder = new ProcessBuilder(javaCommand, "-cp", System.getProperty("java.class.path"), mainClass);
|
ProcessBuilder builder = new ProcessBuilder(javaCommand, "-cp", System.getProperty("java.class.path"), mainClass);
|
||||||
builder.start();
|
builder.start();
|
||||||
// 关闭当前应用程序
|
// 关闭当前应用程序
|
||||||
// fixme 使用这个System.exit(0);,在开发环境,点击重启程序,停止前操作不生效
|
|
||||||
stop();
|
stop();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LogUtil.getLogger("正在重启当前应用程序".getClass());
|
LogUtil.getLogger("正在重启当前应用程序".getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Pane getRoot() {
|
public Pane getRoot() {
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
@ -282,6 +315,13 @@ public class ApplicationManager {
|
|||||||
this.primaryStage = primaryStage;
|
this.primaryStage = primaryStage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止应用程序
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* 此方法用于停止应用程序。
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
public void stop() {
|
public void stop() {
|
||||||
Platform.exit();
|
Platform.exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import javafx.scene.input.Clipboard;
|
import javafx.scene.input.Clipboard;
|
||||||
import javafx.scene.input.ClipboardContent;
|
import javafx.scene.input.ClipboardContent;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import com.ibm.icu.text.CharsetDetector;
|
import com.ibm.icu.text.CharsetDetector;
|
||||||
import com.ibm.icu.text.CharsetMatch;
|
import com.ibm.icu.text.CharsetMatch;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import org.jcnc.jnotepad.controller.event.handler.menuitem.OpenFile;
|
import org.jcnc.jnotepad.controller.event.handler.menuitem.OpenFile;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -1,9 +1,9 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import atlantafx.base.controls.Notification;
|
import atlantafx.base.controls.Notification;
|
||||||
import atlantafx.base.theme.Styles;
|
import atlantafx.base.theme.Styles;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
import org.jcnc.jnotepad.views.manager.RootManager;
|
import org.jcnc.jnotepad.ui.views.manager.RootManager;
|
||||||
import org.kordamp.ikonli.javafx.FontIcon;
|
import org.kordamp.ikonli.javafx.FontIcon;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.AppDialogBuilder;
|
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.interfaces.DialogButtonAction;
|
|
||||||
import org.jcnc.jnotepad.model.enums.DialogType;
|
import org.jcnc.jnotepad.model.enums.DialogType;
|
||||||
|
import org.jcnc.jnotepad.ui.component.stage.dialog.AppDialogBuilder;
|
||||||
|
import org.jcnc.jnotepad.ui.component.stage.dialog.interfaces.DialogButtonAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 弹窗工具类
|
* 弹窗工具类
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.JnotepadApp;
|
import org.jcnc.jnotepad.JnotepadApp;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
@ -6,22 +6,22 @@ import javafx.scene.input.KeyCode;
|
|||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import org.jcnc.jnotepad.api.core.views.menu.builder.ContextMenuBuilder;
|
import org.jcnc.jnotepad.api.core.views.menu.builder.ContextMenuBuilder;
|
||||||
import org.jcnc.jnotepad.api.core.views.menu.builder.MenuBuilder;
|
import org.jcnc.jnotepad.api.core.views.menu.builder.MenuBuilder;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.AppConstants;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.TextConstants;
|
||||||
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.common.constants.AppConstants;
|
|
||||||
import org.jcnc.jnotepad.common.constants.TextConstants;
|
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
|
||||||
import org.jcnc.jnotepad.component.module.TextCodeArea;
|
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.factory.impl.BasicFileChooserFactory;
|
|
||||||
import org.jcnc.jnotepad.controller.config.UserConfigController;
|
import org.jcnc.jnotepad.controller.config.UserConfigController;
|
||||||
import org.jcnc.jnotepad.controller.event.handler.menuitem.OpenFile;
|
import org.jcnc.jnotepad.controller.event.handler.menuitem.OpenFile;
|
||||||
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
||||||
import org.jcnc.jnotepad.model.entity.Cache;
|
import org.jcnc.jnotepad.model.entity.Cache;
|
||||||
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
||||||
import org.jcnc.jnotepad.views.manager.BottomStatusBoxManager;
|
import org.jcnc.jnotepad.ui.component.module.TextCodeArea;
|
||||||
import org.jcnc.jnotepad.views.manager.CenterTabPaneManager;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.factory.impl.BasicFileChooserFactory;
|
||||||
import org.jcnc.jnotepad.views.manager.TopMenuBarManager;
|
import org.jcnc.jnotepad.ui.views.manager.BottomStatusBoxManager;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.center.tab.CenterTab;
|
import org.jcnc.jnotepad.ui.views.manager.CenterTabPaneManager;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.center.tab.CenterTabPane;
|
import org.jcnc.jnotepad.ui.views.manager.TopMenuBarManager;
|
||||||
|
import org.jcnc.jnotepad.ui.views.root.center.main.center.tab.CenterTab;
|
||||||
|
import org.jcnc.jnotepad.ui.views.root.center.main.center.tab.CenterTabPane;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -29,8 +29,8 @@ import java.nio.charset.Charset;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.jcnc.jnotepad.app.utils.FileUtil.getFileText;
|
||||||
import static org.jcnc.jnotepad.controller.config.UserConfigController.CONFIG_NAME;
|
import static org.jcnc.jnotepad.controller.config.UserConfigController.CONFIG_NAME;
|
||||||
import static org.jcnc.jnotepad.util.FileUtil.getFileText;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签页工具
|
* 标签页工具
|
||||||
@ -1,12 +1,12 @@
|
|||||||
package org.jcnc.jnotepad.util;
|
package org.jcnc.jnotepad.app.utils;
|
||||||
|
|
||||||
import atlantafx.base.theme.Styles;
|
import atlantafx.base.theme.Styles;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.stage.Window;
|
import javafx.stage.Window;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.AppConstants;
|
||||||
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
||||||
import org.jcnc.jnotepad.common.constants.AppConstants;
|
|
||||||
import org.kordamp.ikonli.javafx.FontIcon;
|
import org.kordamp.ikonli.javafx.FontIcon;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
1
src/main/java/org/jcnc/jnotepad/app/utils/aReadme.md
Normal file
1
src/main/java/org/jcnc/jnotepad/app/utils/aReadme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
util 存放通用的实用工具代码。
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package org.jcnc.jnotepad.common.constants;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SplitPane常量类
|
|
||||||
* *
|
|
||||||
* <p>用于记录SplitPane中子组件的索引</p>
|
|
||||||
*
|
|
||||||
* @author cccqyu
|
|
||||||
*/
|
|
||||||
public class SplitPaneItemConstants {
|
|
||||||
|
|
||||||
// rootSplitPane
|
|
||||||
|
|
||||||
// 上部
|
|
||||||
public static final int ROOT_SPLIT_PANE_TOP_SPLIT_PANE = 0;
|
|
||||||
// 底部
|
|
||||||
public static final int ROOT_SPLIT_PANE_CMDBox = 1;
|
|
||||||
|
|
||||||
// rootSplitPane中的上部面板
|
|
||||||
// 左侧
|
|
||||||
public static final int TOP_SPLIT_PANE_DIRECTORY_SIDEBAR_PANE = 0;
|
|
||||||
// 右侧
|
|
||||||
public static final int TOP_SPLIT_PANE_CENTER_TAB_PANE = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
package org.jcnc.jnotepad.component.module.base;
|
|
||||||
|
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.layout.BorderPane;
|
|
||||||
import org.jcnc.jnotepad.component.module.interfaces.BorderPaneAble;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 抽象边界面板类
|
|
||||||
*
|
|
||||||
* <p>这个抽象类继承自JavaFX的BorderPane类,实现了BorderPaneAble接口,用于管理UI组件的布局。</p>
|
|
||||||
*
|
|
||||||
* @author luke
|
|
||||||
*/
|
|
||||||
public abstract class AbstractBorderPane extends BorderPane implements BorderPaneAble {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setTopComponent(Node node) {
|
|
||||||
setTop(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBottomComponent(Node node) {
|
|
||||||
setBottom(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setLeftComponent(Node node) {
|
|
||||||
setLeft(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRightComponent(Node node) {
|
|
||||||
setRight(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCenterComponent(Node node) {
|
|
||||||
setCenter(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
package org.jcnc.jnotepad.component.module.base;
|
|
||||||
|
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.layout.HBox;
|
|
||||||
import org.jcnc.jnotepad.component.module.interfaces.HorizontalBoxAble;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 抽象水平盒子类
|
|
||||||
*
|
|
||||||
* <p>这个抽象类继承自JavaFX的HBox类,实现了HBoxAble接口,用于管理水平排列的UI组件。</p>
|
|
||||||
*
|
|
||||||
* @author luke
|
|
||||||
*/
|
|
||||||
public abstract class AbstractHorizontalBox extends HBox implements HorizontalBoxAble {
|
|
||||||
private final HBox hBox;
|
|
||||||
|
|
||||||
public AbstractHorizontalBox() {
|
|
||||||
hBox = new HBox();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addChild(Node node) {
|
|
||||||
hBox.getChildren().add(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addChild(Node... nodes) {
|
|
||||||
hBox.getChildren().addAll(nodes);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public HBox getHorizontalBox() {
|
|
||||||
return hBox;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
package org.jcnc.jnotepad.component.module.base;
|
|
||||||
|
|
||||||
import javafx.scene.Node;
|
|
||||||
import javafx.scene.layout.VBox;
|
|
||||||
import org.jcnc.jnotepad.component.module.interfaces.VerticalBoxAble;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 抽象垂直盒子类
|
|
||||||
*
|
|
||||||
* <p>这个抽象类继承自JavaFX的VBox类,实现了VBoxAble接口,用于管理垂直排列的UI组件。</p>
|
|
||||||
*
|
|
||||||
* @author luke
|
|
||||||
*/
|
|
||||||
public abstract class AbstractVerticalBox extends VBox implements VerticalBoxAble {
|
|
||||||
|
|
||||||
private final VBox vBox;
|
|
||||||
|
|
||||||
public AbstractVerticalBox() {
|
|
||||||
vBox = new VBox();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addChild(Node node) {
|
|
||||||
vBox.getChildren().add(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addChild(Node... nodes) {
|
|
||||||
vBox.getChildren().addAll(nodes);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public VBox getVerticalBox() {
|
|
||||||
return vBox;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
package org.jcnc.jnotepad.component.module.vbox;
|
|
||||||
|
|
||||||
import javafx.scene.control.Tab;
|
|
||||||
import javafx.scene.control.TabPane;
|
|
||||||
import org.jcnc.jnotepad.component.module.vbox.components.CmdTerminalBox;
|
|
||||||
import org.jcnc.jnotepad.component.module.vbox.components.DebugBox;
|
|
||||||
import org.jcnc.jnotepad.component.module.vbox.components.RunBox;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 底部Run,Debug,Cmd面板
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author cccqyu
|
|
||||||
*/
|
|
||||||
public class BuildPanel extends TabPane {
|
|
||||||
|
|
||||||
private static BuildPanel instance = null;
|
|
||||||
|
|
||||||
public static BuildPanel getInstance() {
|
|
||||||
|
|
||||||
if (instance == null) {
|
|
||||||
instance = new BuildPanel();
|
|
||||||
}
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private final CmdTerminalBox cmdTerminalBox;
|
|
||||||
private final RunBox runBox;
|
|
||||||
private final DebugBox debugBox;
|
|
||||||
|
|
||||||
private BuildPanel() {
|
|
||||||
cmdTerminalBox = new CmdTerminalBox();
|
|
||||||
runBox = new RunBox();
|
|
||||||
debugBox = new DebugBox();
|
|
||||||
|
|
||||||
Tab runTab = new Tab("运行",runBox);
|
|
||||||
runTab.setClosable(false);
|
|
||||||
|
|
||||||
Tab buildTab = new Tab("构建", debugBox);
|
|
||||||
buildTab.setClosable(false);
|
|
||||||
|
|
||||||
Tab cmdTab = new Tab("终端",cmdTerminalBox);
|
|
||||||
cmdTab.setClosable(false);
|
|
||||||
this.getTabs().addAll(runTab,buildTab,cmdTab);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CmdTerminalBox getCmdTerminalBox() {
|
|
||||||
return cmdTerminalBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RunBox getRunBox() {
|
|
||||||
return runBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DebugBox getBuildBox() {
|
|
||||||
return debugBox;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package org.jcnc.jnotepad.component.module.vbox.components;
|
|
||||||
|
|
||||||
import org.jcnc.jnotepad.component.module.TextCodeArea;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Debug终端界面。
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author cccqyu
|
|
||||||
*/
|
|
||||||
public class DebugBox extends TextCodeArea {
|
|
||||||
public DebugBox() {
|
|
||||||
super();
|
|
||||||
this.setEditable(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setText(String text) {
|
|
||||||
this.appendText(text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package org.jcnc.jnotepad.component.module.vbox.components;
|
|
||||||
|
|
||||||
import org.jcnc.jnotepad.component.module.TextCodeArea;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run终端界面。
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author cccqyu
|
|
||||||
*/
|
|
||||||
public class RunBox extends TextCodeArea {
|
|
||||||
|
|
||||||
|
|
||||||
public RunBox() {
|
|
||||||
super();
|
|
||||||
this.setEditable(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setText(String text) {
|
|
||||||
this.appendText(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package org.jcnc.jnotepad.controller;
|
package org.jcnc.jnotepad.controller;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
import org.jcnc.jnotepad.controller.i18n.LocalizationController;
|
||||||
import org.jcnc.jnotepad.plugin.PluginLoader;
|
import org.jcnc.jnotepad.controller.plugin.PluginLoader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资源控制器
|
* 资源控制器
|
||||||
|
|||||||
1
src/main/java/org/jcnc/jnotepad/controller/aReadme.md
Normal file
1
src/main/java/org/jcnc/jnotepad/controller/aReadme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
controller 存放控制器相关的代码,包括事件处理、异常处理等。
|
||||||
@ -1,11 +1,11 @@
|
|||||||
package org.jcnc.jnotepad.controller.cache;
|
package org.jcnc.jnotepad.controller.cache;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
|
import org.jcnc.jnotepad.app.utils.JsonUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
||||||
import org.jcnc.jnotepad.model.entity.Cache;
|
import org.jcnc.jnotepad.model.entity.Cache;
|
||||||
import org.jcnc.jnotepad.util.JsonUtil;
|
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import org.jcnc.jnotepad.app.config.AppConfig;
|
|||||||
|
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.DEFAULT_PROPERTY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.DEFAULT_PROPERTY;
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用程序配置文件控制器
|
* 应用程序配置文件控制器
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插件控制器
|
* 插件控制器
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import java.nio.file.Paths;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.PROGRAM_FILE_DIRECTORY;
|
||||||
import static org.jcnc.jnotepad.common.constants.TextConstants.CHINESE;
|
import static org.jcnc.jnotepad.app.common.constants.TextConstants.CHINESE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用程序配置控制器
|
* 应用程序配置控制器
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
|||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.addNewFileTab;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.addNewFileTab;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新建文件事件的事件处理程序。
|
* 新建文件事件的事件处理程序。
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.controller.config.UserConfigController;
|
import org.jcnc.jnotepad.controller.config.UserConfigController;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.openFileToTab;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.openFileToTab;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打开配置文件事件处理程序。
|
* 打开配置文件事件处理程序。
|
||||||
|
|||||||
@ -3,17 +3,17 @@ package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
|||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.TextConstants;
|
||||||
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.common.constants.TextConstants;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.factory.impl.BasicFileChooserFactory;
|
|
||||||
import org.jcnc.jnotepad.model.entity.Cache;
|
import org.jcnc.jnotepad.model.entity.Cache;
|
||||||
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.factory.impl.BasicFileChooserFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.openFileToTab;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.openFileToTab;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,9 +2,9 @@ package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
|||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import org.jcnc.jnotepad.views.manager.CenterTabPaneManager;
|
import org.jcnc.jnotepad.ui.views.manager.CenterTabPaneManager;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.rename;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.rename;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重命名文件事件处理器。
|
* 重命名文件事件处理器。
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.views.manager.CenterTabPaneManager;
|
import org.jcnc.jnotepad.ui.views.manager.CenterTabPaneManager;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.saveAsFile;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.saveAsFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存文件事件处理器。
|
* 保存文件事件处理器。
|
||||||
|
|||||||
@ -2,9 +2,9 @@ package org.jcnc.jnotepad.controller.event.handler.menuitem;
|
|||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import org.jcnc.jnotepad.views.manager.CenterTabPaneManager;
|
import org.jcnc.jnotepad.ui.views.manager.CenterTabPaneManager;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.saveFile;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.saveFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存文件事件处理程序。
|
* 保存文件事件处理程序。
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package org.jcnc.jnotepad.controller.event.handler.toolbar;
|
|||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import org.jcnc.jnotepad.views.manager.DirectorySidebarManager;
|
import org.jcnc.jnotepad.ui.views.manager.DirectorySidebarManager;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -3,16 +3,16 @@ package org.jcnc.jnotepad.controller.event.handler.toolbar;
|
|||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.TextConstants;
|
||||||
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.common.constants.TextConstants;
|
import org.jcnc.jnotepad.app.utils.FileUtil;
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.factory.impl.BasicDirectoryChooserFactory;
|
|
||||||
import org.jcnc.jnotepad.model.entity.Cache;
|
import org.jcnc.jnotepad.model.entity.Cache;
|
||||||
import org.jcnc.jnotepad.model.entity.DirFileModel;
|
import org.jcnc.jnotepad.model.entity.DirFileModel;
|
||||||
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
||||||
import org.jcnc.jnotepad.util.FileUtil;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.factory.impl.BasicDirectoryChooserFactory;
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
import org.jcnc.jnotepad.ui.views.manager.DirectorySidebarManager;
|
||||||
import org.jcnc.jnotepad.views.manager.DirectorySidebarManager;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package org.jcnc.jnotepad.controller.event.handler.toolbar;
|
|||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import org.jcnc.jnotepad.views.manager.BuildPanelManager;
|
import org.jcnc.jnotepad.ui.views.manager.BuildPanelManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端处理器
|
* 终端处理器
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package org.jcnc.jnotepad.controller.event.handler.toolbar;
|
|||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import org.jcnc.jnotepad.component.stage.setting.SetStage;
|
import org.jcnc.jnotepad.ui.component.stage.setting.SetStage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置按钮事件的事件处理程序。
|
* 设置按钮事件的事件处理程序。
|
||||||
|
|||||||
@ -9,8 +9,8 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.TextConstants.CHINESE;
|
import static org.jcnc.jnotepad.app.common.constants.TextConstants.CHINESE;
|
||||||
import static org.jcnc.jnotepad.common.constants.TextConstants.ENGLISH;
|
import static org.jcnc.jnotepad.app.common.constants.TextConstants.ENGLISH;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 本地化控制器
|
* 本地化控制器
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
package org.jcnc.jnotepad.controller.manager;
|
package org.jcnc.jnotepad.controller.manager;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
import org.jcnc.jnotepad.component.module.interfaces.ControllerAble;
|
import org.jcnc.jnotepad.ui.component.module.interfaces.ControllerAble;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.addNewFileTab;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.addNewFileTab;
|
||||||
import static org.jcnc.jnotepad.util.TabUtil.openFileToTab;
|
import static org.jcnc.jnotepad.app.utils.TabUtil.openFileToTab;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 控制器类,实现 ControllerAble 接口,用于管理文本编辑器的各种操作和事件处理。
|
* 控制器类,实现 ControllerAble 接口,用于管理文本编辑器的各种操作和事件处理。
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package org.jcnc.jnotepad.plugin;
|
package org.jcnc.jnotepad.controller.plugin;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.common.manager.ThreadPoolManager;
|
import org.jcnc.jnotepad.app.common.manager.ThreadPoolManager;
|
||||||
|
import org.jcnc.jnotepad.app.utils.JsonUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.controller.config.PluginConfigController;
|
import org.jcnc.jnotepad.controller.config.PluginConfigController;
|
||||||
import org.jcnc.jnotepad.controller.exception.AppException;
|
import org.jcnc.jnotepad.controller.exception.AppException;
|
||||||
|
import org.jcnc.jnotepad.controller.plugin.interfaces.Plugin;
|
||||||
|
import org.jcnc.jnotepad.controller.plugin.manager.PluginManager;
|
||||||
import org.jcnc.jnotepad.model.entity.PluginDescriptor;
|
import org.jcnc.jnotepad.model.entity.PluginDescriptor;
|
||||||
import org.jcnc.jnotepad.plugin.interfaces.Plugin;
|
|
||||||
import org.jcnc.jnotepad.plugin.manager.PluginManager;
|
|
||||||
import org.jcnc.jnotepad.util.JsonUtil;
|
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.plugin;
|
package org.jcnc.jnotepad.controller.plugin;
|
||||||
|
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
@ -6,11 +6,11 @@ import javafx.scene.control.Label;
|
|||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.factory.impl.BasicFileChooserFactory;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.plugin.manager.PluginManager;
|
import org.jcnc.jnotepad.app.utils.PopUpUtil;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
import org.jcnc.jnotepad.util.PopUpUtil;
|
import org.jcnc.jnotepad.controller.plugin.manager.PluginManager;
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.factory.impl.BasicFileChooserFactory;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
plugin 存放插件相关的代码,包括插件接口和管理器。
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.plugin.interfaces;
|
package org.jcnc.jnotepad.controller.plugin.interfaces;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1,11 +1,11 @@
|
|||||||
package org.jcnc.jnotepad.plugin.manager;
|
package org.jcnc.jnotepad.controller.plugin.manager;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.app.common.manager.ThreadPoolManager;
|
||||||
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
||||||
import org.jcnc.jnotepad.common.manager.ThreadPoolManager;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.PopUpUtil;
|
||||||
import org.jcnc.jnotepad.controller.config.PluginConfigController;
|
import org.jcnc.jnotepad.controller.config.PluginConfigController;
|
||||||
import org.jcnc.jnotepad.model.entity.PluginDescriptor;
|
import org.jcnc.jnotepad.model.entity.PluginDescriptor;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
|
||||||
import org.jcnc.jnotepad.util.PopUpUtil;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -18,7 +18,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.plugin.PluginLoader.readPlugin;
|
import static org.jcnc.jnotepad.controller.plugin.PluginLoader.readPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插件管理器
|
* 插件管理器
|
||||||
1
src/main/java/org/jcnc/jnotepad/model/aReadme.md
Normal file
1
src/main/java/org/jcnc/jnotepad/model/aReadme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
model 存放模型相关的代码,包括实体类和枚举。
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package org.jcnc.jnotepad.model.entity;
|
package org.jcnc.jnotepad.model.entity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import org.jcnc.jnotepad.plugin.interfaces.Plugin;
|
import org.jcnc.jnotepad.controller.plugin.interfaces.Plugin;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|||||||
1
src/main/java/org/jcnc/jnotepad/ui/component/aReadme.md
Normal file
1
src/main/java/org/jcnc/jnotepad/ui/component/aReadme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
component 目录包含可复用的UI组件,如自定义模块。
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.module;
|
package org.jcnc.jnotepad.ui.component.module;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
package org.jcnc.jnotepad.ui.component.module.base;
|
||||||
|
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.layout.BorderPane;
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.interfaces.BorderPaneAble;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽象边界面板类。
|
||||||
|
*
|
||||||
|
* <p>这个抽象类继承自 JavaFX 的 BorderPane 类,实现了 BorderPaneAble 接口,用于管理 UI 组件的布局。</p>
|
||||||
|
*
|
||||||
|
* @author luke
|
||||||
|
*/
|
||||||
|
public abstract class AbstractBorderPane extends BorderPane implements BorderPaneAble {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置顶部组件。
|
||||||
|
*
|
||||||
|
* @param node 顶部组件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setTopComponent(Node node) {
|
||||||
|
setTop(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置底部组件。
|
||||||
|
*
|
||||||
|
* @param node 底部组件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setBottomComponent(Node node) {
|
||||||
|
setBottom(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置左侧组件。
|
||||||
|
*
|
||||||
|
* @param node 左侧组件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setLeftComponent(Node node) {
|
||||||
|
setLeft(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置右侧组件。
|
||||||
|
*
|
||||||
|
* @param node 右侧组件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setRightComponent(Node node) {
|
||||||
|
setRight(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置中心组件。
|
||||||
|
*
|
||||||
|
* @param node 中心组件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setCenterComponent(Node node) {
|
||||||
|
setCenter(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package org.jcnc.jnotepad.ui.component.module.base;
|
||||||
|
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.layout.HBox;
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.interfaces.HorizontalBoxAble;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽象水平盒子类。
|
||||||
|
*
|
||||||
|
* <p>这个抽象类继承自 JavaFX 的 HBox 类,实现了 HorizontalBoxAble 接口,用于管理水平排列的 UI 组件。</p>
|
||||||
|
*
|
||||||
|
* <p>请注意,这个类只是一个抽象类,用于提供基本的水平盒子布局功能。您可以继承此类并添加自己的 UI 组件以构建更复杂的界面。</p>
|
||||||
|
*
|
||||||
|
* @author luke
|
||||||
|
*/
|
||||||
|
public abstract class AbstractHorizontalBox extends HBox implements HorizontalBoxAble {
|
||||||
|
private final HBox hBox;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建一个新的 AbstractHorizontalBox 实例。
|
||||||
|
*/
|
||||||
|
public AbstractHorizontalBox() {
|
||||||
|
hBox = new HBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向水平盒子添加一个节点。
|
||||||
|
*
|
||||||
|
* @param node 要添加的节点
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addChild(Node node) {
|
||||||
|
hBox.getChildren().add(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向水平盒子添加多个节点。
|
||||||
|
*
|
||||||
|
* @param nodes 要添加的节点数组
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addChild(Node... nodes) {
|
||||||
|
hBox.getChildren().addAll(nodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取水平盒子的实例。
|
||||||
|
*
|
||||||
|
* @return 水平盒子实例
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HBox getHorizontalBox() {
|
||||||
|
return hBox;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package org.jcnc.jnotepad.ui.component.module.base;
|
||||||
|
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.layout.VBox;
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.interfaces.VerticalBoxAble;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽象垂直盒子类。
|
||||||
|
*
|
||||||
|
* <p>这个抽象类继承自 JavaFX 的 VBox 类,实现了 VerticalBoxAble 接口,用于管理垂直排列的 UI 组件。</p>
|
||||||
|
*
|
||||||
|
* <p>请注意,这个类只是一个抽象类,用于提供基本的垂直盒子布局功能。您可以继承此类并添加自己的 UI 组件以构建更复杂的界面。</p>
|
||||||
|
*
|
||||||
|
* @author luke
|
||||||
|
*/
|
||||||
|
public abstract class AbstractVerticalBox extends VBox implements VerticalBoxAble {
|
||||||
|
private final VBox vBox;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建一个新的 AbstractVerticalBox 实例。
|
||||||
|
*/
|
||||||
|
public AbstractVerticalBox() {
|
||||||
|
vBox = new VBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向垂直盒子添加一个节点。
|
||||||
|
*
|
||||||
|
* @param node 要添加的节点
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addChild(Node node) {
|
||||||
|
vBox.getChildren().add(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向垂直盒子添加多个节点。
|
||||||
|
*
|
||||||
|
* @param nodes 要添加的节点数组
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addChild(Node... nodes) {
|
||||||
|
vBox.getChildren().addAll(nodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取垂直盒子的实例。
|
||||||
|
*
|
||||||
|
* @return 垂直盒子实例
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public VBox getVerticalBox() {
|
||||||
|
return vBox;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.module.hbox;
|
package org.jcnc.jnotepad.ui.component.module.hbox;
|
||||||
|
|
||||||
import javafx.animation.TranslateTransition;
|
import javafx.animation.TranslateTransition;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
@ -14,11 +14,18 @@ import javafx.util.Duration;
|
|||||||
* 自定义标题栏组件,用于自定义窗口标题栏的显示和交互。
|
* 自定义标题栏组件,用于自定义窗口标题栏的显示和交互。
|
||||||
* 该类提供了窗口图标、标题文本以及最小化、最大化和关闭按钮的功能。
|
* 该类提供了窗口图标、标题文本以及最小化、最大化和关闭按钮的功能。
|
||||||
*
|
*
|
||||||
* @author 许轲
|
* <p>这个类允许用户创建自定义的窗口标题栏,包括图标、标题文本和按钮来最小化、最大化和关闭窗口。</p>
|
||||||
|
*
|
||||||
|
* <p>通过使用 {@link #getInstance()} 方法获取单例实例,然后将其添加到窗口的顶部,即可创建自定义标题栏。</p>
|
||||||
|
*
|
||||||
|
* @author luke
|
||||||
*/
|
*/
|
||||||
public class CustomTitleBarBox extends HBox {
|
public class CustomTitleBarBox extends HBox {
|
||||||
private static CustomTitleBarBox instance;
|
private static CustomTitleBarBox instance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建一个新的 CustomTitleBarBox 实例。
|
||||||
|
*/
|
||||||
public CustomTitleBarBox() {
|
public CustomTitleBarBox() {
|
||||||
// 设置样式和布局
|
// 设置样式和布局
|
||||||
this.setAlignment(Pos.CENTER);
|
this.setAlignment(Pos.CENTER);
|
||||||
@ -65,9 +72,9 @@ public class CustomTitleBarBox extends HBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取标题栏的单例实例
|
* 获取标题栏的单例实例。
|
||||||
*
|
*
|
||||||
* @return CustomTitleBar的单例实例
|
* @return CustomTitleBarBox 的单例实例
|
||||||
*/
|
*/
|
||||||
public static CustomTitleBarBox getInstance() {
|
public static CustomTitleBarBox getInstance() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
@ -77,7 +84,7 @@ public class CustomTitleBarBox extends HBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使窗口可拖动
|
* 使窗口可拖动。
|
||||||
*
|
*
|
||||||
* @param stage 要拖动的窗口的 Stage 对象
|
* @param stage 要拖动的窗口的 Stage 对象
|
||||||
*/
|
*/
|
||||||
@ -1,12 +1,14 @@
|
|||||||
package org.jcnc.jnotepad.component.module.interfaces;
|
package org.jcnc.jnotepad.ui.component.module.interfaces;
|
||||||
|
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 可设置BorderPane子组件的接口
|
* 可设置BorderPane子组件的接口。
|
||||||
*
|
*
|
||||||
* <p>该接口定义了设置BorderPane的各个子组件(上、下、左、右、中)的方法。</p>
|
* <p>该接口定义了设置BorderPane的各个子组件(上、下、左、右、中)的方法。</p>
|
||||||
*
|
*
|
||||||
|
* <p>实现此接口的类可以设置BorderPane布局的各个子组件,以定制UI布局。</p>
|
||||||
|
*
|
||||||
* @author luke
|
* @author luke
|
||||||
*/
|
*/
|
||||||
public interface BorderPaneAble {
|
public interface BorderPaneAble {
|
||||||
@ -1,11 +1,14 @@
|
|||||||
package org.jcnc.jnotepad.component.module.interfaces;
|
package org.jcnc.jnotepad.ui.component.module.interfaces;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 控制器接口类
|
* 控制器接口类。
|
||||||
*
|
*
|
||||||
* <p>该接口定义了控制器的方法,用于打开关联文件并创建 TextArea。</p>
|
* <p>该接口定义了控制器的方法,用于打开关联文件并创建 TextArea。</p>
|
||||||
*
|
*
|
||||||
* @author 许轲
|
* <p>实现此接口的类可以通过调用方法来打开关联文件并创建 TextArea,以执行与文件操作相关的控制逻辑。</p>
|
||||||
|
*
|
||||||
|
* @param <T> 原始参数的类型
|
||||||
|
* @author luke
|
||||||
*/
|
*/
|
||||||
public interface ControllerAble<T> {
|
public interface ControllerAble<T> {
|
||||||
|
|
||||||
@ -1,12 +1,14 @@
|
|||||||
package org.jcnc.jnotepad.component.module.interfaces;
|
package org.jcnc.jnotepad.ui.component.module.interfaces;
|
||||||
|
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 可添加子节点的水平布局接口
|
* 可添加子节点的水平布局接口。
|
||||||
*
|
*
|
||||||
* <p>该接口定义了添加子节点和获取水平布局的方法。</p>
|
* <p>该接口定义了向水平布局添加子节点和获取水平布局的方法。</p>
|
||||||
|
*
|
||||||
|
* <p>实现此接口的类可以使用方法将一个或多个子节点添加到水平布局中,以自定义水平布局的UI组件。</p>
|
||||||
*
|
*
|
||||||
* @author luke
|
* @author luke
|
||||||
*/
|
*/
|
||||||
@ -1,12 +1,14 @@
|
|||||||
package org.jcnc.jnotepad.component.module.interfaces;
|
package org.jcnc.jnotepad.ui.component.module.interfaces;
|
||||||
|
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 可添加子节点的垂直布局接口
|
* 可添加子节点的垂直布局接口。
|
||||||
*
|
*
|
||||||
* <p>该接口定义了添加子节点和获取垂直布局的方法。</p>
|
* <p>该接口定义了向垂直布局添加子节点和获取垂直布局的方法。</p>
|
||||||
|
*
|
||||||
|
* <p>实现此接口的类可以使用方法将一个或多个子节点添加到垂直布局中,以自定义垂直布局的UI组件。</p>
|
||||||
*
|
*
|
||||||
* @author luke
|
* @author luke
|
||||||
*/
|
*/
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
package org.jcnc.jnotepad.ui.component.module.vbox;
|
||||||
|
|
||||||
|
import javafx.scene.control.Tab;
|
||||||
|
import javafx.scene.control.TabPane;
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.vbox.components.CmdTerminalBox;
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.vbox.components.DebugBox;
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.vbox.components.RunBox;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 底部运行、调试和命令终端面板。
|
||||||
|
*
|
||||||
|
* <p>这个类实现了一个包含运行信息、调试信息和命令终端的底部面板。它是TabPane的子类,用于将这三个组件以选项卡的形式显示在底部面板上。</p>
|
||||||
|
*
|
||||||
|
* <p>可以通过调用getInstance方法获取单例实例。</p>
|
||||||
|
*
|
||||||
|
* @see CmdTerminalBox
|
||||||
|
* @see RunBox
|
||||||
|
* @see DebugBox
|
||||||
|
* @see TabPane
|
||||||
|
* @author cccqyu
|
||||||
|
*/
|
||||||
|
public class BuildPanel extends TabPane {
|
||||||
|
|
||||||
|
private static BuildPanel instance = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取BuildPanel的单例实例。
|
||||||
|
*
|
||||||
|
* @return BuildPanel的单例实例
|
||||||
|
*/
|
||||||
|
public static BuildPanel getInstance() {
|
||||||
|
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new BuildPanel();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final CmdTerminalBox cmdTerminalBox;
|
||||||
|
private final RunBox runBox;
|
||||||
|
private final DebugBox debugBox;
|
||||||
|
|
||||||
|
private BuildPanel() {
|
||||||
|
cmdTerminalBox = new CmdTerminalBox();
|
||||||
|
runBox = new RunBox();
|
||||||
|
debugBox = new DebugBox();
|
||||||
|
|
||||||
|
Tab runTab = new Tab("运行", runBox);
|
||||||
|
runTab.setClosable(false);
|
||||||
|
|
||||||
|
Tab buildTab = new Tab("调试", debugBox);
|
||||||
|
buildTab.setClosable(false);
|
||||||
|
|
||||||
|
Tab cmdTab = new Tab("命令终端", cmdTerminalBox);
|
||||||
|
cmdTab.setClosable(false);
|
||||||
|
this.getTabs().addAll(runTab, buildTab, cmdTab);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取命令终端组件。
|
||||||
|
*
|
||||||
|
* @return CmdTerminalBox对象
|
||||||
|
*/
|
||||||
|
public CmdTerminalBox getCmdTerminalBox() {
|
||||||
|
return cmdTerminalBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运行信息组件。
|
||||||
|
*
|
||||||
|
* @return RunBox对象
|
||||||
|
*/
|
||||||
|
public RunBox getRunBox() {
|
||||||
|
return runBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取调试信息组件。
|
||||||
|
*
|
||||||
|
* @return DebugBox对象
|
||||||
|
*/
|
||||||
|
public DebugBox getDebugBox() {
|
||||||
|
return debugBox;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.module.vbox.components;
|
package org.jcnc.jnotepad.ui.component.module.vbox.components;
|
||||||
|
|
||||||
import javafx.animation.KeyFrame;
|
import javafx.animation.KeyFrame;
|
||||||
import javafx.animation.Timeline;
|
import javafx.animation.Timeline;
|
||||||
@ -10,7 +10,7 @@ import javafx.scene.layout.Priority;
|
|||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.util.Duration;
|
import javafx.util.Duration;
|
||||||
import org.fxmisc.richtext.StyleClassedTextArea;
|
import org.fxmisc.richtext.StyleClassedTextArea;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
@ -18,6 +18,12 @@ import java.nio.charset.Charset;
|
|||||||
/**
|
/**
|
||||||
* 命令行终端界面。
|
* 命令行终端界面。
|
||||||
*
|
*
|
||||||
|
* <p>这个类实现了一个简单的命令行终端界面,用于显示命令输出并接受用户输入的命令。</p>
|
||||||
|
*
|
||||||
|
* <p>通过调用构造函数来创建CmdTerminal对象。它包括了一个用于显示命令输出的文本区域和一个用于输入命令的文本框。</p>
|
||||||
|
*
|
||||||
|
* <p>这个终端界面支持基本的命令执行,并将命令输出显示在文本区域中。</p>
|
||||||
|
*
|
||||||
* @author luke
|
* @author luke
|
||||||
*/
|
*/
|
||||||
public class CmdTerminalBox extends VBox {
|
public class CmdTerminalBox extends VBox {
|
||||||
@ -64,7 +70,6 @@ public class CmdTerminalBox extends VBox {
|
|||||||
// 获取当前工作目录的文件夹路径
|
// 获取当前工作目录的文件夹路径
|
||||||
currentDirectory = System.getProperty("user.dir");
|
currentDirectory = System.getProperty("user.dir");
|
||||||
|
|
||||||
|
|
||||||
// 创建并启动cmd进程,使用GBK字符编码
|
// 创建并启动cmd进程,使用GBK字符编码
|
||||||
try {
|
try {
|
||||||
cmdProcess = new ProcessBuilder("cmd.exe")
|
cmdProcess = new ProcessBuilder("cmd.exe")
|
||||||
@ -77,11 +82,9 @@ public class CmdTerminalBox extends VBox {
|
|||||||
LogUtil.getLogger(this.getClass()).info("已调用, {}", cmdProcess);
|
LogUtil.getLogger(this.getClass()).info("已调用, {}", cmdProcess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 延迟执行打印当前文件夹路径的语句
|
// 延迟执行打印当前文件夹路径的语句
|
||||||
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(0.5), event -> {
|
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(0.5), event -> {
|
||||||
appendTextToCmdOutput(currentDirectory + ">" + "\n");
|
appendTextToCmdOutput(currentDirectory + ">" + "\n");
|
||||||
|
|
||||||
}));
|
}));
|
||||||
timeline.setCycleCount(1);
|
timeline.setCycleCount(1);
|
||||||
timeline.play();
|
timeline.play();
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package org.jcnc.jnotepad.ui.component.module.vbox.components;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.TextCodeArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调试信息显示界面。
|
||||||
|
*
|
||||||
|
* <p>这个类实现了一个用于显示调试信息的界面,它是TextCodeArea的子类,并在构造函数中将其设置为不可编辑状态。</p>
|
||||||
|
*
|
||||||
|
* <p>调试信息可以通过调用setText方法将文本添加到界面中。</p>
|
||||||
|
*
|
||||||
|
* @author cccqyu
|
||||||
|
*/
|
||||||
|
public class DebugBox extends TextCodeArea {
|
||||||
|
/**
|
||||||
|
* 创建DebugBox对象的构造函数。
|
||||||
|
*/
|
||||||
|
public DebugBox() {
|
||||||
|
super();
|
||||||
|
this.setEditable(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置调试信息的文本内容。
|
||||||
|
*
|
||||||
|
* @param text 要显示的调试信息文本
|
||||||
|
*/
|
||||||
|
public void setText(String text) {
|
||||||
|
this.appendText(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package org.jcnc.jnotepad.ui.component.module.vbox.components;
|
||||||
|
|
||||||
|
import org.jcnc.jnotepad.ui.component.module.TextCodeArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行信息显示界面。
|
||||||
|
*
|
||||||
|
* <p>这个类实现了一个用于显示运行信息的界面,它是TextCodeArea的子类,并在构造函数中将其设置为不可编辑状态。</p>
|
||||||
|
*
|
||||||
|
* <p>运行信息可以通过调用setText方法将文本添加到界面中。</p>
|
||||||
|
*
|
||||||
|
* @author cccqyu
|
||||||
|
*/
|
||||||
|
public class RunBox extends TextCodeArea {
|
||||||
|
/**
|
||||||
|
* 创建RunBox对象的构造函数。
|
||||||
|
*/
|
||||||
|
public RunBox() {
|
||||||
|
super();
|
||||||
|
this.setEditable(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置运行信息的文本内容。
|
||||||
|
*
|
||||||
|
* @param text 要显示的运行信息文本
|
||||||
|
*/
|
||||||
|
public void setText(String text) {
|
||||||
|
this.appendText(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,13 +1,13 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.dialog;
|
package org.jcnc.jnotepad.ui.component.stage.dialog;
|
||||||
|
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.interfaces.DialogButtonAction;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
import org.jcnc.jnotepad.model.enums.DialogType;
|
import org.jcnc.jnotepad.model.enums.DialogType;
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.interfaces.DialogButtonAction;
|
||||||
import org.kordamp.ikonli.javafx.FontIcon;
|
import org.kordamp.ikonli.javafx.FontIcon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.dialog;
|
package org.jcnc.jnotepad.ui.component.stage.dialog;
|
||||||
|
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
@ -7,7 +7,7 @@ import javafx.scene.layout.BorderPane;
|
|||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.interfaces.DialogButtonAction;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.interfaces.DialogButtonAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用对话框
|
* 应用对话框
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.dialog.factory;
|
package org.jcnc.jnotepad.ui.component.stage.dialog.factory;
|
||||||
|
|
||||||
import javafx.stage.DirectoryChooser;
|
import javafx.stage.DirectoryChooser;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.dialog.factory;
|
package org.jcnc.jnotepad.ui.component.stage.dialog.factory;
|
||||||
|
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.dialog.factory.impl;
|
package org.jcnc.jnotepad.ui.component.stage.dialog.factory.impl;
|
||||||
|
|
||||||
import javafx.stage.DirectoryChooser;
|
import javafx.stage.DirectoryChooser;
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.factory.DirectoryChooserFactory;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.factory.DirectoryChooserFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.dialog.factory.impl;
|
package org.jcnc.jnotepad.ui.component.stage.dialog.factory.impl;
|
||||||
|
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.factory.FileChooserFactory;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.factory.FileChooserFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.dialog.interfaces;
|
package org.jcnc.jnotepad.ui.component.stage.dialog.interfaces;
|
||||||
|
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.AppDialogStage;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.AppDialogStage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对话框按钮点击事件接口
|
* 对话框按钮点击事件接口
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.setting;
|
package org.jcnc.jnotepad.ui.component.stage.setting;
|
||||||
|
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.setting;
|
package org.jcnc.jnotepad.ui.component.stage.setting;
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.setting;
|
package org.jcnc.jnotepad.ui.component.stage.setting;
|
||||||
|
|
||||||
import atlantafx.base.controls.CustomTextField;
|
import atlantafx.base.controls.CustomTextField;
|
||||||
import atlantafx.base.theme.Styles;
|
import atlantafx.base.theme.Styles;
|
||||||
@ -16,24 +16,24 @@ import javafx.scene.text.Font;
|
|||||||
import javafx.scene.text.Text;
|
import javafx.scene.text.Text;
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.TextConstants;
|
||||||
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
import org.jcnc.jnotepad.app.config.AppConfig;
|
import org.jcnc.jnotepad.app.config.AppConfig;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
||||||
import org.jcnc.jnotepad.common.constants.TextConstants;
|
import org.jcnc.jnotepad.app.utils.PopUpUtil;
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
import org.jcnc.jnotepad.component.stage.dialog.factory.impl.BasicDirectoryChooserFactory;
|
|
||||||
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
import org.jcnc.jnotepad.controller.config.AppConfigController;
|
||||||
import org.jcnc.jnotepad.controller.event.handler.toolbar.OpenDirectory;
|
import org.jcnc.jnotepad.controller.event.handler.toolbar.OpenDirectory;
|
||||||
|
import org.jcnc.jnotepad.controller.plugin.PluginManagerInterface;
|
||||||
import org.jcnc.jnotepad.model.entity.Cache;
|
import org.jcnc.jnotepad.model.entity.Cache;
|
||||||
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
||||||
import org.jcnc.jnotepad.plugin.PluginManagerInterface;
|
import org.jcnc.jnotepad.ui.component.stage.dialog.factory.impl.BasicDirectoryChooserFactory;
|
||||||
import org.jcnc.jnotepad.util.PopUpUtil;
|
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.SCREEN_LENGTH;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.SCREEN_LENGTH;
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.SCREEN_WIDTH;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.SCREEN_WIDTH;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SetStage类表示设置窗口的单例对象。此窗口用于显示不同的设置选项和其对应的布局。
|
* SetStage类表示设置窗口的单例对象。此窗口用于显示不同的设置选项和其对应的布局。
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.topmenu.builder;
|
package org.jcnc.jnotepad.ui.component.stage.topmenu.builder;
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.topmenu.help;
|
package org.jcnc.jnotepad.ui.component.stage.topmenu.help;
|
||||||
|
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
@ -10,10 +10,10 @@ import javafx.scene.layout.VBox;
|
|||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jcnc.jnotepad.api.core.component.stage.AbstractPaneStage;
|
import org.jcnc.jnotepad.api.core.component.stage.AbstractPaneStage;
|
||||||
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
import org.jcnc.jnotepad.app.manager.ApplicationManager;
|
||||||
import org.jcnc.jnotepad.component.stage.topmenu.builder.StageButtonBuilder;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.PopUpUtil;
|
||||||
import org.jcnc.jnotepad.util.PopUpUtil;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
import org.jcnc.jnotepad.ui.component.stage.topmenu.builder.StageButtonBuilder;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.topmenu.help;
|
package org.jcnc.jnotepad.ui.component.stage.topmenu.help;
|
||||||
|
|
||||||
import atlantafx.base.theme.Styles;
|
import atlantafx.base.theme.Styles;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
@ -16,12 +16,12 @@ import javafx.scene.layout.VBox;
|
|||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jcnc.jnotepad.api.core.component.stage.AbstractPaneStage;
|
import org.jcnc.jnotepad.api.core.component.stage.AbstractPaneStage;
|
||||||
import org.jcnc.jnotepad.util.ClipboardUtil;
|
import org.jcnc.jnotepad.app.utils.ClipboardUtil;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
import org.jcnc.jnotepad.util.NotificationUtil;
|
import org.jcnc.jnotepad.app.utils.NotificationUtil;
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
|
|
||||||
import static org.jcnc.jnotepad.common.constants.AppConstants.*;
|
import static org.jcnc.jnotepad.app.common.constants.AppConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 帮助页面
|
* 帮助页面
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.topmenu.plugin;
|
package org.jcnc.jnotepad.ui.component.stage.topmenu.plugin;
|
||||||
|
|
||||||
import javafx.geometry.Orientation;
|
import javafx.geometry.Orientation;
|
||||||
import javafx.scene.control.SplitPane;
|
import javafx.scene.control.SplitPane;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.component.stage.topmenu.plugin;
|
package org.jcnc.jnotepad.ui.component.stage.topmenu.plugin;
|
||||||
|
|
||||||
import atlantafx.base.controls.Tile;
|
import atlantafx.base.controls.Tile;
|
||||||
import atlantafx.base.controls.ToggleSwitch;
|
import atlantafx.base.controls.ToggleSwitch;
|
||||||
@ -26,12 +26,12 @@ import javafx.stage.Stage;
|
|||||||
import org.commonmark.parser.Parser;
|
import org.commonmark.parser.Parser;
|
||||||
import org.commonmark.renderer.html.HtmlRenderer;
|
import org.commonmark.renderer.html.HtmlRenderer;
|
||||||
import org.jcnc.jnotepad.api.core.component.stage.AbstractPaneStage;
|
import org.jcnc.jnotepad.api.core.component.stage.AbstractPaneStage;
|
||||||
import org.jcnc.jnotepad.component.stage.setting.CustomSetButton;
|
import org.jcnc.jnotepad.app.utils.LogUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.PopUpUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.UiUtil;
|
||||||
|
import org.jcnc.jnotepad.controller.plugin.manager.PluginManager;
|
||||||
import org.jcnc.jnotepad.model.entity.PluginDescriptor;
|
import org.jcnc.jnotepad.model.entity.PluginDescriptor;
|
||||||
import org.jcnc.jnotepad.plugin.manager.PluginManager;
|
import org.jcnc.jnotepad.ui.component.stage.setting.CustomSetButton;
|
||||||
import org.jcnc.jnotepad.util.LogUtil;
|
|
||||||
import org.jcnc.jnotepad.util.PopUpUtil;
|
|
||||||
import org.jcnc.jnotepad.util.UiUtil;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
1
src/main/java/org/jcnc/jnotepad/ui/views/aReadme.md
Normal file
1
src/main/java/org/jcnc/jnotepad/ui/views/aReadme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
view 存放与视图相关的代码。
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package org.jcnc.jnotepad.views.manager;
|
package org.jcnc.jnotepad.ui.views.manager;
|
||||||
|
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
@ -10,12 +10,12 @@ import javafx.scene.control.Label;
|
|||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
import org.jcnc.jnotepad.api.core.views.manager.builder.BottomStatusBoxButtonBuilder;
|
import org.jcnc.jnotepad.api.core.views.manager.builder.BottomStatusBoxButtonBuilder;
|
||||||
|
import org.jcnc.jnotepad.app.common.constants.TextConstants;
|
||||||
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
import org.jcnc.jnotepad.app.i18n.UiResourceBundle;
|
||||||
import org.jcnc.jnotepad.common.constants.TextConstants;
|
import org.jcnc.jnotepad.ui.component.module.TextCodeArea;
|
||||||
import org.jcnc.jnotepad.component.module.TextCodeArea;
|
import org.jcnc.jnotepad.ui.views.root.bottom.status.BottomStatusBox;
|
||||||
import org.jcnc.jnotepad.views.root.bottom.status.BottomStatusBox;
|
import org.jcnc.jnotepad.ui.views.root.center.main.center.tab.CenterTab;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.center.tab.CenterTab;
|
import org.jcnc.jnotepad.ui.views.root.center.main.center.tab.CenterTabPane;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.center.tab.CenterTabPane;
|
|
||||||
import org.kordamp.ikonli.javafx.FontIcon;
|
import org.kordamp.ikonli.javafx.FontIcon;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package org.jcnc.jnotepad.views.manager;
|
package org.jcnc.jnotepad.ui.views.manager;
|
||||||
|
|
||||||
import javafx.scene.control.SplitPane;
|
import javafx.scene.control.SplitPane;
|
||||||
import org.jcnc.jnotepad.component.module.TextCodeArea;
|
import org.jcnc.jnotepad.ui.component.module.TextCodeArea;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.MainBorderPane;
|
import org.jcnc.jnotepad.ui.views.root.center.main.MainBorderPane;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建底部三大菜单管理类
|
* 构建底部三大菜单管理类
|
||||||
@ -1,18 +1,18 @@
|
|||||||
package org.jcnc.jnotepad.views.manager;
|
package org.jcnc.jnotepad.ui.views.manager;
|
||||||
|
|
||||||
import javafx.collections.ListChangeListener;
|
import javafx.collections.ListChangeListener;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
import org.jcnc.jnotepad.component.module.TextCodeArea;
|
import org.jcnc.jnotepad.app.utils.FileUtil;
|
||||||
|
import org.jcnc.jnotepad.app.utils.PopUpUtil;
|
||||||
import org.jcnc.jnotepad.controller.config.UserConfigController;
|
import org.jcnc.jnotepad.controller.config.UserConfigController;
|
||||||
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
import org.jcnc.jnotepad.model.enums.CacheExpirationTime;
|
||||||
import org.jcnc.jnotepad.util.FileUtil;
|
import org.jcnc.jnotepad.ui.component.module.TextCodeArea;
|
||||||
import org.jcnc.jnotepad.util.PopUpUtil;
|
import org.jcnc.jnotepad.ui.views.root.center.main.center.tab.CenterTab;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.center.tab.CenterTab;
|
import org.jcnc.jnotepad.ui.views.root.center.main.center.tab.CenterTabPane;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.center.tab.CenterTabPane;
|
import org.jcnc.jnotepad.ui.views.root.top.menubar.TopMenuBar;
|
||||||
import org.jcnc.jnotepad.views.root.top.menubar.TopMenuBar;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -1,15 +1,15 @@
|
|||||||
package org.jcnc.jnotepad.views.manager;
|
package org.jcnc.jnotepad.ui.views.manager;
|
||||||
|
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
import javafx.scene.control.SplitPane;
|
import javafx.scene.control.SplitPane;
|
||||||
import javafx.scene.control.TreeItem;
|
import javafx.scene.control.TreeItem;
|
||||||
import org.jcnc.jnotepad.common.constants.SplitPaneItemConstants;
|
import org.jcnc.jnotepad.app.common.constants.SplitPaneItemConstants;
|
||||||
import org.jcnc.jnotepad.common.manager.ApplicationCacheManager;
|
import org.jcnc.jnotepad.app.common.manager.ApplicationCacheManager;
|
||||||
|
import org.jcnc.jnotepad.app.utils.FileUtil;
|
||||||
import org.jcnc.jnotepad.controller.event.handler.toolbar.OpenDirectory;
|
import org.jcnc.jnotepad.controller.event.handler.toolbar.OpenDirectory;
|
||||||
import org.jcnc.jnotepad.model.entity.DirFileModel;
|
import org.jcnc.jnotepad.model.entity.DirFileModel;
|
||||||
import org.jcnc.jnotepad.util.FileUtil;
|
import org.jcnc.jnotepad.ui.views.root.center.main.MainBorderPane;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.MainBorderPane;
|
import org.jcnc.jnotepad.ui.views.root.center.main.center.directory.DirectorySidebarPane;
|
||||||
import org.jcnc.jnotepad.views.root.center.main.center.directory.DirectorySidebarPane;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user