diff --git a/src/Welsh Vocabulary Tutor/.idea/compiler.xml b/src/Welsh Vocabulary Tutor/.idea/compiler.xml new file mode 100644 index 0000000..0c465ee --- /dev/null +++ b/src/Welsh Vocabulary Tutor/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/.idea/encodings.xml b/src/Welsh Vocabulary Tutor/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/src/Welsh Vocabulary Tutor/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/.idea/misc.xml b/src/Welsh Vocabulary Tutor/.idea/misc.xml new file mode 100644 index 0000000..d24ea8e --- /dev/null +++ b/src/Welsh Vocabulary Tutor/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/.idea/workspace.xml b/src/Welsh Vocabulary Tutor/.idea/workspace.xml new file mode 100644 index 0000000..abf7dc2 --- /dev/null +++ b/src/Welsh Vocabulary Tutor/.idea/workspace.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1585703857421 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml b/src/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/src/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/pom.xml b/src/Welsh Vocabulary Tutor/pom.xml new file mode 100644 index 0000000..d2e762f --- /dev/null +++ b/src/Welsh Vocabulary Tutor/pom.xml @@ -0,0 +1,44 @@ + + 4.0.0 + uk.ac.aber.cs22120.group20 + Welsh Vocabulary Tutor + 1.0-SNAPSHOT + + UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 11 + + + org.openjfx + javafx-fxml + 11 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.1 + + uk.ac.aber.cs22120.group20.App + + + + + \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/src/main/java/module-info.java b/src/Welsh Vocabulary Tutor/src/main/java/module-info.java new file mode 100644 index 0000000..5d44bb3 --- /dev/null +++ b/src/Welsh Vocabulary Tutor/src/main/java/module-info.java @@ -0,0 +1,7 @@ +module uk.ac.aber.cs22120.group20 { + requires javafx.controls; + requires javafx.fxml; + + opens uk.ac.aber.cs22120.group20 to javafx.fxml; + exports uk.ac.aber.cs22120.group20; +} \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java new file mode 100644 index 0000000..8b5c64d --- /dev/null +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java @@ -0,0 +1,48 @@ +package uk.ac.aber.cs22120.group20; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +import java.io.IOException; + +/** + * Launch class of the Welsh Vocabulary tutor Application + * + * @author Brad Corbett [brc9] + * @author Henry Dugmore [hjd3] + * @author Kain Bryan-Jones [kab74] + * @author Luke Wybar [law39] + * @author Marcin Jakob [maj83] + * @author Oscar Pocock [osp1] + * @author Tom Perry [top1] + * @author Waylen Watts [ncw] + * + * @version 0.1 + */ +public class App extends Application { + private static Scene scene; + + @Override + public void start(Stage stage) throws IOException { + scene = new Scene(loadFXML("primary")); + stage.setScene(scene); + stage.show(); + } + + static void setRoot(String fxml) throws IOException { + scene.setRoot(loadFXML(fxml)); + } + + private static Parent loadFXML(String fxml) throws IOException { + FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml")); + return fxmlLoader.load(); + } + + public static void main(String[] args) { + launch(); + } + +} \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java new file mode 100644 index 0000000..b1929a6 --- /dev/null +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java @@ -0,0 +1,14 @@ +package uk.ac.aber.cs22120.group20; + +import java.io.IOException; +import javafx.fxml.FXML; +/** + * Placeholder Controller + */ +public class PrimaryController { + + @FXML + private void switchToSecondary() throws IOException { + App.setRoot("secondary"); + } +} diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java new file mode 100644 index 0000000..94eb1ac --- /dev/null +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java @@ -0,0 +1,14 @@ +package uk.ac.aber.cs22120.group20; + +import java.io.IOException; +import javafx.fxml.FXML; +/** + * Placeholder Controller + */ +public class SecondaryController { + + @FXML + private void switchToPrimary() throws IOException { + App.setRoot("primary"); + } +} \ No newline at end of file diff --git a/src/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml b/src/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml new file mode 100644 index 0000000..e2ba159 --- /dev/null +++ b/src/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml @@ -0,0 +1,16 @@ + + + + + + + + + +