Updated Assessment Controllers and FXML. Correct issue #31
Correct And Total answers are now displayed, the number and text are now displayed in the same text label to reduce issues with Screen Scaling
This commit is contained in:
parent
5686d30859
commit
67d511f111
6 changed files with 87 additions and 102 deletions
|
@ -40,14 +40,14 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
// Class variables. //
|
// Class variables. //
|
||||||
// //////////////// //
|
// //////////////// //
|
||||||
|
|
||||||
public static ArrayList<DictionaryEntry> answer =new ArrayList<>();
|
public static ArrayList<DictionaryEntry> answer = new ArrayList<>();
|
||||||
|
|
||||||
// /////////////////// //
|
// /////////////////// //
|
||||||
// Instance variables. //
|
// Instance variables. //
|
||||||
// /////////////////// //
|
// /////////////////// //
|
||||||
|
|
||||||
private ArrayList<Integer> orderList = new ArrayList<>(Arrays.asList(0,1,2,3));
|
private final ArrayList<Integer> orderList = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
|
||||||
private boolean isEnglish = AssessmentGenerator.isEnglish;
|
private final boolean isEnglish = AssessmentGenerator.isEnglish;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ComboBox<String> word1;
|
private ComboBox<String> word1;
|
||||||
|
@ -86,10 +86,10 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
private Label RightWord4;
|
private Label RightWord4;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label CorrectAnswer;
|
private Label correctAnswer;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label WrongAnswer;
|
private Label totalAnswer;
|
||||||
|
|
||||||
// //////// //
|
// //////// //
|
||||||
// Methods. //
|
// Methods. //
|
||||||
|
@ -103,10 +103,10 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public void setWords(ArrayList<DictionaryEntry> questions, ArrayList<Integer> orderList){
|
public void setWords(ArrayList<DictionaryEntry> questions, ArrayList<Integer> orderList) {
|
||||||
|
|
||||||
|
|
||||||
if(isEnglish){
|
if (isEnglish) {
|
||||||
LeftWord1.setText(questions.get(0).getEnglish());
|
LeftWord1.setText(questions.get(0).getEnglish());
|
||||||
LeftWord2.setText(questions.get(1).getEnglish());
|
LeftWord2.setText(questions.get(1).getEnglish());
|
||||||
LeftWord3.setText(questions.get(2).getEnglish());
|
LeftWord3.setText(questions.get(2).getEnglish());
|
||||||
|
@ -119,7 +119,7 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
RightWord3.setText(questions.get(orderList.get(2)).getWelsh());
|
RightWord3.setText(questions.get(orderList.get(2)).getWelsh());
|
||||||
RightWord4.setText(questions.get(orderList.get(3)).getWelsh());
|
RightWord4.setText(questions.get(orderList.get(3)).getWelsh());
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
LeftWord1.setText(questions.get(0).getWelsh());
|
LeftWord1.setText(questions.get(0).getWelsh());
|
||||||
LeftWord2.setText(questions.get(1).getWelsh());
|
LeftWord2.setText(questions.get(1).getWelsh());
|
||||||
LeftWord3.setText(questions.get(2).getWelsh());
|
LeftWord3.setText(questions.get(2).getWelsh());
|
||||||
|
@ -139,23 +139,23 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
* Check if answers from users are correct.
|
* Check if answers from users are correct.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void checkAnswers(){
|
public void checkAnswers() {
|
||||||
ArrayList<DictionaryEntry> answers = new ArrayList<>();
|
ArrayList<DictionaryEntry> answers = new ArrayList<>();
|
||||||
ArrayList<String> listOfAnswers = new ArrayList<>();
|
ArrayList<String> listOfAnswers = new ArrayList<>();
|
||||||
|
|
||||||
answers.add(answer.get(Integer.parseInt(word1.getValue())-1));
|
answers.add(answer.get(Integer.parseInt(word1.getValue()) - 1));
|
||||||
answers.add(answer.get(Integer.parseInt(word2.getValue())-1));
|
answers.add(answer.get(Integer.parseInt(word2.getValue()) - 1));
|
||||||
answers.add(answer.get(Integer.parseInt(word3.getValue())-1));
|
answers.add(answer.get(Integer.parseInt(word3.getValue()) - 1));
|
||||||
answers.add(answer.get(Integer.parseInt(word4.getValue())-1));
|
answers.add(answer.get(Integer.parseInt(word4.getValue()) - 1));
|
||||||
|
|
||||||
if(isEnglish){
|
if (isEnglish) {
|
||||||
listOfAnswers.add(LeftWord1.getText());
|
listOfAnswers.add(LeftWord1.getText());
|
||||||
listOfAnswers.add(LeftWord2.getText());
|
listOfAnswers.add(LeftWord2.getText());
|
||||||
listOfAnswers.add(LeftWord3.getText());
|
listOfAnswers.add(LeftWord3.getText());
|
||||||
listOfAnswers.add(LeftWord4.getText());
|
listOfAnswers.add(LeftWord4.getText());
|
||||||
|
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
listOfAnswers.add(RightWord1.getText());
|
listOfAnswers.add(RightWord1.getText());
|
||||||
listOfAnswers.add(RightWord2.getText());
|
listOfAnswers.add(RightWord2.getText());
|
||||||
listOfAnswers.add(RightWord3.getText());
|
listOfAnswers.add(RightWord3.getText());
|
||||||
|
@ -163,13 +163,13 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(checkForDuplicates(answers)){
|
if (checkForDuplicates(answers)) {
|
||||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
alert.setTitle("Error");
|
alert.setTitle("Error");
|
||||||
alert.setHeaderText("Please check answers");
|
alert.setHeaderText("Please check answers");
|
||||||
alert.setContentText("Please ensure you have selected answers for each test word, with no duplicates.");
|
alert.setContentText("Please ensure you have selected answers for each test word, with no duplicates.");
|
||||||
alert.showAndWait();
|
alert.showAndWait();
|
||||||
}else {
|
} else {
|
||||||
|
|
||||||
Question.checkAnswer(answers, listOfAnswers, isEnglish);
|
Question.checkAnswer(answers, listOfAnswers, isEnglish);
|
||||||
|
|
||||||
|
@ -178,19 +178,19 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
AssessmentGenerator.goToNextQuestion();
|
AssessmentGenerator.goToNextQuestion();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private boolean checkForDuplicates(ArrayList<DictionaryEntry> wordSet){
|
|
||||||
boolean result = false;
|
|
||||||
Set<DictionaryEntry> set = new HashSet<>(wordSet);
|
|
||||||
|
|
||||||
if(set.size() < wordSet.size()){
|
private boolean checkForDuplicates(ArrayList<DictionaryEntry> wordSet) {
|
||||||
result = true;
|
boolean result = false;
|
||||||
}
|
Set<DictionaryEntry> set = new HashSet<>(wordSet);
|
||||||
return result;
|
|
||||||
|
if (set.size() < wordSet.size()) {
|
||||||
|
result = true;
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@FXML
|
||||||
@FXML
|
|
||||||
private void initialize() {
|
private void initialize() {
|
||||||
setup();
|
setup();
|
||||||
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/pass-fail-50.png"));
|
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/pass-fail-50.png"));
|
||||||
|
@ -199,9 +199,11 @@ public class MatchTheMeaningController extends SharedCodeController {
|
||||||
studyIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/pass-fail-50.png"));
|
studyIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/pass-fail-50.png"));
|
||||||
studyText.setFill(Color.BLACK);
|
studyText.setFill(Color.BLACK);
|
||||||
|
|
||||||
setWords(answer,orderList);
|
setWords(answer, orderList);
|
||||||
CorrectAnswer.setText(Integer.toString(AssessmentGenerator.getTotalCorrectAnswers()));
|
correctAnswer.setText("Correct answers : " + AssessmentGenerator.getTotalCorrectAnswers());
|
||||||
WrongAnswer.setText(Integer.toString(AssessmentGenerator.getTotalAnswers()));
|
|
||||||
|
totalAnswer.setText("Total answers : " + AssessmentGenerator.getTotalAnswers());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.AssessmentGenerator;
|
||||||
import uk.ac.aber.cs221.group20.selfassessment.Question;
|
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.
|
* A class that generate questions and check answers for match the meaning test.
|
||||||
|
@ -45,16 +47,16 @@ public class SixMeaningsController extends SharedCodeController {
|
||||||
// Instance variables. //
|
// Instance variables. //
|
||||||
// /////////////////// //
|
// /////////////////// //
|
||||||
|
|
||||||
private ArrayList<DictionaryEntry> wordSet = new ArrayList<>();
|
private final ArrayList<DictionaryEntry> wordSet = new ArrayList<>();
|
||||||
private ArrayList<Integer> orderList = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5));
|
private final ArrayList<Integer> orderList = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5));
|
||||||
private String wordCounterpart;
|
private String wordCounterpart;
|
||||||
private boolean isEnglish = AssessmentGenerator.isEnglish;
|
private final boolean isEnglish = AssessmentGenerator.isEnglish;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Text correctAnswer;
|
private Label correctAnswer;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Text wrongAnswer;
|
private Label totalAnswer;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label wordToTranslate;
|
private Label wordToTranslate;
|
||||||
|
@ -86,26 +88,31 @@ public class SixMeaningsController extends SharedCodeController {
|
||||||
wordCounterpart = possibleAnswer1.getText();
|
wordCounterpart = possibleAnswer1.getText();
|
||||||
checkAnswers();
|
checkAnswers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void answer2(MouseEvent event) {
|
void answer2(MouseEvent event) {
|
||||||
wordCounterpart = possibleAnswer2.getText();
|
wordCounterpart = possibleAnswer2.getText();
|
||||||
checkAnswers();
|
checkAnswers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void answer3(MouseEvent event) {
|
void answer3(MouseEvent event) {
|
||||||
wordCounterpart = possibleAnswer3.getText();
|
wordCounterpart = possibleAnswer3.getText();
|
||||||
checkAnswers();
|
checkAnswers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void answer4(MouseEvent event) {
|
void answer4(MouseEvent event) {
|
||||||
wordCounterpart = possibleAnswer4.getText();
|
wordCounterpart = possibleAnswer4.getText();
|
||||||
checkAnswers();
|
checkAnswers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void answer5(MouseEvent event) {
|
void answer5(MouseEvent event) {
|
||||||
wordCounterpart = possibleAnswer5.getText();
|
wordCounterpart = possibleAnswer5.getText();
|
||||||
checkAnswers();
|
checkAnswers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void answer6(MouseEvent event) {
|
void answer6(MouseEvent event) {
|
||||||
wordCounterpart = possibleAnswer6.getText();
|
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));
|
wordSet.add(questions.get(0));
|
||||||
|
|
||||||
|
@ -132,7 +138,7 @@ public class SixMeaningsController extends SharedCodeController {
|
||||||
possibleAnswer4.setText(questions.get(orderList.get(3)).getWelsh());
|
possibleAnswer4.setText(questions.get(orderList.get(3)).getWelsh());
|
||||||
possibleAnswer5.setText(questions.get(orderList.get(4)).getWelsh());
|
possibleAnswer5.setText(questions.get(orderList.get(4)).getWelsh());
|
||||||
possibleAnswer6.setText(questions.get(orderList.get(5)).getWelsh());
|
possibleAnswer6.setText(questions.get(orderList.get(5)).getWelsh());
|
||||||
}else {
|
} else {
|
||||||
|
|
||||||
wordSet.add(questions.get(0));
|
wordSet.add(questions.get(0));
|
||||||
//WelshWord1 Is the question word and as a result is always right.
|
//WelshWord1 Is the question word and as a result is always right.
|
||||||
|
@ -153,15 +159,13 @@ public class SixMeaningsController extends SharedCodeController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void checkAnswers() {
|
public void checkAnswers() {
|
||||||
|
|
||||||
ArrayList<String> answer = new ArrayList<>();
|
ArrayList<String> answer = new ArrayList<>();
|
||||||
|
|
||||||
answer.add(wordCounterpart);
|
answer.add(wordCounterpart);
|
||||||
|
|
||||||
Question.checkAnswer(wordSet,answer,isEnglish);
|
Question.checkAnswer(wordSet, answer, isEnglish);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wordSet.clear();
|
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"));
|
studyIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/pass-fail-50.png"));
|
||||||
studyText.setFill(Color.BLACK);
|
studyText.setFill(Color.BLACK);
|
||||||
|
|
||||||
setWords(allQuestions,orderList);
|
setWords(allQuestions, orderList);
|
||||||
|
|
||||||
correctAnswer.setText(Integer.toString(AssessmentGenerator.getTotalCorrectAnswers()));
|
correctAnswer.setText("Correct answers : " + AssessmentGenerator.getTotalCorrectAnswers());
|
||||||
|
|
||||||
wrongAnswer.setText(Integer.toString(AssessmentGenerator.getTotalAnswers()));
|
totalAnswer.setText("Total answers : " + AssessmentGenerator.getTotalAnswers());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,27 @@
|
||||||
package uk.ac.aber.cs221.group20.javafx;
|
package uk.ac.aber.cs221.group20.javafx;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.text.Text;
|
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.json.DictionaryEntry;
|
||||||
import uk.ac.aber.cs221.group20.selfassessment.AssessmentGenerator;
|
import uk.ac.aber.cs221.group20.selfassessment.AssessmentGenerator;
|
||||||
import uk.ac.aber.cs221.group20.selfassessment.Question;
|
import uk.ac.aber.cs221.group20.selfassessment.Question;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller for the translationTest fxml file.
|
* Controller for the translationTest fxml file.
|
||||||
*
|
*
|
||||||
* @author Brad Corbett brc9
|
* @author Brad Corbett brc9
|
||||||
* @version 0.1
|
* @version 0.1
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class TranslationController extends SharedCodeController{
|
public class TranslationController extends SharedCodeController {
|
||||||
|
|
||||||
// //////////////// //
|
// //////////////// //
|
||||||
// Class variables. //
|
// Class variables. //
|
||||||
|
@ -48,10 +47,10 @@ public class TranslationController extends SharedCodeController{
|
||||||
private Text wordToTranslate;
|
private Text wordToTranslate;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Text correctGuesses;
|
private Label correctAnswer;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Text incorrectGuesses;
|
private Label totalAnswer;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ImageView submitButton;
|
private ImageView submitButton;
|
||||||
|
@ -68,7 +67,7 @@ public class TranslationController extends SharedCodeController{
|
||||||
* which is the first word the user will have to translate.
|
* which is the first word the user will have to translate.
|
||||||
*/
|
*/
|
||||||
@FXML
|
@FXML
|
||||||
private void initialize(){
|
private void initialize() {
|
||||||
setup();
|
setup();
|
||||||
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/pass-fail-50.png"));
|
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/pass-fail-50.png"));
|
||||||
currentPageText.setText("Study");
|
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"));
|
studyIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/pass-fail-50.png"));
|
||||||
studyText.setFill(Color.BLACK);
|
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());
|
correctAnswer.setText("Correct answers : " + AssessmentGenerator.getTotalCorrectAnswers());
|
||||||
incorrectGuesses.setText("Total answers: " + AssessmentGenerator.getTotalAnswers());
|
|
||||||
|
totalAnswer.setText("Total answers : " + AssessmentGenerator.getTotalAnswers());
|
||||||
|
|
||||||
|
|
||||||
|
if (AssessmentGenerator.isEnglish) {
|
||||||
if(AssessmentGenerator.isEnglish){
|
|
||||||
wordToTranslate.setText(answer.getEnglish());
|
wordToTranslate.setText(answer.getEnglish());
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
wordToTranslate.setText(answer.getWelsh());
|
wordToTranslate.setText(answer.getWelsh());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,30 +128,20 @@
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="TOP_RIGHT" prefHeight="0.0" prefWidth="583.0">
|
<HBox alignment="TOP_RIGHT" prefHeight="0.0" prefWidth="583.0">
|
||||||
<children>
|
<children>
|
||||||
<Label text="Correct answers:">
|
<Label fx:id="correctAnswer">
|
||||||
<font>
|
<font>
|
||||||
<Font size="17.0" />
|
<Font name="Consolas" size="17.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label fx:id="CorrectAnswer" text="0">
|
|
||||||
<font>
|
|
||||||
<Font size="17.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox alignment="TOP_RIGHT" layoutX="10.0" layoutY="33.0" prefHeight="1.0" prefWidth="583.0">
|
<HBox alignment="TOP_RIGHT" layoutX="10.0" layoutY="33.0" prefHeight="1.0" prefWidth="583.0">
|
||||||
<children>
|
<children>
|
||||||
<Label text="Total answers:">
|
<Label fx:id="totalAnswer" layoutX="405.0" layoutY="50.0">
|
||||||
<font>
|
<font>
|
||||||
<Font size="17.0" />
|
<Font name="Consolas" size="17.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label fx:id="WrongAnswer" text="0">
|
|
||||||
<font>
|
|
||||||
<Font size="17.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<GridPane alignment="CENTER" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="150.0" prefWidth="400.0" VBox.vgrow="ALWAYS">
|
<GridPane alignment="CENTER" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="150.0" prefWidth="400.0" VBox.vgrow="ALWAYS">
|
||||||
|
|
|
@ -150,24 +150,14 @@
|
||||||
<font>
|
<font>
|
||||||
<Font size="14.0" />
|
<Font size="14.0" />
|
||||||
</font></Text>
|
</font></Text>
|
||||||
<Text fx:id="wrongAnswer" layoutX="554.0" layoutY="69.0" strokeType="OUTSIDE" strokeWidth="0.0" text="0" wrappingWidth="22.46875">
|
<Label fx:id="totalAnswer" layoutX="405.0" layoutY="50.0">
|
||||||
<font>
|
<font>
|
||||||
<Font size="17.0" />
|
<Font name="Consolas" size="17.0" />
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
<Label layoutX="405.0" layoutY="50.0" text="Incorrect answers:">
|
|
||||||
<font>
|
|
||||||
<Font size="17.0" />
|
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Text fx:id="correctAnswer" layoutX="554.0" layoutY="43.0" strokeType="OUTSIDE" strokeWidth="0.0" text="0">
|
<Label fx:id="correctAnswer" layoutX="405.0" layoutY="24.0">
|
||||||
<font>
|
<font>
|
||||||
<Font size="17.0" />
|
<Font name="Consolas" size="17.0" />
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
<Label layoutX="411.0" layoutY="24.0" text="Correct answers:">
|
|
||||||
<font>
|
|
||||||
<Font size="17.0" />
|
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
</children>
|
</children>
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<?import javafx.scene.image.ImageView?>
|
<?import javafx.scene.image.ImageView?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
<?import javafx.scene.control.Label?>
|
||||||
<BorderPane xmlns="http://javafx.com/javafx"
|
<BorderPane xmlns="http://javafx.com/javafx"
|
||||||
xmlns:fx="http://javafx.com/fxml"
|
xmlns:fx="http://javafx.com/fxml"
|
||||||
fx:controller="uk.ac.aber.cs221.group20.javafx.TranslationController"
|
fx:controller="uk.ac.aber.cs221.group20.javafx.TranslationController"
|
||||||
|
@ -140,16 +141,16 @@
|
||||||
<Font size="33.0" />
|
<Font size="33.0" />
|
||||||
</font>
|
</font>
|
||||||
</Text>
|
</Text>
|
||||||
<Text fx:id="correctGuesses" layoutX="407.0" layoutY="20.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Correct Guesses: 0" wrappingWidth="227.18359375">
|
<Label fx:id="totalAnswer" layoutX="405.0" layoutY="50.0">
|
||||||
<font>
|
<font>
|
||||||
<Font size="17.0" />
|
<Font name="Consolas" size="17.0" />
|
||||||
</font>
|
</font>
|
||||||
</Text>
|
</Label>
|
||||||
<Text fx:id="incorrectGuesses" layoutX="407.0" layoutY="43.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Incorrect Guesses: 0">
|
<Label fx:id="correctAnswer" layoutX="405.0" layoutY="24.0">
|
||||||
<font>
|
<font>
|
||||||
<Font size="17.0" />
|
<Font name="Consolas" size="17.0" />
|
||||||
</font>
|
</font>
|
||||||
</Text>
|
</Label>
|
||||||
<ImageView fx:id="submitButton" fitHeight="46.0" fitWidth="69.0" layoutX="398.0" layoutY="199.0" onMouseClicked="#translateWord" pickOnBounds="true" preserveRatio="true" />
|
<ImageView fx:id="submitButton" fitHeight="46.0" fitWidth="69.0" layoutX="398.0" layoutY="199.0" onMouseClicked="#translateWord" pickOnBounds="true" preserveRatio="true" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
Reference in a new issue