From 043e6109d4110248ed424b21e6cab2d5f8877cb2 Mon Sep 17 00:00:00 2001 From: osp1 Date: Tue, 7 Apr 2020 16:03:14 +0100 Subject: [PATCH] Added directory for this week and add Dictionary Page work from last week --- .../org/openjfx/javaFX/AddController.java | 6 +- .../org/openjfx/javaFX/ViewboxController.java | 21 ++- .../org/openjfx/javaFX/AddController.class | Bin 5477 -> 5581 bytes .../openjfx/javaFX/ViewboxController$1.class | Bin 1716 -> 2031 bytes .../openjfx/javaFX/ViewboxController.class | Bin 3645 -> 3904 bytes .../.idea/workspace.xml | 30 ++-- .../java/uk/ac/aber/cs22120/group20/App.java | 32 +++- .../cs22120/group20/DictionaryController.java | 89 +++++------ .../aber/cs22120/group20/DictionaryEntry.java | 144 +++++++++++++++++ .../cs22120/group20/PrimaryController.java | 24 ++- .../cs22120/group20/SecondaryController.java | 20 ++- .../aber/cs22120/group20/WelshDictionary.java | 39 ----- .../uk/ac/aber/cs22120/group20/App.class | Bin 2156 -> 2156 bytes .../group20/DictionaryController.class | Bin 2432 -> 2527 bytes .../cs22120/group20/DictionaryEntry.class | Bin 0 -> 2152 bytes .../cs22120/group20/PrimaryController.class | Bin 620 -> 620 bytes .../cs22120/group20/SecondaryController.class | Bin 628 -> 628 bytes .../cs22120/group20/WelshDictionary.class | Bin 1253 -> 0 bytes dev/20200407/.gitkeep | 0 .../Welsh Vocabulary Tutor/.idea/compiler.xml | 16 ++ .../.idea/encodings.xml | 7 + .../Maven__org_openjfx_javafx_base_11.xml | 13 ++ ...aven__org_openjfx_javafx_base_linux_11.xml | 13 ++ .../Maven__org_openjfx_javafx_controls_11.xml | 13 ++ ...__org_openjfx_javafx_controls_linux_11.xml | 13 ++ .../Maven__org_openjfx_javafx_fxml_11.xml | 13 ++ ...aven__org_openjfx_javafx_fxml_linux_11.xml | 13 ++ .../Maven__org_openjfx_javafx_graphics_11.xml | 13 ++ ...__org_openjfx_javafx_graphics_linux_11.xml | 13 ++ ...ml_jackson_core_jackson_databind_2_9_4.xml | 12 ++ .../Welsh Vocabulary Tutor/.idea/misc.xml | 11 ++ .../Welsh Vocabulary Tutor/.idea/modules.xml | 8 + .../.idea/uiDesigner.xml | 124 +++++++++++++++ .../.idea/workspace.xml | 145 ++++++++++++++++++ .../Welsh Vocabulary Tutor.iml | 23 +++ .../osp1/Welsh Vocabulary Tutor/pom.xml | 44 ++++++ .../src/main/java/module-info.java | 9 ++ .../java/uk/ac/aber/cs22120/group20/App.java | 77 ++++++++++ .../cs22120/group20/DictionaryController.java | 79 ++++++++++ .../aber/cs22120/group20/DictionaryEntry.java | 144 +++++++++++++++++ .../cs22120/group20/PrimaryController.java | 36 +++++ .../cs22120/group20/SecondaryController.java | 32 ++++ .../ac/aber/cs22120/group20/dictionary.fxml | 44 ++++++ .../uk/ac/aber/cs22120/group20/primary.fxml | 17 ++ .../uk/ac/aber/cs22120/group20/secondary.fxml | 17 ++ .../Welsh Vocabulary Tutor.kotlin_module | Bin 0 -> 16 bytes .../target/classes/module-info.class | Bin 0 -> 341 bytes .../uk/ac/aber/cs22120/group20/App.class | Bin 0 -> 2156 bytes .../group20/DictionaryController.class | Bin 0 -> 2527 bytes .../cs22120/group20/DictionaryEntry.class | Bin 0 -> 2152 bytes .../cs22120/group20/PrimaryController.class | Bin 0 -> 620 bytes .../cs22120/group20/SecondaryController.class | Bin 0 -> 628 bytes .../ac/aber/cs22120/group20/dictionary.fxml | 44 ++++++ .../uk/ac/aber/cs22120/group20/primary.fxml | 17 ++ .../uk/ac/aber/cs22120/group20/secondary.fxml | 17 ++ 55 files changed, 1319 insertions(+), 113 deletions(-) create mode 100644 dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java delete mode 100644 dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/WelshDictionary.java create mode 100644 dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/DictionaryEntry.class delete mode 100644 dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/WelshDictionary.class create mode 100644 dev/20200407/.gitkeep create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/compiler.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/encodings.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_linux_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_linux_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_linux_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_linux_11.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/com_fasterxml_jackson_core_jackson_databind_2_9_4.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/misc.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/modules.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/uiDesigner.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/workspace.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/pom.xml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/module-info.java create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/secondary.fxml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/META-INF/Welsh Vocabulary Tutor.kotlin_module create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/module-info.class create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/App.class create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/DictionaryController.class create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/DictionaryEntry.class create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/PrimaryController.class create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/SecondaryController.class create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/dictionary.fxml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/primary.fxml create mode 100644 dev/20200407/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/secondary.fxml diff --git a/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/AddController.java b/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/AddController.java index c0672ef..e82d2a9 100644 --- a/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/AddController.java +++ b/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/AddController.java @@ -20,9 +20,11 @@ public class AddController { @FXML protected void addButtonClick(ActionEvent actionEvent) { App.words.add(new WelshDictionary(english.getText(),welsh.getText(),wordType.getText())); + App.words.add(new WelshDictionary("englishcar", "welshcar", "nm")); StringBuilder sb = new StringBuilder(); sb.append("Your Welsh word: ").append(welsh.getText()).append("\n"); sb.append("With English translation: ").append(english.getText()).append("\n"); + sb.append("Word type is: ").append(wordType.getText()).append("\n"); sb.append("Has been added to the dictionary."); english.setText(""); @@ -122,9 +124,7 @@ public class AddController { public void addCharè(ActionEvent actionEvent) { welsh.appendText("è"); } - public void addCharì(ActionEvent actionEvent) { - welsh.appendText("ì"); - } + public void addCharì(ActionEvent actionEvent) { welsh.appendText("ì"); } public void addCharò(ActionEvent actionEvent) { welsh.appendText("ò"); } diff --git a/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/ViewboxController.java b/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/ViewboxController.java index 18ab550..af5396c 100644 --- a/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/ViewboxController.java +++ b/dev/20200302/osp1/Viewpane/hellofx/src/main/java/org/openjfx/javaFX/ViewboxController.java @@ -19,14 +19,16 @@ import org.openjfx.javaFX.App; public class ViewboxController { public ListView EnglishlistView; - @FXML private TextField welsh; - @FXML private TextField english; + @FXML + private TextField welsh; + @FXML + private TextField english; private Scene firstScene; public static final ObservableList names = FXCollections.observableArrayList(); public static final ObservableList data = FXCollections.observableArrayList(); - public void initialize(){ + public void initialize() { } @@ -37,7 +39,7 @@ public class ViewboxController { alert.setHeaderText("Scene switched"); alert.showAndWait(); - Stage primaryStage = (Stage)((Node)actionEvent.getSource()).getScene().getWindow(); + Stage primaryStage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow(); primaryStage.setScene(firstScene); } @@ -46,15 +48,20 @@ public class ViewboxController { } public void loadList(ActionEvent actionEvent) { + App.words.add(new WelshDictionary("loadListTestEng", "loadListTestWel", "loadListTestWordType")); EnglishlistView.setOrientation(Orientation.VERTICAL); - EnglishlistView.setCellFactory(param -> new ListCell() { @Override protected void updateItem(WelshDictionary item, boolean empty) { super.updateItem(item, empty); - - if (empty || item == null || item.getEnglish() == null||item.getWelsh() == null || item.getWordType() ==null) { + if (empty || item == null || item.getEnglish() == null || item.getWelsh() == null || item.getWordType() == null) { setText(null); + } else if (item.getWordType().equals("verb")) { + setText("to " + item.getEnglish() + " " + item.getWelsh()); + } else if (item.getWordType().equals("nm")) { + setText(item.getEnglish() + " " + item.getWelsh() + " {nm}"); + } else if (item.getWordType().equals("nf")) { + setText(item.getEnglish() + " " + item.getWelsh() + " {nf}"); } else { setText(item.getEnglish() + " " + item.getWelsh()); } diff --git a/dev/20200302/osp1/Viewpane/hellofx/target/classes/org/openjfx/javaFX/AddController.class b/dev/20200302/osp1/Viewpane/hellofx/target/classes/org/openjfx/javaFX/AddController.class index e2db5b8668247ccd630e3ab38d17aa3eb5e82084..2f3dbb9ae20bef2fed75eb6b431dc8452d7eb89c 100644 GIT binary patch literal 5581 zcma)m`|0nQ*-U21%xC)9&u5-z-g(~d`@GNd zyvM%&-&3ywcpLr`M+GLtP^n=esuWz@r|-~HS>5VMZR+eZx@-kiH<*@buTU^yQB8X_ zR8+?h*Dwj1g6X+@PbxQHSbg0)Q_{6*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K7jXSA6}k3JB0U#0Nzm_-Y9uvA-q2Z@Q(TL_K|mA z2=7k;yyHH+`^kGCg!e`O?}QI;KY0&^@ctaYd)0?`ki0`7yuSqSPWkX2BJbf4-d_WF zXMA{v$$KP(_c!b-zOgnH-!Bz)tIxo``t9;4pTCcJSQVwWO9lSUCo=z);U9eCl;NNF Qm%M`5(#YHY-?uIPAEq>{o&W#< diff --git a/dev/20200302/osp1/Viewpane/hellofx/target/classes/org/openjfx/javaFX/ViewboxController$1.class b/dev/20200302/osp1/Viewpane/hellofx/target/classes/org/openjfx/javaFX/ViewboxController$1.class index b3f36f9413d486abd96d9cf23b2635f1d409b343..4e9c7325d0d70a4270c55e6fe433929dbe8e5065 100644 GIT binary patch delta 761 zcmZuv-%rzE6g}VCZB4DRH7b#4Hr!CwDN`8^L=okuGDL-mqNtr2M1&c!Vxlqo158Lv zpET~-Cm)C~6CR8YJo)0k;fwLz2jl6tMl|zFdT;MNx3}k(TU7LV@nlZW7GLXg*cU2Tp8af05@na46 z2_N76*UnDa^O!4=c?Wh>Sag$O4-yoRCh;7pkKqiaDf$7<;wk#^66f(2gHmF=PX3R? zDrfto1yxS>(|~i_sUegI$6~QaWRTJ$zKvO5I&J(6bAJul%Kv>d{F4K1xp_UL;^D2vS9UJCTHe=fwJJ^k2&kAei)Oiy7=1gV9p}A77b1aZCH!5SE zRZbNkP&6MZ?Yl&Uc>?^wK5@$MFq6YxzV>|PJLUIznQLtSKn z4o2I|N!ZFMs(~^qRA{P70^Pz7NaH^>{zyLNFdsPav4BPTSfW-z<|Bzjjrc?lU+Uqt z>pdcQKGMOYC58gx|6Za&wclRC?9l#I!b%X!d~U#@vo$)hnF=-;`>5LDs^fsCB=7Bu L*wMfdni&2DekU>f diff --git a/dev/20200302/osp1/Viewpane/hellofx/target/classes/org/openjfx/javaFX/ViewboxController.class b/dev/20200302/osp1/Viewpane/hellofx/target/classes/org/openjfx/javaFX/ViewboxController.class index dd4e61e403ff2c72daba3095965c3f796073920b..60c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6s zMdy<&{1ln<4T*cWNxSS`VKj0}PR{k;mXhxCkS9EqNQxj!?(SJ}vT&l$b6)bA - + @@ -77,34 +77,34 @@ - + - + - + - - + + - - + + - - + + - - + + - + @@ -129,10 +129,10 @@ - + - + diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java index a6c39f9..554342d 100644 --- a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java +++ b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java @@ -1,3 +1,9 @@ +/** + * @(#) App.java 0,1 2020/04/07 + * + * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ package uk.ac.aber.cs22120.group20; import javafx.application.Application; @@ -10,7 +16,7 @@ import java.io.IOException; import java.util.LinkedList; /** - * Launch class of the Welsh Vocabulary tutor Application + * A class that launches the Welsh Vocabulary tutor Application. * * @author Brad Corbett [brc9] * @author Henry Dugmore [hjd3] @@ -21,13 +27,18 @@ import java.util.LinkedList; * @author Tom Perry [top1] * @author Waylen Watts [ncw] * - * @version 0.1 + * @version 0.1 Initial development */ public class App extends Application { private static Scene scene; - public static LinkedList words = new LinkedList<>(); + public static LinkedList words = new LinkedList<>(); + /** + * + * @param stage + * @throws IOException + */ @Override public void start(Stage stage) throws IOException { scene = new Scene(loadFXML("primary")); @@ -35,15 +46,30 @@ public class App extends Application { stage.show(); } + /** + * + * @param fxml + * @throws IOException + */ static void setRoot(String fxml) throws IOException { scene.setRoot(loadFXML(fxml)); } + /** + * + * @param fxml + * @return + * @throws IOException + */ private static Parent loadFXML(String fxml) throws IOException { FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml")); return fxmlLoader.load(); } + /** + * + * @param args + */ public static void main(String[] args) { launch(); } diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java index 98db24a..1ce30a2 100644 --- a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java +++ b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java @@ -1,78 +1,79 @@ +/** + * @(#) DictionaryController.java 0,1 2020/04/07 + *

+ * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ package uk.ac.aber.cs22120.group20; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.control.cell.PropertyValueFactory; -import javafx.scene.input.MouseEvent; import javafx.stage.Stage; -import javafx.util.Callback; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; /** - * Placeholder Controller + * A class that handles the keyboard and mouse input and interaction for the 'Dictionary Page' which is + * defined by 'dictionary.fxml' + * + * @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 Initial development. + * @see DictionaryEntry + * @see App */ public class DictionaryController implements Initializable { public static Stage primaryStage = null; - @FXML private TableView table; - @FXML private TableColumn english; - @FXML private TableColumn welsh; + @FXML + private TableView table; + @FXML + private TableColumn english; + @FXML + private TableColumn welsh; - private Scene firstScene; - - public ObservableList list = FXCollections.observableArrayList( - new WelshDictionary("abbey", "abaty", "nm"), - new WelshDictionary("believe", "credu", "verb"), - new WelshDictionary("concert", "cyngerdd", "nm"), - new WelshDictionary("disease", "clefyd", "nm"), - new WelshDictionary("extremely", "dros ben", "other"), - new WelshDictionary("flu", "ffliw", "nm") + public ObservableList list = FXCollections.observableArrayList( + new DictionaryEntry("abbey", "abaty", "nm", false), + new DictionaryEntry("believe", "credu", "verb", false), + new DictionaryEntry("concert", "cyngerdd", "nm", false), + new DictionaryEntry("disease", "clefyd", "nm", false), + new DictionaryEntry("extremely", "dros ben", "other", false), + new DictionaryEntry("flu", "ffliw", "nm", false) ); + /** + * Switches to the primary scene. + * @throws IOException + */ @FXML private void switchToPrimary() throws IOException { App.setRoot("primary"); } + /** + * Sets up the table and loads the words into it. + * @param url + * @param resourceBundle + */ @Override public void initialize(URL url, ResourceBundle resourceBundle) { - welsh.setCellValueFactory(new PropertyValueFactory("welsh")); - english.setCellValueFactory(new PropertyValueFactory("english")); + welsh.setCellValueFactory(new PropertyValueFactory("welsh")); + english.setCellValueFactory(new PropertyValueFactory("english")); table.setItems(list); } - } +} - // public void loadList(ActionEvent actionEvent) { -// // FOR TESTING UNTIL JSON PROCESSOR IS FINISHED: LIST VIEW -// englishListView.setOrientation(Orientation.VERTICAL); -// englishListView.setCellFactory(param -> new ListCell() { -// @Override -// protected void updateItem(WelshDictionary item, boolean empty) { -// super.updateItem(item, empty); -// -// if (empty || item == null || item.getEnglish() == null || item.getWelsh() == null || item.getWordType() ==null) { -// setText(null); -// } else { -// setText(item.getEnglish() + " " + item.getWelsh() + " " + item.getWordType()); -// } -// } -// }); -// //ADDING WORDS MANUALLY TILL JSON PROCESSOR IS DONE -// data.addAll(new WelshDictionary("englishCar", "welshCar", "testWordType1"), -// new WelshDictionary("englishCat", "welshCat", "testWordType2"), -// new WelshDictionary("englishDog", "welshDog", "testWordType3"), -// new WelshDictionary("englishStick", "welshStick", "testWordType4") -// ); -//// data.addAll(App.words); -// englishListView.setItems(data); -// } -//} diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java new file mode 100644 index 0000000..29644d3 --- /dev/null +++ b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java @@ -0,0 +1,144 @@ +/** + * @(#) DictionaryEntry.java 0,1 2020/04/07 + *

+ * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ +package uk.ac.aber.cs22120.group20; + +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleStringProperty; + +/** + * A class that demonstrates how a controller works. + * + * @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 Initial development + * @see DictionaryController + */ +public class DictionaryEntry { + private SimpleStringProperty english; + private SimpleStringProperty welsh; + private SimpleStringProperty wordType; + private SimpleBooleanProperty practiceWord; + + /** + * Creates new instance of a DictionaryEntry + * + * @param english english translation of the word + * @param welsh welsh translation of the word + * @param wordType type of word + * @param practiceWord determines if the entry is in the practice list + * @see App + * @see DictionaryController + */ + public DictionaryEntry(String english, String welsh, String wordType, Boolean practiceWord) { + this.english = new SimpleStringProperty(english); + this.welsh = new SimpleStringProperty(welsh); + this.wordType = new SimpleStringProperty(wordType); + this.practiceWord = new SimpleBooleanProperty(practiceWord); + + } + + /** + * @return the plain text English word in the entry. + */ + public String getEnglish() { + return english.get(); + } + + /** + * + * @return the SimpleStringProperty of the English word in the entry. + */ + public SimpleStringProperty englishProperty() { + return english; + } + + /** + * Sets the English word in the entry. + * @param english the English word you want to set/change. + */ + public void setEnglish(String english) { + this.english.set(english); + } + + /** + * + * @return the plain text Welsh word in the entry. + */ + public String getWelsh() { + return welsh.get(); + } + + /** + * + * @return the SimpleStringProperty of the Welsh word in the entry. + */ + public SimpleStringProperty welshProperty() { + return welsh; + } + + /** + * Sets the Welsh word in the entry. + * @param welsh + */ + public void setWelsh(String welsh) { + this.welsh.set(welsh); + } + + /** + * + * @return + */ + public String getWordType() { + return wordType.get(); + } + + /** + * + * @return + */ + public SimpleStringProperty wordTypeProperty() { + return wordType; + } + + /** + * + * @param wordType + */ + public void setWordType(String wordType) { + this.wordType.set(wordType); + } + + /** + * + * @return + */ + public boolean isPracticeWord() { + return practiceWord.get(); + } + + /** + * + * @return + */ + public SimpleBooleanProperty practiceWordProperty() { + return practiceWord; + } + + /** + * + * @param practiceWord + */ + public void setPracticeWord(boolean practiceWord) { + this.practiceWord.set(practiceWord); + } +} diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java index b1929a6..401d547 100644 --- a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java +++ b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java @@ -1,9 +1,31 @@ +/** + * @(#) PrimaryController.java 0,1 2020/04/07 + * + * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ package uk.ac.aber.cs22120.group20; import java.io.IOException; import javafx.fxml.FXML; + /** - * Placeholder Controller + * A class that generates a dictionary entry which is made up of: + * 1. a Welsh word + * 2. it's English translation + * 3. it's word type + * 4. whether or not it's a practice word (by default: not a practice word) + * + * @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 Initial development + * @see App */ public class PrimaryController { diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java index 273a027..8d40e2d 100644 --- a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java +++ b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java @@ -1,9 +1,27 @@ +/** + * @(#) SecondaryController.java 0,1 2020/04/07 + * + * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ package uk.ac.aber.cs22120.group20; import java.io.IOException; import javafx.fxml.FXML; + /** - * Placeholder Controller + * A class that demonstrates how a controller works. + * + * @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 Initial development + * @see App */ public class SecondaryController { diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/WelshDictionary.java b/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/WelshDictionary.java deleted file mode 100644 index e9cb6df..0000000 --- a/dev/20200331/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/WelshDictionary.java +++ /dev/null @@ -1,39 +0,0 @@ -package uk.ac.aber.cs22120.group20; - -import javafx.beans.property.SimpleStringProperty; - -public class WelshDictionary { - private SimpleStringProperty english; - private SimpleStringProperty welsh; - private SimpleStringProperty wordType; - - public WelshDictionary(String english, String welsh, String wordType) { - this.english = new SimpleStringProperty(english); - this.welsh = new SimpleStringProperty(welsh); - this.wordType = new SimpleStringProperty(wordType); - } - - public String getWelsh() { - return welsh.get(); - } - - public SimpleStringProperty welshProperty() { - return welsh; - } - - public String getEnglish() { - return english.get(); - } - - public SimpleStringProperty englishProperty() { - return english; - } - - public String getWordType() { - return wordType.get(); - } - - public SimpleStringProperty wordTypeProperty() { - return wordType; - } -} diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/App.class b/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/App.class index 723fbb1e89a199c603057bb59e0260dcf8c10498..a4a549678d5c00b9007997627f51f2296749032e 100644 GIT binary patch delta 86 zcmaDO@J3)m5i_q#W^zepeqLfxrE6Zv=6Ys6W=4g{eQZIzIt=^_x(s3rdJIww`jg+X qg|V75a4}d+_F#`;bz~4`aGJc5J($&tft|s7G9!l*qw-`I4h;Ys9TdF) delta 86 zcmaDO@J3)m5i@UiYEE&6OJ;IOW`17c=6Ys6W=5&WeQZIziVXY=N(^EQ$_!ErDwE%` qg|VtLa4~31_F#`;)n*W8(3!lFJ($&ift|r{G9!l*qwHiC4h;YT-xKx# diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/DictionaryController.class b/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/DictionaryController.class index a379ae4802d77ac1b487a65880c66058d63ade18..fda571a38593513c10e2e828f3b3fa443ce2a4b5 100644 GIT binary patch delta 1185 zcmZ`%NmCP15dK~!lNpAwgh5n{XhdZR2(m_r3oalE3W$QZPm-4q91@*`gt*1Bym+!w z^CLW4DvO9ez$#B(ym|9xl~>Cu%bo!PYI*7R-q+n;cjqng2;;but2PKpR8 z6Jc(qW$a>*!?{F^n~{i&-QIxT}`N&`3`;h>6c1g)=3_a3II zx6SypZsrsmMURAIDvsj>!w%~k^IA__brk{hs_4ThV$E_RHOWw8m5aNipoG&5%~q>W zY5j0{xArOM$Dpmz2?ggcBw<*^2+mv0!ni+x3o0(!Boa@=jCg8N#>Eo)s!J*+aGAK% zddT1mKH~OPj>UPFG{1^#60WPbftz+mt-?0zyU;BM5K<9F#0t9WS=5TSW4}M!`sB_Q z?^netHexNa8tbiCT|~c#&)AHW@qEY!-~t1uhD&TV+8meN3)z@+pG2Ha55-J5Z)(5j zyY-ik^!bmE*>&AX;pzc!rwes3Dr30r?hBNSCfTkOC+VHKAuC_t+m_^Q+pb2+rW*21Kch40bM z8(7PrOz>dTz1fl)6s5W2ONf&coeA- zpV`QY1a|7!WuX(h865Fl-736DSKVIHa5r$rQ$fi@7xwGuwr~Ik85+o^PJD?p8wnh; z(2G7{Mjduo?2qoM>ow7jW8q{DnmB=zI!;+QjWc0ISB;5h(ay#M&RG~hA64Lf&T|W6 z1_r8-zy%9Q42d7n_7#_KS;rL%!?+q&)RhJ?r0k)J*Dc(@P4Pr&VIyKr$t~WDaMa1u zi*^;1y3gEBO{5$z<>#ErhI+ag%&Z#}ipezhIm2q{lbv!3A$H^~`3#EbNR#-c)-S2D zUVF^$iRap= z`P^er$^=xI-X;1eiC}czi_e0^tF`yghof_3>?(Viy?hoclf#O{w!PY}l~|Q{oxP#L zYZ7m?8!A|rIA%B5Tcp1s@ix0f^5x`P#9yQ1g>3FNS(91-)<8i6?$DPtuLvH-rH@Z) zqX^Y@5)-P`>^*O>Z)t{B>MQD|Cua9fC62Ii6_V*N@rXA6?*2- zKWrbF#nCr7PWY_E=NIrG-F3Xd#lPikiUvKBYB-3YgPu)7%81S9tjM73DB^yf?4XTG hPEy|nrWSTlFBw2(FL5o*&Jd0#)C<&-EzudlgWo6N&_w_M diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/DictionaryEntry.class b/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/DictionaryEntry.class new file mode 100644 index 0000000000000000000000000000000000000000..d27a3788c75e90edd18f90d9897083e126178d41 GIT binary patch literal 2152 zcma)6T~pIg5Iq-KT1pToEdqWZAX-`=h>Bnl<=YPinSm(-4?1ZHC0LVA+KRmR=%fAw z|9}rVBV|Ts`~m(b$K5nEp#&rk_ii@3d(YWDH-G;A{0-m%UW8DG`T%?q{Adtp-BaEv za!%2+^2_v|nkfo2Oli7SoEE5$4WA;RbR_tjismpvU4F0&`NZu1UC#9)UK8tsN*Jr7I~ZC0A0dmTra6iC%6|pMWp6 zRq4o02?MxA@p)4r(iwGwKnV<=OS1+}lA9lsFo-yvlvQb#k=Wqr8F1K;gkhdheL*cU zAeqy8*t)}C2->p8^iJ10*JIRGDR#^ zPG50XEAW&ru8t&^awcHwO`zT7JO(5XqV_Bti>bwy)$v>fM(n;_P+(M#`dFlILekDUBqJ*IuU3XzfM=t#K-tAP7Ua zO5%-S1QQs=efn~*auCMp-^b4+MNJS4wjyLP{7L!`OrYMf2I$R4-yc%V3Rnis@xk~H zNM+pqMs^+51)a?PaqAqZ5@Vkuki-;un5;}Y$N4$GHhJ2W?5`$2LX(|5Lq{>hMovzY zk#Lyvj~rM;5KC5(j!IyaX`{_lVA_*Q*n`W83r?^K=dmZ3a4naVE7{@l#FIW>W^i delta 23 fcmaFE@`h!@cSc5z$v+rvS$P;(8F(jKF&O~>W7P(K diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/SecondaryController.class b/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/SecondaryController.class index 4a8d9286555c944de6f94be862d04fb3c7b68531..7d5b2402f98835c81239a4af498087c3e991b9ee 100644 GIT binary patch delta 22 dcmeyu@`Yu?e?~^BNldn^aty2t@{^sIi~v^u1>FDu delta 22 dcmeyu@`Yu?e?~@*Nldn^JPfQ1ypx@ni~v;!1*ZT2 diff --git a/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/WelshDictionary.class b/dev/20200331/osp1/Welsh Vocabulary Tutor/target/classes/uk/ac/aber/cs22120/group20/WelshDictionary.class deleted file mode 100644 index 1e4cd272312f2b65703a376f462a87731ab5bad8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1253 zcma)4O>fgc5Ph33r;gLKAt{tnpoN0%h8l7~D2NLmrwEWz1#xuTC2?`>$Z;q+@{d3Q zDuKig;71{5H%=WTJ|vNL$D?`g&70Z3|9<@e@E8ph8DtgYG~`iW*f_O6*_LPfed|r{ zlsgea;i>Dp(KCjuZgdqC8B9_1;j`7_wm-6lVKC%jG_gAF+0f&iD0Kb)+c>F0fhxF5 z40XMouusccMt2QmtShK!*uW-nk3U+rW7$0(TF$81eAIks^}}F1r28HBMuQiw6S;wJ zhZ6>c`+d(H4Hz1ddbOTfLh_1+n$XLi3sRBU(r{H|iswOiay%Jw(fhWB>)0XheNLmO z>Bh1Jh9@b;mg|-?MwcP?JUHPDmA32i*W)v?eQftU%2eBdV|!gYbj5d^%tZrtB;2k( zrIw&tnmgGfM{=MHWjTY{${3Dfn=6i!K_#x2vsF~$r6hbMAr%jmp4e=@NrBo4#-YPs zxx#pDVa-RPdF;`KGW2A#bkakiC?ggqZ(1AO3TT_SLFX=geL;@?fMH&MnZKdDKfJ)& z4`?!O$ha!w2QsdIlTj+$2x9N)|`^!HZ>%E2372nq=;%1i53ld zNBh($!yW9z?KJ5YRYmhVsy}h + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/encodings.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_11.xml new file mode 100644 index 0000000..88eebdf --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_linux_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_linux_11.xml new file mode 100644 index 0000000..b59bf8f --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_base_linux_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_11.xml new file mode 100644 index 0000000..40e5c7e --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_linux_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_linux_11.xml new file mode 100644 index 0000000..af54a59 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_controls_linux_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_11.xml new file mode 100644 index 0000000..3eaa3ca --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_linux_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_linux_11.xml new file mode 100644 index 0000000..0c647c0 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_fxml_linux_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_11.xml new file mode 100644 index 0000000..adbd0c7 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_linux_11.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_linux_11.xml new file mode 100644 index 0000000..ad6732e --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/Maven__org_openjfx_javafx_graphics_linux_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/com_fasterxml_jackson_core_jackson_databind_2_9_4.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/com_fasterxml_jackson_core_jackson_databind_2_9_4.xml new file mode 100644 index 0000000..92c5003 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/libraries/com_fasterxml_jackson_core_jackson_databind_2_9_4.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/misc.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/misc.xml new file mode 100644 index 0000000..7193838 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/misc.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/modules.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/modules.xml new file mode 100644 index 0000000..7199637 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/uiDesigner.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/workspace.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/workspace.xml new file mode 100644 index 0000000..a0d42ca --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/.idea/workspace.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1585772505035 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml b/dev/20200407/osp1/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml new file mode 100644 index 0000000..4bcd5a8 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/pom.xml b/dev/20200407/osp1/Welsh Vocabulary Tutor/pom.xml new file mode 100644 index 0000000..d2e762f --- /dev/null +++ b/dev/20200407/osp1/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/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/module-info.java b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/module-info.java new file mode 100644 index 0000000..9305364 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/module-info.java @@ -0,0 +1,9 @@ +module uk.ac.aber.cs22120.group20 { + requires javafx.controls; + requires javafx.fxml; + requires com.fasterxml.jackson.core; + requires com.fasterxml.jackson.databind; + + opens uk.ac.aber.cs22120.group20 to javafx.fxml; + exports uk.ac.aber.cs22120.group20; +} \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java new file mode 100644 index 0000000..554342d --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/App.java @@ -0,0 +1,77 @@ +/** + * @(#) App.java 0,1 2020/04/07 + * + * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ +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; +import java.util.LinkedList; + +/** + * A class that launches 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 Initial development + */ +public class App extends Application { + private static Scene scene; + + public static LinkedList words = new LinkedList<>(); + + /** + * + * @param stage + * @throws IOException + */ + @Override + public void start(Stage stage) throws IOException { + scene = new Scene(loadFXML("primary")); + stage.setScene(scene); + stage.show(); + } + + /** + * + * @param fxml + * @throws IOException + */ + static void setRoot(String fxml) throws IOException { + scene.setRoot(loadFXML(fxml)); + } + + /** + * + * @param fxml + * @return + * @throws IOException + */ + private static Parent loadFXML(String fxml) throws IOException { + FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml")); + return fxmlLoader.load(); + } + + /** + * + * @param args + */ + public static void main(String[] args) { + launch(); + } + +} \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java new file mode 100644 index 0000000..1ce30a2 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java @@ -0,0 +1,79 @@ +/** + * @(#) DictionaryController.java 0,1 2020/04/07 + *

+ * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ +package uk.ac.aber.cs22120.group20; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.fxml.FXML; +import javafx.fxml.Initializable; +import javafx.scene.Scene; +import javafx.scene.control.*; +import javafx.scene.control.cell.PropertyValueFactory; +import javafx.stage.Stage; + +import java.io.IOException; +import java.net.URL; +import java.util.ResourceBundle; + +/** + * A class that handles the keyboard and mouse input and interaction for the 'Dictionary Page' which is + * defined by 'dictionary.fxml' + * + * @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 Initial development. + * @see DictionaryEntry + * @see App + */ +public class DictionaryController implements Initializable { + public static Stage primaryStage = null; + + @FXML + private TableView table; + @FXML + private TableColumn english; + @FXML + private TableColumn welsh; + + public ObservableList list = FXCollections.observableArrayList( + new DictionaryEntry("abbey", "abaty", "nm", false), + new DictionaryEntry("believe", "credu", "verb", false), + new DictionaryEntry("concert", "cyngerdd", "nm", false), + new DictionaryEntry("disease", "clefyd", "nm", false), + new DictionaryEntry("extremely", "dros ben", "other", false), + new DictionaryEntry("flu", "ffliw", "nm", false) + ); + + /** + * Switches to the primary scene. + * @throws IOException + */ + @FXML + private void switchToPrimary() throws IOException { + App.setRoot("primary"); + } + + /** + * Sets up the table and loads the words into it. + * @param url + * @param resourceBundle + */ + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + welsh.setCellValueFactory(new PropertyValueFactory("welsh")); + english.setCellValueFactory(new PropertyValueFactory("english")); + table.setItems(list); + } + +} + diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java new file mode 100644 index 0000000..29644d3 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java @@ -0,0 +1,144 @@ +/** + * @(#) DictionaryEntry.java 0,1 2020/04/07 + *

+ * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ +package uk.ac.aber.cs22120.group20; + +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleStringProperty; + +/** + * A class that demonstrates how a controller works. + * + * @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 Initial development + * @see DictionaryController + */ +public class DictionaryEntry { + private SimpleStringProperty english; + private SimpleStringProperty welsh; + private SimpleStringProperty wordType; + private SimpleBooleanProperty practiceWord; + + /** + * Creates new instance of a DictionaryEntry + * + * @param english english translation of the word + * @param welsh welsh translation of the word + * @param wordType type of word + * @param practiceWord determines if the entry is in the practice list + * @see App + * @see DictionaryController + */ + public DictionaryEntry(String english, String welsh, String wordType, Boolean practiceWord) { + this.english = new SimpleStringProperty(english); + this.welsh = new SimpleStringProperty(welsh); + this.wordType = new SimpleStringProperty(wordType); + this.practiceWord = new SimpleBooleanProperty(practiceWord); + + } + + /** + * @return the plain text English word in the entry. + */ + public String getEnglish() { + return english.get(); + } + + /** + * + * @return the SimpleStringProperty of the English word in the entry. + */ + public SimpleStringProperty englishProperty() { + return english; + } + + /** + * Sets the English word in the entry. + * @param english the English word you want to set/change. + */ + public void setEnglish(String english) { + this.english.set(english); + } + + /** + * + * @return the plain text Welsh word in the entry. + */ + public String getWelsh() { + return welsh.get(); + } + + /** + * + * @return the SimpleStringProperty of the Welsh word in the entry. + */ + public SimpleStringProperty welshProperty() { + return welsh; + } + + /** + * Sets the Welsh word in the entry. + * @param welsh + */ + public void setWelsh(String welsh) { + this.welsh.set(welsh); + } + + /** + * + * @return + */ + public String getWordType() { + return wordType.get(); + } + + /** + * + * @return + */ + public SimpleStringProperty wordTypeProperty() { + return wordType; + } + + /** + * + * @param wordType + */ + public void setWordType(String wordType) { + this.wordType.set(wordType); + } + + /** + * + * @return + */ + public boolean isPracticeWord() { + return practiceWord.get(); + } + + /** + * + * @return + */ + public SimpleBooleanProperty practiceWordProperty() { + return practiceWord; + } + + /** + * + * @param practiceWord + */ + public void setPracticeWord(boolean practiceWord) { + this.practiceWord.set(practiceWord); + } +} diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java new file mode 100644 index 0000000..401d547 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java @@ -0,0 +1,36 @@ +/** + * @(#) PrimaryController.java 0,1 2020/04/07 + * + * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ +package uk.ac.aber.cs22120.group20; + +import java.io.IOException; +import javafx.fxml.FXML; + +/** + * A class that generates a dictionary entry which is made up of: + * 1. a Welsh word + * 2. it's English translation + * 3. it's word type + * 4. whether or not it's a practice word (by default: not a practice word) + * + * @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 Initial development + * @see App + */ +public class PrimaryController { + + @FXML + private void switchToSecondary() throws IOException { + App.setRoot("secondary"); + } +} diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java new file mode 100644 index 0000000..8d40e2d --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java @@ -0,0 +1,32 @@ +/** + * @(#) SecondaryController.java 0,1 2020/04/07 + * + * Copyright (c) 2020 Aberystwyth University. + * All rights reserved. + */ +package uk.ac.aber.cs22120.group20; + +import java.io.IOException; +import javafx.fxml.FXML; + +/** + * A class that demonstrates how a controller works. + * + * @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 Initial development + * @see App + */ +public class SecondaryController { + + @FXML + private void switchToDictionary() throws IOException { + App.setRoot("dictionary"); + } +} \ No newline at end of file diff --git a/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml new file mode 100644 index 0000000..5c96094 --- /dev/null +++ b/dev/20200407/osp1/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +