删除 .gitignore

This commit is contained in:
octopusYan 2022-04-11 00:30:32 +08:00
parent 2c327bbd69
commit 9c581f3a7c
3 changed files with 20 additions and 120 deletions

114
.gitignore vendored
View File

@ -1,114 +0,0 @@
# ---> Java
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# ---> Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
# ---> JetBrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

View File

@ -73,9 +73,9 @@ public class YanFrpApplication extends Application {
try { try {
// 静态写法无法获取controler // 静态写法无法获取controler
// StackPane root = new FXMLLoader(this.getClass().getResource("/fxml/login.fxml")).load();//底层面板 // StackPane root = FXMLLoader.load(getClass().getResource("/fxml/login.fxml"));
FXMLLoader fxmlLoader = FxmlUtil.init("/fxml/login.fxml");
FXMLLoader fxmlLoader = FxmlUtil.init("/fxml/login.fxml");
StackPane root = fxmlLoader.load();//底层面板 StackPane root = fxmlLoader.load();//底层面板
stage.initStyle(StageStyle.TRANSPARENT); stage.initStyle(StageStyle.TRANSPARENT);
Scene scene = new Scene( Scene scene = new Scene(

View File

@ -2,6 +2,10 @@ package top.octopusyan.utils;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory; import javafx.fxml.JavaFXBuilderFactory;
import sun.reflect.Reflection;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/** /**
* <p> author : octopus yan * <p> author : octopus yan
@ -11,10 +15,20 @@ import javafx.fxml.JavaFXBuilderFactory;
*/ */
public class FxmlUtil { public class FxmlUtil {
// public static FXMLLoader init(String path) {
// FXMLLoader fxmlLoader = new FXMLLoader();
// fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
// fxmlLoader.setLocation(FxmlUtil.class.getResource(path));
// return fxmlLoader;
// }
public static FXMLLoader init(String path) { public static FXMLLoader init(String path) {
FXMLLoader fxmlLoader = new FXMLLoader(); return new FXMLLoader(
fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory()); FxmlUtil.class.getResource(path),
fxmlLoader.setLocation(FxmlUtil.class.getResource(path)); null,
return fxmlLoader; new JavaFXBuilderFactory(),
null,
StandardCharsets.UTF_8
);
} }
} }