Added directory for this week and add Dictionary Page work from last week

This commit is contained in:
osp1 2020-04-07 16:03:14 +01:00
parent b1dcd269a2
commit 043e6109d4
55 changed files with 1319 additions and 113 deletions

View file

@ -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("ò");
}

View file

@ -19,14 +19,16 @@ import org.openjfx.javaFX.App;
public class ViewboxController {
public ListView<WelshDictionary> EnglishlistView;
@FXML private TextField welsh;
@FXML private TextField english;
@FXML
private TextField welsh;
@FXML
private TextField english;
private Scene firstScene;
public static final ObservableList<WelshDictionary> names = FXCollections.observableArrayList();
public static final ObservableList<WelshDictionary> 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<WelshDictionary>() {
@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());
}

View file

@ -29,7 +29,7 @@
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="Repository.Attach.Sources" value="false" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$USER_HOME$/Downloads/flashcardfx/hellofx" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Libraries" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
@ -77,34 +77,34 @@
<servers />
</component>
<component name="WindowStateProjectService">
<state x="850" y="40" width="378" height="567" key="#com.intellij.ide.util.MemberChooser" timestamp="1585933168667">
<state x="844" y="-20" width="378" height="567" key="#com.intellij.ide.util.MemberChooser" timestamp="1586259342520">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="850" y="40" width="378" height="567" key="#com.intellij.ide.util.MemberChooser/0.0.1366.768@0.0.1366.768" timestamp="1585933168667" />
<state x="844" y="-20" width="378" height="567" key="#com.intellij.ide.util.MemberChooser/0.0.1366.768@0.0.1366.768" timestamp="1586259342520" />
<state x="468" y="181" width="414" height="224" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes" timestamp="1585928644204">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="468" y="181" width="414" height="224" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes/0.0.1366.768@0.0.1366.768" timestamp="1585928644204" />
<state x="663" y="84" width="428" height="476" key="FileChooserDialogImpl" timestamp="1586119711041">
<state x="659" y="44" width="428" height="476" key="FileChooserDialogImpl" timestamp="1586252034026">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="663" y="84" width="428" height="476" key="FileChooserDialogImpl/0.0.1366.768@0.0.1366.768" timestamp="1586119711041" />
<state width="1324" height="183" key="GridCell.Tab.0.bottom" timestamp="1586119960464">
<state x="659" y="44" width="428" height="476" key="FileChooserDialogImpl/0.0.1366.768@0.0.1366.768" timestamp="1586252034026" />
<state width="1298" height="183" key="GridCell.Tab.0.bottom" timestamp="1586264986186">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1324" height="183" key="GridCell.Tab.0.bottom/0.0.1366.768@0.0.1366.768" timestamp="1586119960464" />
<state width="1324" height="183" key="GridCell.Tab.0.center" timestamp="1586119960464">
<state width="1298" height="183" key="GridCell.Tab.0.bottom/0.0.1366.768@0.0.1366.768" timestamp="1586264986186" />
<state width="1298" height="183" key="GridCell.Tab.0.center" timestamp="1586264986185">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1324" height="183" key="GridCell.Tab.0.center/0.0.1366.768@0.0.1366.768" timestamp="1586119960464" />
<state width="1324" height="183" key="GridCell.Tab.0.left" timestamp="1586119960463">
<state width="1298" height="183" key="GridCell.Tab.0.center/0.0.1366.768@0.0.1366.768" timestamp="1586264986185" />
<state width="1298" height="183" key="GridCell.Tab.0.left" timestamp="1586264986185">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1324" height="183" key="GridCell.Tab.0.left/0.0.1366.768@0.0.1366.768" timestamp="1586119960463" />
<state width="1324" height="183" key="GridCell.Tab.0.right" timestamp="1586119960464">
<state width="1298" height="183" key="GridCell.Tab.0.left/0.0.1366.768@0.0.1366.768" timestamp="1586264986185" />
<state width="1298" height="183" key="GridCell.Tab.0.right" timestamp="1586264986186">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1324" height="183" key="GridCell.Tab.0.right/0.0.1366.768@0.0.1366.768" timestamp="1586119960464" />
<state width="1298" height="183" key="GridCell.Tab.0.right/0.0.1366.768@0.0.1366.768" timestamp="1586264986186" />
<state width="1298" height="214" key="GridCell.Tab.1.bottom" timestamp="1585933654818">
<screen x="0" y="0" width="1366" height="768" />
</state>
@ -129,10 +129,10 @@
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="170" y="-23" width="1028" height="760" key="SettingsEditor/0.0.1366.768@0.0.1366.768" timestamp="1585912535241" />
<state x="368" y="92" key="com.intellij.ide.util.TipDialog" timestamp="1586117953632">
<state x="360" y="12" key="com.intellij.ide.util.TipDialog" timestamp="1586263290435">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="368" y="92" key="com.intellij.ide.util.TipDialog/0.0.1366.768@0.0.1366.768" timestamp="1586117953632" />
<state x="360" y="12" key="com.intellij.ide.util.TipDialog/0.0.1366.768@0.0.1366.768" timestamp="1586263290435" />
<state x="403" y="237" width="540" height="198" key="com.intellij.jarRepository.RepositoryAttachDialog-DOWNLOAD" timestamp="1585773184919">
<screen x="0" y="0" width="1366" height="768" />
</state>

