Skip to content

Commit 802f6f7

Browse files
committed
New Design
1 parent 9a356f5 commit 802f6f7

5 files changed

Lines changed: 23 additions & 32 deletions

File tree

AppWish/AppWish/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>pn.dev</groupId>
77
<artifactId>code-generator-gui-ollama</artifactId>
8-
<version>2.0.4</version>
8+
<version>2.0.5</version>
99
<name>CodeGenerator-GUI</name>
1010

1111

@@ -53,7 +53,7 @@
5353
<dependency>
5454
<groupId>pn.dev</groupId>
5555
<artifactId>code-generator-ollama</artifactId>
56-
<version>2.0.4</version>
56+
<version>2.0.5</version>
5757
</dependency>
5858
<dependency>
5959
<groupId>org.openjfx</groupId>
@@ -65,7 +65,6 @@
6565
<artifactId>javafx-fxml</artifactId>
6666
<version>${javafx.version}</version>
6767
</dependency>
68-
6968
<dependency>
7069
<groupId>org.junit.jupiter</groupId>
7170
<artifactId>junit-jupiter-api</artifactId>

AppWish/AppWish/src/main/java/pn/app_wish/AppWish.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
public class AppWish extends Application {
5454
private static final Logger log = LoggerFactory.getLogger(AppWish.class);
55-
private static Stage mainStage;
55+
public static Stage mainStage;
5656
@FXML
5757
public TextField tf_input;
5858
@FXML
@@ -65,8 +65,7 @@ public class AppWish extends Application {
6565
public Button btn_app_history;
6666
@FXML
6767
public Button btn_continue_on_application;
68-
@FXML
69-
public BorderPane bp_main;
68+
7069
@FXML
7170
public Button btn_StopGeneratedApp;
7271
@FXML
@@ -112,23 +111,6 @@ private void loadSplashScreen(Stage primaryStage) throws IOException {
112111
splashStage.show();
113112
}
114113

115-
private void loadDefaultScreen(Stage primaryStage){
116-
117-
Parent root = null;
118-
try {
119-
root = FXMLLoader.load(requireNonNull(getClass().getClassLoader().getResource(DEFAULT_FXML_FILE)));
120-
} catch (IOException e) {
121-
throw new RuntimeException(e);
122-
}
123-
mainStage = primaryStage;
124-
mainStage.setResizable(false);
125-
primaryStage.setResizable(false);
126-
primaryStage.setTitle(GUIConstants.DEFAULT_STAGE_TITLE);
127-
Scene scene = new Scene(root);
128-
primaryStage.setScene(scene);
129-
primaryStage.show();
130-
System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
131-
}
132114

133115
@Override
134116
public void start(Stage primaryStage) throws IOException {

AppWish/AppWish/src/main/java/pn/app_wish/controller/SplashScreenController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
import javafx.fxml.Initializable;
66
import javafx.scene.Parent;
77
import javafx.scene.Scene;
8+
import javafx.scene.control.Label;
89
import javafx.scene.image.Image;
910
import javafx.scene.image.ImageView;
1011
import javafx.stage.Stage;
1112
import javafx.util.Duration;
13+
import pn.app_wish.AppWish;
1214

1315
import java.io.IOException;
1416
import java.net.URL;
@@ -22,6 +24,8 @@ public class SplashScreenController implements Initializable {
2224
@FXML
2325
private ImageView splashImage;
2426

27+
@FXML
28+
private Label label;
2529

2630
@Override
2731
public void initialize(URL url, ResourceBundle rb) {
@@ -38,6 +42,8 @@ public void initialize(URL url, ResourceBundle rb) {
3842
Stage mainStage = new Stage();
3943
mainStage.setResizable(false);
4044
mainStage.setScene(new Scene(root));
45+
46+
AppWish.mainStage = mainStage;
4147
mainStage.show();
4248
} catch (IOException ex) {
4349
// Handle exception
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
3+
<?import javafx.scene.control.*?>
4+
<?import javafx.scene.image.*?>
45
<?import javafx.scene.layout.*?>
6+
<?import javafx.scene.text.*?>
7+
8+
<AnchorPane xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="pn.app_wish.controller.SplashScreenController">
59

6-
<?import javafx.scene.image.ImageView?>
7-
<?import javafx.scene.image.Image?>
8-
<AnchorPane xmlns="http://javafx.com/javafx"
9-
xmlns:fx="http://javafx.com/fxml"
10-
fx:controller="pn.app_wish.controller.SplashScreenController"
11-
>
12-
<ImageView fx:id="splashImage" preserveRatio="true">
10+
<ImageView fx:id="splashImage" preserveRatio="true">
1311
<image>
1412
<Image url="@shooting_star.png" />
1513
</image>
1614
</ImageView>
15+
<Label layoutX="168.0" layoutY="242.0" text="AppWish Enterprise" textFill="WHITE">
16+
<font>
17+
<Font size="36.0" />
18+
</font>
19+
</Label>
20+
1721
</AnchorPane>

cg/CodeGenerator/CodeGenerator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>pn.dev</groupId>
88
<artifactId>code-generator-ollama</artifactId>
9-
<version>2.0.4</version>
9+
<version>2.0.5</version>
1010

1111

1212
<description>The Java Application-Generator (pn.dev.code-generator-ollama) creates applications by giving a string of your desired features for a Java application, like this: AppSystem.StartCodeGenerator(String appWish)</description>

0 commit comments

Comments
 (0)