├── .editorconfig ├── .gitignore ├── CNAME ├── LICENSE ├── README.md ├── README_EN.md ├── assets ├── linux │ └── xJavaFxTool.png ├── mac │ └── xJavaFxTool.icns └── windows │ └── xJavaFxTool.ico ├── build.gradle ├── gradlew ├── gradlew.bat ├── images ├── Cron表达式生成器.gif ├── json格式化编辑工具.gif ├── json格式化编辑工具.png ├── 二维码生成工具.gif ├── 传输工具.gif ├── 加密解密.gif ├── 文件编码检测工具.png ├── 正则表达式生成工具.gif ├── 猜数字游戏.png └── 编码检测工具.gif ├── pom.xml ├── settings.gradle └── src ├── main ├── java │ ├── com │ │ └── xwintop │ │ │ └── xJavaFxTool │ │ │ ├── AppException.java │ │ │ ├── XJavaFxToolApplication.java │ │ │ ├── XJavaFxToolMain.java │ │ │ ├── common │ │ │ └── logback │ │ │ │ └── ConsoleLogAppender.java │ │ │ ├── controller │ │ │ ├── IndexController.java │ │ │ ├── index │ │ │ │ ├── PluginManageController.java │ │ │ │ └── SystemSettingController.java │ │ │ └── plugin │ │ │ │ ├── PluginCategoryController.java │ │ │ │ └── PluginItemController.java │ │ │ ├── event │ │ │ ├── AppEvent.java │ │ │ ├── AppEvents.java │ │ │ └── PluginEvent.java │ │ │ ├── model │ │ │ ├── PluginJarInfo.java │ │ │ └── ToolFxmlLoaderConfiguration.java │ │ │ ├── plugin │ │ │ ├── PluginClassLoader.java │ │ │ ├── PluginContainer.java │ │ │ ├── PluginManager.java │ │ │ └── PluginParser.java │ │ │ ├── services │ │ │ ├── IndexService.java │ │ │ └── index │ │ │ │ ├── PluginManageService.java │ │ │ │ └── SystemSettingService.java │ │ │ ├── utils │ │ │ ├── Config.java │ │ │ ├── StageUtils.java │ │ │ ├── VersionChecker.java │ │ │ └── XJavaFxSystemUtil.java │ │ │ └── view │ │ │ ├── IndexView.java │ │ │ └── index │ │ │ ├── PluginManageView.java │ │ │ └── SystemSettingView.java │ └── module-info.java.bak └── resources │ ├── banner.txt │ ├── com │ └── xwintop │ │ └── xJavaFxTool │ │ └── fxmlView │ │ ├── Index.fxml │ │ ├── index │ │ ├── PluginManage.fxml │ │ └── SystemSetting.fxml │ │ └── plugin │ │ ├── main.css │ │ ├── plugin-category.fxml │ │ └── plugin-item.fxml │ ├── css │ ├── ideaStyle.css │ ├── jfoenix-main.css │ └── style.css │ ├── images │ ├── icon.jpg │ └── plugin.png │ ├── locale │ ├── Menu.properties │ └── Menu_en_US.properties │ ├── logback.xml │ └── web │ └── monaco-editor-0.33.0 │ ├── index.html │ └── package │ └── min │ └── vs │ ├── base │ ├── browser │ │ └── ui │ │ │ └── codicons │ │ │ └── codicon │ │ │ └── codicon.ttf │ └── worker │ │ └── workerMain.js │ ├── basic-languages │ ├── abap │ │ └── abap.js │ ├── apex │ │ └── apex.js │ ├── azcli │ │ └── azcli.js │ ├── bat │ │ └── bat.js │ ├── bicep │ │ └── bicep.js │ ├── cameligo │ │ └── cameligo.js │ ├── clojure │ │ └── clojure.js │ ├── coffee │ │ └── coffee.js │ ├── cpp │ │ └── cpp.js │ ├── csharp │ │ └── csharp.js │ ├── csp │ │ └── csp.js │ ├── css │ │ └── css.js │ ├── dart │ │ └── dart.js │ ├── dockerfile │ │ └── dockerfile.js │ ├── ecl │ │ └── ecl.js │ ├── elixir │ │ └── elixir.js │ ├── flow9 │ │ └── flow9.js │ ├── freemarker2 │ │ └── freemarker2.js │ ├── fsharp │ │ └── fsharp.js │ ├── go │ │ └── go.js │ ├── graphql │ │ └── graphql.js │ ├── handlebars │ │ └── handlebars.js │ ├── hcl │ │ └── hcl.js │ ├── html │ │ └── html.js │ ├── ini │ │ └── ini.js │ ├── java │ │ └── java.js │ ├── javascript │ │ └── javascript.js │ ├── julia │ │ └── julia.js │ ├── kotlin │ │ └── kotlin.js │ ├── less │ │ └── less.js │ ├── lexon │ │ └── lexon.js │ ├── liquid │ │ └── liquid.js │ ├── lua │ │ └── lua.js │ ├── m3 │ │ └── m3.js │ ├── markdown │ │ └── markdown.js │ ├── mips │ │ └── mips.js │ ├── msdax │ │ └── msdax.js │ ├── mysql │ │ └── mysql.js │ ├── objective-c │ │ └── objective-c.js │ ├── pascal │ │ └── pascal.js │ ├── pascaligo │ │ └── pascaligo.js │ ├── perl │ │ └── perl.js │ ├── pgsql │ │ └── pgsql.js │ ├── php │ │ └── php.js │ ├── pla │ │ └── pla.js │ ├── postiats │ │ └── postiats.js │ ├── powerquery │ │ └── powerquery.js │ ├── powershell │ │ └── powershell.js │ ├── protobuf │ │ └── protobuf.js │ ├── pug │ │ └── pug.js │ ├── python │ │ └── python.js │ ├── qsharp │ │ └── qsharp.js │ ├── r │ │ └── r.js │ ├── razor │ │ └── razor.js │ ├── redis │ │ └── redis.js │ ├── redshift │ │ └── redshift.js │ ├── restructuredtext │ │ └── restructuredtext.js │ ├── ruby │ │ └── ruby.js │ ├── rust │ │ └── rust.js │ ├── sb │ │ └── sb.js │ ├── scala │ │ └── scala.js │ ├── scheme │ │ └── scheme.js │ ├── scss │ │ └── scss.js │ ├── shell │ │ └── shell.js │ ├── solidity │ │ └── solidity.js │ ├── sophia │ │ └── sophia.js │ ├── sparql │ │ └── sparql.js │ ├── sql │ │ └── sql.js │ ├── st │ │ └── st.js │ ├── swift │ │ └── swift.js │ ├── systemverilog │ │ └── systemverilog.js │ ├── tcl │ │ └── tcl.js │ ├── twig │ │ └── twig.js │ ├── typescript │ │ └── typescript.js │ ├── vb │ │ └── vb.js │ ├── xml │ │ └── xml.js │ └── yaml │ │ └── yaml.js │ ├── editor │ ├── editor.main.css │ ├── editor.main.js │ ├── editor.main.nls.de.js │ ├── editor.main.nls.es.js │ ├── editor.main.nls.fr.js │ ├── editor.main.nls.it.js │ ├── editor.main.nls.ja.js │ ├── editor.main.nls.js │ ├── editor.main.nls.ko.js │ ├── editor.main.nls.ru.js │ ├── editor.main.nls.zh-cn.js │ └── editor.main.nls.zh-tw.js │ ├── language │ ├── css │ │ ├── cssMode.js │ │ └── cssWorker.js │ ├── html │ │ ├── htmlMode.js │ │ └── htmlWorker.js │ ├── json │ │ ├── jsonMode.js │ │ └── jsonWorker.js │ └── typescript │ │ ├── tsMode.js │ │ └── tsWorker.js │ └── loader.js └── test ├── java └── com │ └── xwintop │ └── xJavaFxTool │ ├── event │ └── AppEventsTest.java │ ├── javafx │ ├── PluginProgectBuildTool.java │ ├── PluginProgectPomBuildTool.java │ └── tool │ │ └── TableBeanTool.java │ └── plugin │ └── PluginParserTest.java └── resources └── server-side-plugin-list.json /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | insert_final_newline = false 5 | indent_style = space 6 | indent_size = 4 7 | 8 | [*.{html, xml, yaml, fxml}] 9 | indent_size = 2 10 | 11 | [*.java] 12 | ij_any_blank_lines_around_field = 1 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | #/.gitignore 3 | .idea/ 4 | *.iml 5 | 6 | logs/ 7 | target/ 8 | libs/ 9 | devLibs 10 | 11 | system_plugin_list.json 12 | RUNNING_PID 13 | gradle 14 | .gradle 15 | build 16 | out 17 | .murphy.yml 18 | ./config 19 | 20 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | xjavafxtool.xwintop.com -------------------------------------------------------------------------------- /assets/linux/xJavaFxTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/assets/linux/xJavaFxTool.png -------------------------------------------------------------------------------- /assets/mac/xJavaFxTool.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/assets/mac/xJavaFxTool.icns -------------------------------------------------------------------------------- /assets/windows/xJavaFxTool.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/assets/windows/xJavaFxTool.ico -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | maven { 4 | url "https://plugins.gradle.org/m2/" 5 | } 6 | } 7 | dependencies { 8 | classpath 'org.openjfx:javafx-plugin:0.0.12' 9 | } 10 | } 11 | 12 | plugins { 13 | id 'java' 14 | id 'application' 15 | id 'maven-publish' 16 | id 'org.openjfx.javafxplugin' version '0.0.12' 17 | id 'org.beryx.jlink' version '2.24.4' 18 | } 19 | 20 | apply plugin: 'org.openjfx.javafxplugin' 21 | 22 | repositories { 23 | mavenLocal() 24 | maven { 25 | url = uri('https://maven.aliyun.com/repository/public') 26 | } 27 | 28 | maven { 29 | url = uri('https://jitpack.io') 30 | } 31 | } 32 | 33 | dependencies { 34 | implementation 'org.openjfx:javafx-controls:17.0.2' 35 | implementation 'org.openjfx:javafx-base:17.0.2' 36 | implementation 'org.openjfx:javafx-graphics:17.0.2' 37 | implementation 'org.openjfx:javafx-fxml:17.0.2' 38 | implementation 'org.openjfx:javafx-swing:17.0.2' 39 | implementation 'org.openjfx:javafx-media:17.0.2' 40 | implementation 'org.openjfx:javafx-web:17.0.2' 41 | implementation 'org.openjfx:javafx-graphics:17.0.2' 42 | implementation 'org.openjfx:javafx-graphics:17.0.2' 43 | implementation 'org.openjfx:javafx-graphics:17.0.2' 44 | implementation 'io.github.classgraph:classgraph:4.8.100' 45 | implementation 'com.gitee.xwintop:xcore:0.0.6-jdk17' 46 | implementation 'com.github.oshi:oshi-core:5.7.5' 47 | testImplementation 'junit:junit:4.12' 48 | compileOnly 'org.projectlombok:lombok:1.18.22' 49 | } 50 | 51 | group = 'com.xwintop' 52 | version = '0.2.3-jdk17' 53 | description = 'xJavaFxTool' 54 | sourceCompatibility = '17' 55 | 56 | javafx { 57 | version = "17.0.2" 58 | modules = ['javafx.controls', 'javafx.fxml', 'javafx.media', 'javafx.swing', 'javafx.web'] 59 | configuration = 'compileOnly' 60 | } 61 | 62 | jlink { 63 | // mergedModule { 64 | // requires 'java.naming' 65 | // requires 'java.xml' 66 | // } 67 | launcher{ 68 | name = 'xJavaFxTool' 69 | mainClassName = 'com.xwintop.xJavaFxTool.XJavaFxToolMain' 70 | jvmArgs = ['-Dlogback.configurationFile=./logback.xml'] 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /images/Cron表达式生成器.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/Cron表达式生成器.gif -------------------------------------------------------------------------------- /images/json格式化编辑工具.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/json格式化编辑工具.gif -------------------------------------------------------------------------------- /images/json格式化编辑工具.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/json格式化编辑工具.png -------------------------------------------------------------------------------- /images/二维码生成工具.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/二维码生成工具.gif -------------------------------------------------------------------------------- /images/传输工具.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/传输工具.gif -------------------------------------------------------------------------------- /images/加密解密.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/加密解密.gif -------------------------------------------------------------------------------- /images/文件编码检测工具.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/文件编码检测工具.png -------------------------------------------------------------------------------- /images/正则表达式生成工具.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/正则表达式生成工具.gif -------------------------------------------------------------------------------- /images/猜数字游戏.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/猜数字游戏.png -------------------------------------------------------------------------------- /images/编码检测工具.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/864381832/xJavaFxTool/d1fc254fc9bb196a5e1e24c428f5897c5146fc68/images/编码检测工具.gif -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | */ 4 | 5 | rootProject.name = 'xJavaFxTool' 6 | -------------------------------------------------------------------------------- /src/main/java/com/xwintop/xJavaFxTool/AppException.java: -------------------------------------------------------------------------------- 1 | package com.xwintop.xJavaFxTool; 2 | 3 | public class AppException extends RuntimeException { 4 | 5 | public AppException() { 6 | } 7 | 8 | public AppException(String message) { 9 | super(message); 10 | } 11 | 12 | public AppException(String message, Throwable cause) { 13 | super(message, cause); 14 | } 15 | 16 | public AppException(Throwable cause) { 17 | super(cause); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/xwintop/xJavaFxTool/XJavaFxToolApplication.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) [2019] [xufeng] 3 | * [xJavaFxTool] is licensed under Mulan PSL v2. 4 | * You can use this software according to the terms and conditions of the Mulan PSL v2. 5 | * You may obtain a copy of Mulan PSL v2 at: 6 | * http://license.coscl.org.cn/MulanPSL2 7 | * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 8 | * See the Mulan PSL v2 for more details. 9 | */ 10 | 11 | package com.xwintop.xJavaFxTool; 12 | 13 | import com.xwintop.xJavaFxTool.controller.IndexController; 14 | import com.xwintop.xJavaFxTool.utils.Config; 15 | import com.xwintop.xJavaFxTool.utils.Config.Keys; 16 | import com.xwintop.xJavaFxTool.utils.StageUtils; 17 | import com.xwintop.xJavaFxTool.utils.VersionChecker; 18 | import com.xwintop.xJavaFxTool.utils.XJavaFxSystemUtil; 19 | import com.xwintop.xcore.javafx.FxApp; 20 | import com.xwintop.xcore.javafx.dialog.FxAlerts; 21 | import javafx.application.Application; 22 | import javafx.application.Platform; 23 | import javafx.event.Event; 24 | import javafx.fxml.FXMLLoader; 25 | import javafx.scene.Parent; 26 | import javafx.scene.Scene; 27 | import javafx.stage.Stage; 28 | import lombok.extern.slf4j.Slf4j; 29 | 30 | import java.io.IOException; 31 | import java.util.ResourceBundle; 32 | 33 | /** 34 | * JavaFX 入口,从 Java 9+ 开始入口类不应再包含 main 方法。 35 | */ 36 | @Slf4j 37 | public class XJavaFxToolApplication extends Application { 38 | 39 | public static final String LOGO_PATH = "/images/icon.jpg"; 40 | 41 | public static ResourceBundle RESOURCE_BUNDLE; 42 | 43 | private static Stage stage; 44 | 45 | @Override 46 | public void start(Stage primaryStage) throws Exception { 47 | XJavaFxSystemUtil.initSystemLocal(); // 初始化本地语言 48 | stage = primaryStage; 49 | 50 | // 初始化 JavaFX 全局设置 51 | FxApp.init(primaryStage, LOGO_PATH); 52 | FxApp.styleSheets.add(XJavaFxToolApplication.class.getResource("/css/jfoenix-main.css").toExternalForm()); 53 | 54 | // if (SystemUtil.getOsInfo().isMac()) { 55 | //Mac下设置dock栏图标 56 | // Taskbar.getTaskbar().setIconImage(ImageIO.read(XJavaFxToolApplication.class.getResourceAsStream(LOGO_PATH))); 57 | // } 58 | 59 | primaryStage.setResizable(true); 60 | primaryStage.setTitle(RESOURCE_BUNDLE.getString("Title") + Config.xJavaFxToolVersions); 61 | primaryStage.setOnCloseRequest(this::confirmExit); 62 | 63 | // 只启用新UI,因为: 64 | // 1. 新UI启动时不扫描插件目录,启动更快; 65 | // 2. 新UI使用独立的ClassLoader加载插件,兼容性更好; 66 | // 3. 新UI本身体验较好。 67 | loadClassicUI(primaryStage); 68 | 69 | StageUtils.loadPrimaryStageBound(primaryStage); 70 | primaryStage.setOnShown(windowEvent -> VersionChecker.checkNewVersion()); 71 | primaryStage.show(); 72 | } 73 | 74 | private void loadClassicUI(Stage primaryStage) throws IOException { 75 | FXMLLoader fXMLLoader = IndexController.getFXMLLoader(); 76 | Parent root = fXMLLoader.load(); 77 | primaryStage.setScene(new Scene(root)); 78 | } 79 | 80 | private void confirmExit(Event event) { 81 | if (Config.getBoolean(Keys.ConfirmExit, true)) { 82 | if (FxAlerts.confirmYesNo("退出应用", "确定要退出吗?")) { 83 | doExit(); 84 | } else if (event != null) { 85 | event.consume(); 86 | } 87 | } else { 88 | doExit(); 89 | } 90 | } 91 | 92 | private void doExit() { 93 | StageUtils.savePrimaryStageBound(stage); 94 | Platform.exit(); 95 | System.exit(0); 96 | } 97 | 98 | public static Stage getStage() { 99 | return stage; 100 | } 101 | 102 | public static void setStage(Stage stage) { 103 | XJavaFxToolApplication.stage = stage; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/com/xwintop/xJavaFxTool/XJavaFxToolMain.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) [2019] [xufeng] 3 | * [xJavaFxTool] is licensed under Mulan PSL v2. 4 | * You can use this software according to the terms and conditions of the Mulan PSL v2. 5 | * You may obtain a copy of Mulan PSL v2 at: 6 | * http://license.coscl.org.cn/MulanPSL2 7 | * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 8 | * See the Mulan PSL v2 for more details. 9 | */ 10 | package com.xwintop.xJavaFxTool; 11 | 12 | import javafx.application.Application; 13 | import lombok.extern.slf4j.Slf4j; 14 | 15 | /** 16 | * 程序入口 17 | */ 18 | @Slf4j 19 | public class XJavaFxToolMain { 20 | public static void main(String[] args) { 21 | Application.launch(XJavaFxToolApplication.class, args); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/xwintop/xJavaFxTool/common/logback/ConsoleLogAppender.java: -------------------------------------------------------------------------------- 1 | package com.xwintop.xJavaFxTool.common.logback; 2 | 3 | import ch.qos.logback.classic.Level; 4 | import ch.qos.logback.classic.spi.ILoggingEvent; 5 | import ch.qos.logback.core.OutputStreamAppender; 6 | import com.xwintop.xcore.util.javafx.TooltipUtil; 7 | import javafx.scene.control.TextArea; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import org.jetbrains.annotations.NotNull; 11 | 12 | import java.io.IOException; 13 | import java.io.OutputStream; 14 | import java.util.ArrayList; 15 | import java.util.List; 16 | 17 | /** 18 | * @ClassName: ConsoleLogAppender 19 | * @Description: 日志打印控制台 20 | * @author: xufeng 21 | * @date: 2019/4/25 0025 23:18 22 | */ 23 | 24 | @EqualsAndHashCode(callSuper = true) 25 | @Data 26 | public class ConsoleLogAppender extends OutputStreamAppender { 27 | public final static List