forked from nus-cs2103-AY2324S2/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'branch-A-CodeQuality' into master
- Loading branch information
Showing
12 changed files
with
207 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ test { | |
} | ||
|
||
application { | ||
mainClass.set("dude.Dude") | ||
mainClass.set("dude.Launcher") | ||
} | ||
|
||
shadowJar { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,49 @@ | ||
package dude; | ||
|
||
import java.io.IOException; | ||
|
||
import javafx.application.Application; | ||
import javafx.fxml.FXMLLoader; | ||
import javafx.scene.Scene; | ||
import javafx.scene.layout.AnchorPane; | ||
import javafx.stage.Stage; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* The Main class is used to boot up the GUI for the application. | ||
*/ | ||
public class Main extends Application { | ||
|
||
/** | ||
* Method caled to start the application. It initializes the UI and sets up the javafx stage | ||
* | ||
* @param stage The stage to be used for the application. | ||
*/ | ||
@Override | ||
public void start(Stage stage) { | ||
stage.setTitle("Dude"); | ||
stage.setResizable(false); | ||
|
||
Scene scene = loadMainScene(); | ||
stage.setScene(scene); | ||
|
||
stage.show(); | ||
} | ||
|
||
/** | ||
* Loads the main scene of the application from the FXML file. | ||
* | ||
* @return The scene that is loaded. | ||
*/ | ||
private Scene loadMainScene() { | ||
FXMLLoader fxmlLoader = new FXMLLoader(Main.class.getResource("/view/MainView.fxml")); | ||
AnchorPane anchorPane = null; | ||
try { | ||
anchorPane = fxmlLoader.load(); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
|
||
Scene scene = new Scene(anchorPane); | ||
stage.setScene(scene); | ||
stage.show(); | ||
return scene; | ||
} | ||
} | ||
|
14 changes: 8 additions & 6 deletions
14
src/main/java/dude/DialogBox.java → src/main/java/dude/gui/DialogBox.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.