This commit is contained in:
Henry Dugmore 2020-05-01 12:50:13 +01:00
commit b4aa7d72cf
17 changed files with 234 additions and 129 deletions

View file

@ -237,4 +237,91 @@ public class AddWordController extends SharedCodeController {
welsh.appendText("th");
}
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("ô");
}
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("ä");
}
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("ü");
}
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("é");
}
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("");
}
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("ì"); }
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

@ -73,6 +73,7 @@ public class DictionaryController extends SharedCodeController {
else if (welsh.getSortType().equals(TableColumn.SortType.DESCENDING)) {
alphaSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-alpha-up-reversed-50.png"));
}
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-welsh-50.png"));
table.getSortOrder().clear();
table.getSortOrder().add(welsh);
isSortedByEnglish = false;
@ -84,6 +85,7 @@ public class DictionaryController extends SharedCodeController {
else if (english.getSortType().equals(TableColumn.SortType.DESCENDING)) {
alphaSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-alpha-up-reversed-50.png"));
}
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-eng-50.png"));
table.getSortOrder().clear();
table.getSortOrder().add(english);
isSortedByEnglish = true;
@ -164,7 +166,7 @@ public class DictionaryController extends SharedCodeController {
currentPageText.setText("Dictionary");
alphaSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-alpha-up-50.png"));
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-50.png"));
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-eng-50.png"));
dictionaryIcon.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/read-50.png")));
dictionaryText.setFill(Color.BLACK);

View file

@ -200,8 +200,8 @@ public class MatchTheMeaningController extends SharedCodeController {
studyText.setFill(Color.BLACK);
setWords(answer,orderList);
CorrectAnswer.setText(Integer.toString(AssessmentGenerator.getTotalCorrectAnswers()));
WrongAnswer.setText(Integer.toString(AssessmentGenerator.getTotalAnswers()));
CorrectAnswer.setText(": " + Integer.toString(AssessmentGenerator.getTotalCorrectAnswers()));
WrongAnswer.setText(": " + Integer.toString(AssessmentGenerator.getTotalAnswers()));
}
}

View file

@ -68,6 +68,7 @@ public class PracticeListController extends SharedCodeController {
} else if (welsh.getSortType().equals(TableColumn.SortType.DESCENDING)) {
alphaSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-alpha-up-reversed-50.png"));
}
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-welsh-50.png"));
table.getSortOrder().clear();
table.getSortOrder().add(welsh);
isSortedByEnglish = false;
@ -77,6 +78,8 @@ public class PracticeListController extends SharedCodeController {
} else if (english.getSortType().equals(TableColumn.SortType.DESCENDING)) {
alphaSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-alpha-up-reversed-50.png"));
}
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-eng-50.png"));
table.getSortOrder().clear();
table.getSortOrder().add(english);
isSortedByEnglish = true;
@ -159,7 +162,7 @@ public class PracticeListController extends SharedCodeController {
currentPageText.setText("Practice List");
alphaSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-alpha-up-50.png"));
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-50.png"));
langSort.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/sort-lang-eng-50.png"));
practiceListIcon.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/rating-50.png")));
practiceListTest.setFill(Color.BLACK);

View file

@ -14,7 +14,7 @@ import java.net.URL;
*
* @author Luke Wybar (LAW39)
* @version 0.1
* @see SceneEnum
* @see SceneType
*/
public class ScreenSwitch extends SharedCodeController {
private static Scene scene;
@ -28,7 +28,7 @@ public class ScreenSwitch extends SharedCodeController {
* @param stage This a JavaFX stage setup by application, this will be ready to have a scene assigned.
*/
public ScreenSwitch(Stage stage){
scene = new Scene(fxmlLoader(SceneEnum.dictionaryScene));
scene = new Scene(fxmlLoader(SceneType.dictionaryScene));
stage.setMinHeight(680);
stage.setHeight(680);
stage.setMinWidth(1100);
@ -37,43 +37,14 @@ public class ScreenSwitch extends SharedCodeController {
stage.show();
ScreenSwitch.stage = stage;
}
/**
* This method should only be used by Application.
* This provides legacy support for the old way of screen switching by continuing to allow Application to access scene.
* It should be removed before release.
*
* @Deprecated This is depreciated pending removal of all legacy screen switches
* @see Application
* @return This returns the currently displayed scene for purposes of screen switching
*/
public static void setLegacyScene(String fxmlFile){
System.err.println("Switching Scene with legacy method, you should change to ScreenSwitch");
String fileInclExtension = fxmlFile + ".fxml";
Parent root = null;
try{
root = FXMLLoader.load(new URL("file:src/main/resources/uk/ac/aber/cs22120/group20/" + fileInclExtension));
}catch (IOException e){ // If an error occurs, print out error message on STDIO and crash gracefully
System.err.print("Loading the FXML file ");
System.err.print(fileInclExtension);
System.err.println(" failed!");
System.err.println("Using depreciated method, shame!");
e.printStackTrace(System.err);
System.exit(-1);
}
scene.setRoot(root);
}
/**
* Method that is responsible for the switching between
* JavaFX, with it taking the new scenes name as an enum as a parameter.
* @see SceneEnum
* @see SceneType
* @param newScene This is a SceneEnum of the scene which is requested to switch to
*/
public static void swap(SceneEnum newScene){
public static void swap(SceneType newScene){
Parent root = fxmlLoader(newScene);
scene.setRoot(root);
}
@ -85,7 +56,7 @@ public class ScreenSwitch extends SharedCodeController {
* @param newScene This is a SceneEnum of the scene which is to be loaded in.
* @return Parent containing the interpreted FXML.
*/
private static Parent fxmlLoader(SceneEnum newScene){
private static Parent fxmlLoader(SceneType newScene){
Parent root = null;
try{
String fxmlName = newScene.getFXML();
@ -102,7 +73,7 @@ public class ScreenSwitch extends SharedCodeController {
return root;
}
public enum SceneEnum{
public enum SceneType {
/**
* Enum containing each of the scenes required for use in the program along with the FXML file names.
* This is a sub-enum of ScreenSwitch
@ -132,7 +103,7 @@ public class ScreenSwitch extends SharedCodeController {
*
* @param fxmlName This is the FXML file name including extension.
*/
SceneEnum(String fxmlName) {
SceneType(String fxmlName) {
this.fxmlName = fxmlName;
}
/**

View file

@ -133,7 +133,7 @@ abstract public class SharedCodeController {
*/
@FXML
private void dictionaryIconClick() {
ScreenSwitch.swap(ScreenSwitch.SceneEnum.dictionaryScene);
ScreenSwitch.swap(ScreenSwitch.SceneType.dictionaryScene);
}
/**
@ -142,7 +142,7 @@ abstract public class SharedCodeController {
*/
@FXML
private void practiceListIconClick() {
ScreenSwitch.swap(ScreenSwitch.SceneEnum.practiceListScene);
ScreenSwitch.swap(ScreenSwitch.SceneType.practiceListScene);
}
/**
@ -163,7 +163,7 @@ abstract public class SharedCodeController {
alert.setContentText("The practice list is currently empty, please add some practice words to use the Flashcard feature.");
alert.showAndWait();
} else{
ScreenSwitch.swap(ScreenSwitch.SceneEnum.flashcardScene); // Switch to flashcard scene if the program has practice words.
ScreenSwitch.swap(ScreenSwitch.SceneType.flashcardScene); // Switch to flashcard scene if the program has practice words.
}
}
@ -185,7 +185,7 @@ abstract public class SharedCodeController {
@FXML
private void addWordIconClick(){
ScreenSwitch.swap(ScreenSwitch.SceneEnum.addWordScene);
ScreenSwitch.swap(ScreenSwitch.SceneType.addWordScene);
}
}

View file

@ -16,7 +16,9 @@ import uk.ac.aber.cs221.group20.json.DictionaryEntry;
import uk.ac.aber.cs221.group20.selfassessment.AssessmentGenerator;
import uk.ac.aber.cs221.group20.selfassessment.Question;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
/**
* A class that generate questions and check answers for match the meaning test.
@ -45,10 +47,10 @@ public class SixMeaningsController extends SharedCodeController {
// Instance variables. //
// /////////////////// //
private ArrayList<DictionaryEntry> wordSet = new ArrayList<>();
private ArrayList<Integer> orderList = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5));
private final ArrayList<DictionaryEntry> wordSet = new ArrayList<>();
private final ArrayList<Integer> orderList = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5));
private String wordCounterpart;
private boolean isEnglish = AssessmentGenerator.isEnglish;
private final boolean isEnglish = AssessmentGenerator.isEnglish;
@FXML
private Text correctAnswer;
@ -86,26 +88,31 @@ public class SixMeaningsController extends SharedCodeController {
wordCounterpart = possibleAnswer1.getText();
checkAnswers();
}
@FXML
void answer2(MouseEvent event) {
wordCounterpart = possibleAnswer2.getText();
checkAnswers();
}
@FXML
void answer3(MouseEvent event) {
wordCounterpart = possibleAnswer3.getText();
checkAnswers();
}
@FXML
void answer4(MouseEvent event) {
wordCounterpart = possibleAnswer4.getText();
checkAnswers();
}
@FXML
void answer5(MouseEvent event) {
wordCounterpart = possibleAnswer5.getText();
checkAnswers();
}
@FXML
void answer6(MouseEvent event) {
wordCounterpart = possibleAnswer6.getText();
@ -113,10 +120,9 @@ public class SixMeaningsController extends SharedCodeController {
}
public void setWords(ArrayList<DictionaryEntry> questions, ArrayList<Integer> orderList) {
public void setWords(ArrayList<DictionaryEntry> questions, ArrayList<Integer> orderList){
if(isEnglish){
if (isEnglish) {
wordSet.add(questions.get(0));
@ -132,7 +138,7 @@ public class SixMeaningsController extends SharedCodeController {
possibleAnswer4.setText(questions.get(orderList.get(3)).getWelsh());
possibleAnswer5.setText(questions.get(orderList.get(4)).getWelsh());
possibleAnswer6.setText(questions.get(orderList.get(5)).getWelsh());
}else {
} else {
wordSet.add(questions.get(0));
//WelshWord1 Is the question word and as a result is always right.
@ -153,15 +159,13 @@ public class SixMeaningsController extends SharedCodeController {
}
public void checkAnswers() {
ArrayList<String> answer = new ArrayList<>();
answer.add(wordCounterpart);
Question.checkAnswer(wordSet,answer,isEnglish);
Question.checkAnswer(wordSet, answer, isEnglish);
wordSet.clear();
@ -180,11 +184,11 @@ public class SixMeaningsController extends SharedCodeController {
studyIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/pass-fail-50.png"));
studyText.setFill(Color.BLACK);
setWords(allQuestions,orderList);
correctAnswer.setText(Integer.toString(AssessmentGenerator.getTotalCorrectAnswers()));
setWords(allQuestions, orderList);
wrongAnswer.setText(Integer.toString(AssessmentGenerator.getTotalAnswers()));
correctAnswer.setText(": " + Integer.toString(AssessmentGenerator.getTotalCorrectAnswers()));
wrongAnswer.setText(": " + Integer.toString(AssessmentGenerator.getTotalAnswers()));
}

View file

@ -1,28 +1,27 @@
package uk.ac.aber.cs221.group20.javafx;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.paint.Color;
import javafx.scene.text.Text;
import java.util.ArrayList;
import java.util.Random;
import uk.ac.aber.cs221.group20.json.DictionaryEntry;
import uk.ac.aber.cs221.group20.selfassessment.AssessmentGenerator;
import uk.ac.aber.cs221.group20.selfassessment.Question;
import java.util.ArrayList;
import java.util.Random;
/**
* Controller for the translationTest fxml file.
*
* @author Brad Corbett brc9
* @version 0.1
*
*/
public class TranslationController extends SharedCodeController{
public class TranslationController extends SharedCodeController {
// //////////////// //
// Class variables. //
@ -48,10 +47,10 @@ public class TranslationController extends SharedCodeController{
private Text wordToTranslate;
@FXML
private Text correctGuesses;
private Label correctAnswer;
@FXML
private Text incorrectGuesses;
private Label totalAnswer;
@FXML
private ImageView submitButton;
@ -68,7 +67,7 @@ public class TranslationController extends SharedCodeController{
* which is the first word the user will have to translate.
*/
@FXML
private void initialize(){
private void initialize() {
setup();
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/pass-fail-50.png"));
currentPageText.setText("Study");
@ -76,17 +75,16 @@ public class TranslationController extends SharedCodeController{
studyIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/pass-fail-50.png"));
studyText.setFill(Color.BLACK);
submitButton.setImage(new Image ("file:src/main/resources/assets/icons/black_icons/50px/right-50.png"));
submitButton.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/right-50.png"));
correctGuesses.setText("Correct answers: " + AssessmentGenerator.getTotalCorrectAnswers());
incorrectGuesses.setText("Total answers: " + AssessmentGenerator.getTotalAnswers());
correctAnswer.setText(": " + AssessmentGenerator.getTotalCorrectAnswers());
totalAnswer.setText(": " + AssessmentGenerator.getTotalAnswers());
if(AssessmentGenerator.isEnglish){
if (AssessmentGenerator.isEnglish) {
wordToTranslate.setText(answer.getEnglish());
}
else{
} else {
wordToTranslate.setText(answer.getWelsh());
}
}

View file

@ -3,7 +3,6 @@ package uk.ac.aber.cs221.group20.selfassessment;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
import uk.ac.aber.cs221.group20.javafx.*;
import uk.ac.aber.cs221.group20.javafx.*;
import uk.ac.aber.cs221.group20.json.DictionaryEntry;
import java.text.DecimalFormat;
@ -93,7 +92,6 @@ public class AssessmentGenerator {
// wordsToTranslate.add(Application.practiseList.get(wordToTranslatePlace));
// wordsToTranslate.toArray();
// }
System.out.println(practiseList.size());
if(practiseList.size() > 3) {
if (((listOfAssessment.isEmpty()) || !(listOfAssessment.getLast() instanceof MatchTheMeaningQuestion))) {
generatedAssessment = generateMatchMeaning(practiseList);
@ -176,13 +174,13 @@ public class AssessmentGenerator {
if (currentQuestion instanceof MatchTheMeaningQuestion) {
MatchTheMeaningController.answer = ((MatchTheMeaningQuestion) currentQuestion).getCorrectAnswer();
ScreenSwitch.swap(ScreenSwitch.SceneEnum.matchMeaningScene);
ScreenSwitch.swap(ScreenSwitch.SceneType.matchMeaningScene);
} else if (currentQuestion instanceof SixMeaningsQuestion) {
SixMeaningsController.allQuestions = ((SixMeaningsQuestion) currentQuestion).getCorrectAnswer();
ScreenSwitch.swap(ScreenSwitch.SceneEnum.sixMeaningScene);
ScreenSwitch.swap(ScreenSwitch.SceneType.sixMeaningScene);
} else if (currentQuestion instanceof TranslationQuestion) {
TranslationController.answer = ((TranslationQuestion) currentQuestion).getCorrectAnswer();
ScreenSwitch.swap(ScreenSwitch.SceneEnum.translationScene);
ScreenSwitch.swap(ScreenSwitch.SceneType.translationScene);
} else {
System.err.print("The question has not been recognised");
System.err.println(currentQuestion);
@ -214,7 +212,7 @@ public class AssessmentGenerator {
reset();
if (result.isEmpty() || result.get() == noBtn) {
ScreenSwitch.swap(ScreenSwitch.SceneEnum.dictionaryScene);
ScreenSwitch.swap(ScreenSwitch.SceneType.dictionaryScene);
} else {
generateAssessment(Application.practiceList);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -16,7 +16,8 @@
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<BorderPane minHeight="550" minWidth="500" stylesheets="" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs221.group20.javafx.AddWordController">
<?import javafx.geometry.Insets?>
<BorderPane minHeight="550" minWidth="500" stylesheets="" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs221.group20.javafx.AddWordController">
<left>
@ -145,31 +146,53 @@
<Button mnemonicParsing="false" onAction="#addButtonClick" prefHeight="25.0" prefWidth="274.0" text="Add Word" GridPane.columnIndex="3" GridPane.rowIndex="4" />
<TextField fx:id="english" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<TextField fx:id="welsh" GridPane.columnIndex="5" GridPane.rowIndex="3" />
<GridPane prefHeight="55.0" prefWidth="258.0" GridPane.columnIndex="3" GridPane.rowIndex="5">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharch" text="ch" />
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addChardd" text="dd" GridPane.columnIndex="1" />
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharff" text="ff" GridPane.columnIndex="2" />
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharng" text="ng" GridPane.columnIndex="3" />
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharll" text="ll" GridPane.columnIndex="4" />
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharph" text="ph" GridPane.columnIndex="5" />
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharrh" text="rh" GridPane.columnIndex="6" />
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharth" text="th" GridPane.columnIndex="7" />
</GridPane>
<GridPane alignment="CENTER" prefHeight="236.0" prefWidth="328.0" GridPane.columnIndex="3" GridPane.rowIndex="6" vgap="5">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="100.0" valignment="CENTER" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button onAction="#addCharâ" mnemonicParsing="false" text="â" />
<Button onAction="#addCharê" mnemonicParsing="false" text="ê" GridPane.columnIndex="1" />
<Button onAction="#addCharî" mnemonicParsing="false" text="î" GridPane.columnIndex="2" />
<Button onAction="#addCharô" mnemonicParsing="false" text="ô" GridPane.columnIndex="3" />
<Button onAction="#addCharû" mnemonicParsing="false" text="û" GridPane.columnIndex="4" />
<Button onAction="#addCharŵ" mnemonicParsing="false" text="ŵ" GridPane.columnIndex="5" />
<Button onAction="#addCharŷ" mnemonicParsing="false" text="ŷ" GridPane.columnIndex="6" />
<Button onAction="#addCharä" mnemonicParsing="false" text="ä" GridPane.rowIndex="1" />
<Button onAction="#addCharë" mnemonicParsing="false" text="ë" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Button onAction="#addCharï" mnemonicParsing="false" text="ï" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<Button onAction="#addCharö" mnemonicParsing="false" text="ö" GridPane.columnIndex="3" GridPane.rowIndex="1" />
<Button onAction="#addCharü" mnemonicParsing="false" text="ü" GridPane.columnIndex="4" GridPane.rowIndex="1" />
<Button onAction="#addCharẅ" mnemonicParsing="false" text="ẅ" GridPane.columnIndex="5" GridPane.rowIndex="1" />
<Button onAction="#addCharÿ" mnemonicParsing="false" text="ÿ" GridPane.columnIndex="6" GridPane.rowIndex="1" />
<Button onAction="#addChará" mnemonicParsing="false" text="á" GridPane.rowIndex="2" />
<Button onAction="#addCharé" mnemonicParsing="false" text="é" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Button onAction="#addCharí" mnemonicParsing="false" text="í" GridPane.columnIndex="2" GridPane.rowIndex="2" />
<Button onAction="#addCharó" mnemonicParsing="false" text="ó" GridPane.columnIndex="3" GridPane.rowIndex="2" />
<Button onAction="#addCharú" mnemonicParsing="false" text="ú" GridPane.columnIndex="4" GridPane.rowIndex="2" />
<Button onAction="#addCharẃ" mnemonicParsing="false" text="ẃ" GridPane.columnIndex="5" GridPane.rowIndex="2" />
<Button onAction="#addCharý" mnemonicParsing="false" text="ý" GridPane.columnIndex="6" GridPane.rowIndex="2" />
<Button onAction="#addCharà" mnemonicParsing="false" text="à" GridPane.rowIndex="3" />
<Button onAction="#addCharè" mnemonicParsing="false" text="è" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Button onAction="#addCharì" mnemonicParsing="false" text="ì" GridPane.columnIndex="2" GridPane.rowIndex="3" />
<Button onAction="#addCharò" mnemonicParsing="false" text="ò" GridPane.columnIndex="3" GridPane.rowIndex="3" />
<Button onAction="#addCharù" mnemonicParsing="false" text="ù" GridPane.columnIndex="4" GridPane.rowIndex="3" />
<Button onAction="#addCharẁ" mnemonicParsing="false" text="ẁ" GridPane.columnIndex="5" GridPane.rowIndex="3" />
<Button onAction="#addCharỳ" mnemonicParsing="false" text="ỳ" GridPane.columnIndex="6" GridPane.rowIndex="3" />
</children>
<padding>
<Insets left="25.0" right="25.0" />
</padding>
</GridPane>
</GridPane>

View file

@ -128,7 +128,7 @@
<children>
<HBox alignment="TOP_RIGHT" prefHeight="0.0" prefWidth="583.0">
<children>
<Label text="Correct answers:">
<Label text="Correct answers">
<font>
<Font size="17.0" />
</font>
@ -142,7 +142,7 @@
</HBox>
<HBox alignment="TOP_RIGHT" layoutX="10.0" layoutY="33.0" prefHeight="1.0" prefWidth="583.0">
<children>
<Label text="Total answers:">
<Label text="Total answers">
<font>
<Font size="17.0" />
</font>
@ -154,16 +154,16 @@
</Label>
</children>
</HBox>
<GridPane alignment="CENTER" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="150.0" prefWidth="400.0" VBox.vgrow="ALWAYS">
<GridPane alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="150.0" VBox.vgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints halignment="LEFT" hgrow="ALWAYS" maxWidth="275.0" minWidth="146.0" prefWidth="146.0" />
<ColumnConstraints halignment="CENTER" hgrow="ALWAYS" maxWidth="437.0" minWidth="146.0" prefWidth="146.0" />
<ColumnConstraints halignment="LEFT" hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="-Infinity" prefWidth="0.0" />
<ColumnConstraints halignment="CENTER" hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="-Infinity" prefWidth="0.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="38.0" minHeight="10.0" prefHeight="38.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="38.0" minHeight="10.0" prefHeight="38.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="38.0" minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="38.0" minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<HBox alignment="CENTER_LEFT" prefHeight="38.0" GridPane.halignment="CENTER" GridPane.valignment="CENTER">

View file

@ -155,7 +155,7 @@
<Font size="17.0" />
</font>
</Text>
<Label layoutX="405.0" layoutY="50.0" text="Incorrect answers:">
<Label layoutX="405.0" layoutY="50.0" text="Incorrect answers">
<font>
<Font size="17.0" />
</font>
@ -165,7 +165,7 @@
<Font size="17.0" />
</font>
</Text>
<Label layoutX="411.0" layoutY="24.0" text="Correct answers:">
<Label layoutX="411.0" layoutY="24.0" text="Correct answers">
<font>
<Font size="17.0" />
</font>

View file

@ -13,6 +13,7 @@
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.control.Label?>
<BorderPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="uk.ac.aber.cs221.group20.javafx.TranslationController"
@ -140,16 +141,34 @@
<Font size="33.0" />
</font>
</Text>
<Text fx:id="correctGuesses" layoutX="407.0" layoutY="20.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Correct Guesses: 0" wrappingWidth="227.18359375">
<font>
<Font size="17.0" />
</font>
</Text>
<Text fx:id="incorrectGuesses" layoutX="407.0" layoutY="43.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Incorrect Guesses: 0">
<font>
<Font size="17.0" />
</font>
</Text>
<HBox alignment="TOP_RIGHT" prefHeight="0.0" prefWidth="583.0">
<children>
<Label text="Correct answers">
<font>
<Font size="17.0" />
</font>
</Label>
<Label fx:id="correctAnswer" text="0">
<font>
<Font size="17.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="TOP_RIGHT" layoutX="10.0" layoutY="33.0" prefHeight="1.0" prefWidth="583.0">
<children>
<Label text="Total answers">
<font>
<Font size="17.0" />
</font>
</Label>
<Label fx:id="totalAnswer" text="0">
<font>
<Font size="17.0" />
</font>
</Label>
</children>
</HBox>
<ImageView fx:id="submitButton" fitHeight="46.0" fitWidth="69.0" layoutX="398.0" layoutY="199.0" onMouseClicked="#translateWord" pickOnBounds="true" preserveRatio="true" />
</children>
</AnchorPane>