View file

@ -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<WelshDictionary> words = new LinkedList<>();
public static LinkedList<DictionaryEntry> 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();
}

View file

@ -1,78 +1,79 @@
/**
* @(#) DictionaryController.java 0,1 2020/04/07
* <p>
* 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<WelshDictionary> table;
@FXML private TableColumn<WelshDictionary, String> english;
@FXML private TableColumn<WelshDictionary, String> welsh;
@FXML
private TableView<DictionaryEntry> table;
@FXML
private TableColumn<DictionaryEntry, String> english;
@FXML
private TableColumn<DictionaryEntry, String> welsh;
private Scene firstScene;
public ObservableList<WelshDictionary> 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<DictionaryEntry> 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<WelshDictionary, String>("welsh"));
english.setCellValueFactory(new PropertyValueFactory<WelshDictionary, String>("english"));
welsh.setCellValueFactory(new PropertyValueFactory<DictionaryEntry, String>("welsh"));
english.setCellValueFactory(new PropertyValueFactory<DictionaryEntry, String>("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<WelshDictionary>() {
// @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);
// }
//}

View file

@ -0,0 +1,144 @@
/**
* @(#) DictionaryEntry.java 0,1 2020/04/07
* <p>
* 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);
}
}

View file

@ -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 {

View file

@ -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 {

View file

@ -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;
}
}

0
dev/20200407/.gitkeep Normal file
View file

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="Welsh Vocabulary Tutor" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="Welsh Vocabulary Tutor" target="11" />
</bytecodeTargetLevel>
</component>
</project>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-base:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-base:linux:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-linux.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-controls:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-controls:linux:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-linux.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-fxml:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-fxml:linux:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-linux.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-graphics:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.openjfx:javafx-graphics:linux:11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-linux.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,12 @@
<component name="libraryTable">
<library name="com.fasterxml.jackson.core:jackson-databind:2.9.4" type="repository">
<properties maven-id="com.fasterxml.jackson.core:jackson-databind:2.9.4" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.9.4/jackson-databind-2.9.4.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.4/jackson-core-2.9.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" project-jdk-name="13" project-jdk-type="JavaSDK" />
</project>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Welsh Vocabulary Tutor.iml" filepath="$PROJECT_DIR$/Welsh Vocabulary Tutor.iml" />
</modules>
</component>
</project>

View file

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

View file

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="74c56609-bfbb-483f-b935-8323944f5e88" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FavoritesManager">
<favorites_list name="Welsh Vocabulary Tutor" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="ProjectId" id="1ZxEmkYd43Wmmc6tzNrFvitkgf4" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="Downloaded.Files.Path.Enabled" value="false" />
<property name="Repository.Attach.Annotations" value="false" />
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="Repository.Attach.Sources" value="false" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Libraries" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="settings.editor.selected.configurable" value="project.propCompiler" />
</component>
<component name="RecentsManager">
<key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
<recent name="uk.ac.aber.cs22120.group20" />
</key>
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="uk.ac.aber.cs22120.group20.json" />
</key>
</component>
<component name="RunManager">
<configuration name="App" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="uk.ac.aber.cs22120.group20.App" />
<module name="Welsh Vocabulary Tutor" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="uk.ac.aber.cs22120.group20.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.App" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="74c56609-bfbb-483f-b935-8323944f5e88" name="Default Changelist" comment="" />
<created>1585772505035</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1585772505035</updated>
</task>
<servers />
</component>
<component name="WindowStateProjectService">
<state x="844" y="-20" width="378" height="567" key="#com.intellij.ide.util.MemberChooser" timestamp="1586259342520">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="844" y="-20" width="378" height="567" key="#com.intellij.ide.util.MemberChooser/0.0.1366.768@0.0.1366.768" timestamp="1586259342520" />
<state x="468" y="181" width="414" height="224" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes" timestamp="1585928644204">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="468" y="181" width="414" height="224" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes/0.0.1366.768@0.0.1366.768" timestamp="1585928644204" />
<state x="659" y="44" width="428" height="476" key="FileChooserDialogImpl" timestamp="1586252034026">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="659" y="44" width="428" height="476" key="FileChooserDialogImpl/0.0.1366.768@0.0.1366.768" timestamp="1586252034026" />
<state width="1298" height="183" key="GridCell.Tab.0.bottom" timestamp="1586264986186">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="183" key="GridCell.Tab.0.bottom/0.0.1366.768@0.0.1366.768" timestamp="1586264986186" />
<state width="1298" height="183" key="GridCell.Tab.0.center" timestamp="1586264986185">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="183" key="GridCell.Tab.0.center/0.0.1366.768@0.0.1366.768" timestamp="1586264986185" />
<state width="1298" height="183" key="GridCell.Tab.0.left" timestamp="1586264986185">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="183" key="GridCell.Tab.0.left/0.0.1366.768@0.0.1366.768" timestamp="1586264986185" />
<state width="1298" height="183" key="GridCell.Tab.0.right" timestamp="1586264986186">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="183" key="GridCell.Tab.0.right/0.0.1366.768@0.0.1366.768" timestamp="1586264986186" />
<state width="1298" height="214" key="GridCell.Tab.1.bottom" timestamp="1585933654818">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="214" key="GridCell.Tab.1.bottom/0.0.1366.768@0.0.1366.768" timestamp="1585933654818" />
<state width="1298" height="214" key="GridCell.Tab.1.center" timestamp="1585933654817">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="214" key="GridCell.Tab.1.center/0.0.1366.768@0.0.1366.768" timestamp="1585933654817" />
<state width="1298" height="214" key="GridCell.Tab.1.left" timestamp="1585933654817">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="214" key="GridCell.Tab.1.left/0.0.1366.768@0.0.1366.768" timestamp="1585933654817" />
<state width="1298" height="214" key="GridCell.Tab.1.right" timestamp="1585933654817">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state width="1298" height="214" key="GridCell.Tab.1.right/0.0.1366.768@0.0.1366.768" timestamp="1585933654817" />
<state x="219" y="50" width="928" height="676" key="Maven.ArtifactSearchDialog" timestamp="1585773209768">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="219" y="50" width="928" height="676" key="Maven.ArtifactSearchDialog/0.0.1366.768@0.0.1366.768" timestamp="1585773209768" />
<state x="170" y="-23" width="1028" height="760" key="SettingsEditor" timestamp="1585912535241">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="170" y="-23" width="1028" height="760" key="SettingsEditor/0.0.1366.768@0.0.1366.768" timestamp="1585912535241" />
<state x="360" y="12" key="com.intellij.ide.util.TipDialog" timestamp="1586263290435">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="360" y="12" key="com.intellij.ide.util.TipDialog/0.0.1366.768@0.0.1366.768" timestamp="1586263290435" />
<state x="403" y="237" width="540" height="198" key="com.intellij.jarRepository.RepositoryAttachDialog-DOWNLOAD" timestamp="1585773184919">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="403" y="237" width="540" height="198" key="com.intellij.jarRepository.RepositoryAttachDialog-DOWNLOAD/0.0.1366.768@0.0.1366.768" timestamp="1585773184919" />
<state x="345" y="161" width="672" height="677" key="run.anything.popup" timestamp="1585911915018">
<screen x="0" y="0" width="1366" height="768" />
</state>
<state x="345" y="161" width="672" height="677" key="run.anything.popup/0.0.1366.768@0.0.1366.768" timestamp="1585911915018" />
</component>
</project>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:11" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:11" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:11" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:11" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:11" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:11" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-fxml:11" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-fxml:linux:11" level="project" />
<orderEntry type="library" name="com.fasterxml.jackson.core:jackson-databind:2.9.4" level="project" />
</component>
</module>

View file

@ -0,0 +1,44 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uk.ac.aber.cs22120.group20</groupId>
<artifactId>Welsh Vocabulary Tutor</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.1</version>
<configuration>
<mainClass>uk.ac.aber.cs22120.group20.App</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -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;
}

View file

@ -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<DictionaryEntry> 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();
}
}

View file

@ -0,0 +1,79 @@
/**
* @(#) DictionaryController.java 0,1 2020/04/07
* <p>
* 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<DictionaryEntry> table;
@FXML
private TableColumn<DictionaryEntry, String> english;
@FXML
private TableColumn<DictionaryEntry, String> welsh;
public ObservableList<DictionaryEntry> 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<DictionaryEntry, String>("welsh"));
english.setCellValueFactory(new PropertyValueFactory<DictionaryEntry, String>("english"));
table.setItems(list);
}
}

View file

@ -0,0 +1,144 @@
/**
* @(#) DictionaryEntry.java 0,1 2020/04/07
* <p>
* 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);
}
}

View file

@ -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");
}
}

View file

@ -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");
}
}

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox alignment="CENTER" prefHeight="512.0" prefWidth="432.0" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.DictionaryController">
<children>
<HBox prefHeight="2.0" prefWidth="392.0">
<children>
<Label alignment="CENTER" text="Dictionary">
<font>
<Font name="System Bold" size="17.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0">
<children>
<Label text="Search:" />
<TextField prefHeight="28.0" prefWidth="342.0" HBox.hgrow="ALWAYS" />
</children>
</HBox>
<TableView fx:id="table">
<columns>
<TableColumn fx:id="english" prefWidth="196.0" text="English" />
<TableColumn fx:id="welsh" prefWidth="195.0" text="Welsh" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
<Button fx:id="primaryButton" onAction="#switchToPrimary" text="Switch to Primary View" />
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</VBox>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.VBox?>
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="uk.ac.aber.cs22120.group20.PrimaryController">
<children>
<Label text="Primary View"/>
<Button fx:id="primaryButton" onAction="#switchToSecondary" text="Switch to Secondary View"/>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
</padding>
</VBox>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Button?>
<?import javafx.geometry.Insets?>
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="uk.ac.aber.cs22120.group20.SecondaryController">
<children>
<Label text="Secondary View"/>
<Button fx:id="dictionaryButton" text="Switch to Dictionary View" onAction="#switchToDictionary"/>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
</padding>
</VBox>

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox alignment="CENTER" prefHeight="512.0" prefWidth="432.0" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.DictionaryController">
<children>
<HBox prefHeight="2.0" prefWidth="392.0">
<children>
<Label alignment="CENTER" text="Dictionary">
<font>
<Font name="System Bold" size="17.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0">
<children>
<Label text="Search:" />
<TextField prefHeight="28.0" prefWidth="342.0" HBox.hgrow="ALWAYS" />
</children>
</HBox>
<TableView fx:id="table">
<columns>
<TableColumn fx:id="english" prefWidth="196.0" text="English" />
<TableColumn fx:id="welsh" prefWidth="195.0" text="Welsh" />
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
<Button fx:id="primaryButton" onAction="#switchToPrimary" text="Switch to Primary View" />
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</VBox>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.VBox?>
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="uk.ac.aber.cs22120.group20.PrimaryController">
<children>
<Label text="Primary View"/>
<Button fx:id="primaryButton" onAction="#switchToSecondary" text="Switch to Secondary View"/>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
</padding>
</VBox>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Button?>
<?import javafx.geometry.Insets?>
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="uk.ac.aber.cs22120.group20.SecondaryController">
<children>
<Label text="Secondary View"/>
<Button fx:id="dictionaryButton" text="Switch to Dictionary View" onAction="#switchToDictionary"/>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
</padding>
</VBox>