diff --git a/README.md b/README.md
index ab4cc77..c4516ae 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
# fx-falsework
基于javafx、spring boot 开发的客户端与服务端系统开发脚手架。本项目目的是帮助快速构建javafx系统,前后端分离,客户端UI提供明暗两种主题,与服务端通信用的是OpenFeign。服务端是标准的spring-boot工程。
+#qq交流群:114697782
+
# 说明:
1.当前数据库为达梦数据库,可自行换其它数据库,在server端引入所用数据库jar,并修改server端application.yml相应配置即可
@@ -16,7 +18,7 @@
6.用户名:admin 密码:111111
7.提供明色和暗色两个主题
-
+
# 界面:
登录
diff --git a/falsework-client/pom.xml b/falsework-client/pom.xml
index 970d0b2..def5598 100644
--- a/falsework-client/pom.xml
+++ b/falsework-client/pom.xml
@@ -170,6 +170,16 @@
lombok
1.18.16
+
+
+
+
+
+
+ org.jetbrains.kotlin
+ kotlin-compiler
+ 1.0.6
+
diff --git a/falsework-client/src/main/java/com/fx/client/AppStartup.java b/falsework-client/src/main/java/com/fx/client/AppStartup.java
index 466468c..db4fc37 100644
--- a/falsework-client/src/main/java/com/fx/client/AppStartup.java
+++ b/falsework-client/src/main/java/com/fx/client/AppStartup.java
@@ -27,7 +27,7 @@ import java.io.InputStream;
/**
- * @description:
+ * @description: 应用启动类
* @className: AppStartup
* @author: liwen
* @date: 2019-08-26 16:24
@@ -55,17 +55,12 @@ public class AppStartup extends Application {
@Override
public void start(Stage stage) throws Exception {
- String keyPrefix = "";
-// //全局样式
-// setUserAgentStylesheet(null);
-// StyleManager.getInstance().addUserAgentStylesheet("css/app-light.css");
new Thread(() -> {
try {
SVGGlyphLoader.loadGlyphsFont(AppStartup.class.getResourceAsStream("/fonts/icon_font/iconfont.svg"),
ApplicatonStore.ICON_FONT_KEY);
-// SVGGlyphLoader.loadGlyphsFont(AppStartup.class.getResourceAsStream("/fonts/icon_font/icon-font-solid.svg"),
-// "IconFontSolid.svg");
+
} catch (IOException ioExc) {
ioExc.printStackTrace();
}
@@ -83,15 +78,13 @@ public class AppStartup extends Application {
wfxDecorator.setCustomMaximize(true);
wfxDecorator.setGraphic(new SVGGlyph(""));
-
-
Scene scene = new Scene(wfxDecorator, 1000, 750);
stage.setTitle("JavaFX Welcome");
scene.setFill(Color.TRANSPARENT);
stage.setScene(scene);
stage.show();
-
+ /*全局样式*/
scene.getStylesheets().addAll(JFoenixResources.load("/css/app-fonts.css").toExternalForm(), AppStartup.class.getResource("/css/login.css").toExternalForm(), AppStartup.class.getResource("/css/app-light.css").toExternalForm());
}
@@ -101,4 +94,8 @@ public class AppStartup extends Application {
WSClient.getInstance().close();
}
+
+ public static void main(String[] args) {
+ launch(args);
+ }
}
diff --git a/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoginController.java b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoginController.java
index b2241af..9a3b987 100644
--- a/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoginController.java
+++ b/falsework-client/src/main/java/com/fx/client/gui/uicomponents/login/LoginController.java
@@ -77,10 +77,10 @@ public class LoginController {
@FXML
private StackPane centerPane;
- //正面视图
+ /*正面视图*/
@FXML
public HBox loginPane;
- //反面视图
+ /*反面视图*/
@FXML
public HBox registeredPane;
@FXML
@@ -113,11 +113,11 @@ public class LoginController {
private JFXPasswordField rePwd2TextField;
@FXML
private RegexValidator regexValidatorPwd2;
- //翻转角度
+ /*翻转角度*/
private DoubleProperty angleProperty = new SimpleDoubleProperty(Math.PI / 2);
- //正面翻转特效
+ /*正面翻转特效*/
private PerspectiveTransform frontEffect = new PerspectiveTransform();
- //反面翻转特效
+ /*反面翻转特效*/
private PerspectiveTransform backEffect = new PerspectiveTransform();
private Timeline frontTimeLine = new Timeline();
private Timeline backTimeLine = new Timeline();
@@ -128,9 +128,6 @@ public class LoginController {
private DoubleProperty imageHeiht = new SimpleDoubleProperty();
-// @Inject
-// private WebSocketManagement webSocketManagement;
-
@FXML
@ActionTrigger("login")
private JFXButton loginBut;
@@ -261,7 +258,7 @@ public class LoginController {
logBack.fitWidthProperty().bind(imageWidth);
imagePane.getChildren().add(new Label("", logBack));
- String imgUrl=this.getClass().getClassLoader().getResource("").toURI().getPath()+"images/login";
+ String imgUrl = this.getClass().getClassLoader().getResource("").toURI().getPath() + "images/login";
System.err.println(imgUrl);
List files = Arrays.asList(new File(imgUrl).listFiles());
@@ -408,7 +405,7 @@ public class LoginController {
ObjectRestResponse rel = Request.connector(LoginFeign.class).login(jwtAuthenticationRequest);
if (rel.getStatus() == 200) {
WSClient.getInstance().addHeader("Authorization", rel.getData());
- WSClient.getInstance().addHeader("userName",userNameTextField.getText());
+ WSClient.getInstance().addHeader("userName", userNameTextField.getText());
WSClient.getInstance().connect();
}
diff --git a/falsework-client/src/test/java/TestSvg.java b/falsework-client/src/test/java/TestSvg.java
index 04615e0..a9d0204 100644
--- a/falsework-client/src/test/java/TestSvg.java
+++ b/falsework-client/src/test/java/TestSvg.java
@@ -1,9 +1,16 @@
-package PACKAGE_NAME;/**
+import javafx.application.Application;
+import javafx.stage.Stage;
+
+/**
* @version: 0.0.1
- * @description:
- *
+ * @description:
* @className: TestSvg
* @author: liwen
* @date: 2021/2/5 09:42
- */public class TestSvg {
+ */
+public class TestSvg extends Application {
+ @Override
+ public void start(Stage primaryStage) throws Exception {
+
+ }
}
diff --git a/falsework-client/src/test/java/TigerExample.java b/falsework-client/src/test/java/TigerExample.java
index e69de29..4d25147 100644
--- a/falsework-client/src/test/java/TigerExample.java
+++ b/falsework-client/src/test/java/TigerExample.java
@@ -0,0 +1,39 @@
+import com.intellij.openapi.util.IconLoader;
+import javafx.application.Application;
+import javafx.embed.swing.SwingNode;
+import javafx.scene.Scene;
+import javafx.scene.layout.StackPane;
+import javafx.stage.Stage;
+
+import javax.swing.*;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+
+
+public class TigerExample extends Application {
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+
+ @Override
+ public void start(Stage primaryStage) throws MalformedURLException {
+ primaryStage.setTitle("SVG Display sample");
+
+ // load the sample svg file
+ InputStream svgFile =
+ getClass().getResourceAsStream("/test.svg");
+ Icon icon = IconLoader.getIcon("/test.svg");
+
+ SwingNode svgImage = new SwingNode();
+ JLabel label=new JLabel(icon);
+ label.setText("");
+ svgImage.setContent(label);
+
+ StackPane stackPane=new StackPane(svgImage);
+ Scene scene = new Scene(stackPane);
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+}
\ No newline at end of file
diff --git a/falsework-client/src/test/resources/idea.svg b/falsework-client/src/test/resources/idea.svg
index fd65195..38da511 100644
--- a/falsework-client/src/test/resources/idea.svg
+++ b/falsework-client/src/test/resources/idea.svg
@@ -1,13 +1,60 @@
-
-
-