Edited SixMeanings FXML and Java file to be work with JavaFX
This commit is contained in:
parent
fdaa8dc039
commit
7050b07171
2 changed files with 18 additions and 38 deletions
|
@ -10,6 +10,8 @@ import javafx.fxml.FXML;
|
|||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.text.Text;
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
||||
import java.net.URL;
|
||||
|
@ -41,50 +43,30 @@ public class SixMeaningsQuestion extends TranslationController implements Initia
|
|||
|
||||
|
||||
@FXML
|
||||
private Label EngWord1;
|
||||
private Label wordToTranslate;
|
||||
|
||||
@FXML
|
||||
private Label EngWord2;
|
||||
private Text possibleAnswer1;
|
||||
|
||||
@FXML
|
||||
private Label EngWord3;
|
||||
private Text possibleAnswer2;
|
||||
|
||||
@FXML
|
||||
private Label EngWord4;
|
||||
private Text possibleAnswer3;
|
||||
|
||||
@FXML
|
||||
private Label EngWord5;
|
||||
private Text possibleAnswer4;
|
||||
|
||||
@FXML
|
||||
private Label EngWord6;
|
||||
|
||||
private Text possibleAnswer5;
|
||||
|
||||
@FXML
|
||||
private Label WelshWord1;
|
||||
private Text possibleAnswer6;
|
||||
|
||||
@FXML
|
||||
private Label CorrectAnswer;
|
||||
void temp(MouseEvent event) {
|
||||
|
||||
@FXML
|
||||
private Label WrongAnswer;
|
||||
|
||||
|
||||
/*
|
||||
@FXML
|
||||
private Label WelshWord2;
|
||||
|
||||
@FXML
|
||||
private Label WelshWord3;
|
||||
|
||||
@FXML
|
||||
private Label WelshWord4;
|
||||
|
||||
@FXML
|
||||
private Label WelshWord5;
|
||||
|
||||
@FXML
|
||||
private Label WelshWord6;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
private void getWords(LinkedList<DictionaryEntry> practiceList){
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.TitledPane?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
|
@ -8,7 +7,6 @@
|
|||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
|
||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<TitledPane animated="false" prefHeight="400.0" prefWidth="600.0" text="Learn">
|
||||
|
@ -18,17 +16,17 @@
|
|||
</TitledPane>
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0">
|
||||
<children>
|
||||
<Label layoutX="228.0" layoutY="73.0" text="Welsh Word">
|
||||
<Label fx:id="wordToTranslate" layoutX="228.0" layoutY="73.0" text="Welsh Word">
|
||||
<font>
|
||||
<Font name="System Bold" size="25.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<Button layoutX="252.0" layoutY="149.0" mnemonicParsing="false" text="English Word 2" />
|
||||
<Button layoutX="464.0" layoutY="149.0" mnemonicParsing="false" text="English Word 3" />
|
||||
<Button layoutX="53.0" layoutY="149.0" mnemonicParsing="false" text="English Word 1" />
|
||||
<Button layoutX="53.0" layoutY="267.0" mnemonicParsing="false" text="English Word 4" />
|
||||
<Button layoutX="252.0" layoutY="267.0" mnemonicParsing="false" text="English Word 5" />
|
||||
<Button layoutX="464.0" layoutY="267.0" mnemonicParsing="false" text="English Word 6" />
|
||||
<Text fx:id="possibleAnswer1" layoutX="61.0" layoutY="176.0" onMouseClicked="#temp" strokeType="OUTSIDE" strokeWidth="0.0" text="English Word 1" />
|
||||
<Text fx:id="possibleAnswer2" layoutX="260.0" layoutY="175.0" onMouseClicked="#temp" strokeType="OUTSIDE" strokeWidth="0.0" text="English Word 2" />
|
||||
<Text fx:id="possibleAnswer3" layoutX="472.0" layoutY="175.0" onMouseClicked="#temp" strokeType="OUTSIDE" strokeWidth="0.0" text="English Word 3" />
|
||||
<Text fx:id="possibleAnswer4" layoutX="61.0" layoutY="297.0" onMouseClicked="#temp" strokeType="OUTSIDE" strokeWidth="0.0" text="English Word 4" />
|
||||
<Text fx:id="possibleAnswer5" layoutX="260.0" layoutY="297.0" onMouseClicked="#temp" strokeType="OUTSIDE" strokeWidth="0.0" text="English Word 5" />
|
||||
<Text fx:id="possibleAnswer6" layoutX="472.0" layoutY="297.0" onMouseClicked="#temp" strokeType="OUTSIDE" strokeWidth="0.0" text="English Word 6" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<Text layoutX="469.0" layoutY="51.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Correct Guesses: 0" />
|
||||
|
|
Reference in a new issue