This commit is contained in:
Henry Dugmore 2020-04-30 09:25:53 +01:00
commit 4d768483bd
14 changed files with 888 additions and 273 deletions

View file

@ -8,6 +8,8 @@ import javafx.scene.control.TextField;
import java.io.IOException; import java.io.IOException;
import javafx.scene.image.Image;
import javafx.scene.paint.Color;
import uk.ac.aber.cs22120.group20.json.DictionaryEntry; import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
@ -15,7 +17,7 @@ import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
* Add Word Controller * Add Word Controller
*/ */
public class AddWordController { public class AddWordController extends SharedCodeController {
@FXML @FXML
private TextField welsh; private TextField welsh;
@ -34,6 +36,12 @@ public class AddWordController {
@FXML @FXML
private void initialize() { private void initialize() {
setup();
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/add-50.png"));
currentPageText.setText("Add");
addDefinitionIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/add-50.png"));
addDefinitionText.setFill(Color.BLACK);
wordType.getItems().addAll("Masculine noun", "Feminine noun", "Verb", "Other"); wordType.getItems().addAll("Masculine noun", "Feminine noun", "Verb", "Other");
wordType.setValue("Type"); wordType.setValue("Type");
@ -118,11 +126,6 @@ public class AddWordController {
// } // }
@FXML
private void switchToPrimary() throws IOException {
Application.setRoot("Primary");
}
// add character methods for characters ch, dd, ff, ng, ll, ph, rh, th // add character methods for characters ch, dd, ff, ng, ll, ph, rh, th
public void addCharch(ActionEvent actionEvent) { public void addCharch(ActionEvent actionEvent) {
welsh.appendText("ch"); welsh.appendText("ch");

View file

@ -19,6 +19,7 @@ import javafx.scene.control.TableView;
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.stage.Stage; import javafx.stage.Stage;
import uk.ac.aber.cs22120.group20.javafx.Application; import uk.ac.aber.cs22120.group20.javafx.Application;
import uk.ac.aber.cs22120.group20.json.DictionaryEntry; import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
@ -45,12 +46,14 @@ import java.util.ResourceBundle;
* @see Application * @see Application
*/ */
//public class DictionaryController implements Initializable { //public class DictionaryController implements Initializable {
public class DictionaryController { public class DictionaryController extends SharedCodeController {
public static Stage primaryStage = null; public static Stage primaryStage = null;
@FXML @FXML
private ImageView alphaSort; private ImageView alphaSort;
@FXML @FXML
private ImageView langSort;
@FXML
private TextField searchBox; private TextField searchBox;
@FXML @FXML
private TableView<DictionaryEntry> table; private TableView<DictionaryEntry> table;
@ -113,15 +116,6 @@ public class DictionaryController {
} }
} }
/**
* Switches to the primary scene.
*
* @throws IOException
*/
@FXML
private void switchToPracticeList() throws IOException {
ScreenSwitch.swap(ScreenSwitch.SceneEnum.practiceListScene);
}
/** /**
* Initializes the table of dictionary entries. * Initializes the table of dictionary entries.
@ -135,6 +129,13 @@ public class DictionaryController {
* @see DictionaryEntry * @see DictionaryEntry
*/ */
public void initialize() { public void initialize() {
setup();
currentPageIcon.setImage(new Image(getClass().getResourceAsStream("/assets/icons/white_icons/50px/read-50.png")));
currentPageText.setText("Dictionary");
dictionaryIcon.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/read-50.png")));
dictionaryText.setFill(Color.BLACK);
list.addAll(Application.dictionary); list.addAll(Application.dictionary);
table.setRowFactory(tv -> { table.setRowFactory(tv -> {

View file

@ -5,6 +5,7 @@ import javafx.fxml.FXML;
import javafx.scene.Node; import javafx.scene.Node;
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.shape.Rectangle; import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text; import javafx.scene.text.Text;
import javafx.scene.transform.Rotate; import javafx.scene.transform.Rotate;
@ -30,7 +31,7 @@ import java.io.IOException;
* @see SharedCodeController * @see SharedCodeController
*/ */
public class FlashcardController { public class FlashcardController extends SharedCodeController {
// /////////////////// // // /////////////////// //
// Instance Variables. // // Instance Variables. //
@ -49,9 +50,9 @@ public class FlashcardController {
private Text testWord; private Text testWord;
@FXML @FXML
private ImageView left_arrow; private ImageView leftArrow;
@FXML @FXML
private ImageView right_arrow; private ImageView rightArrow;
// //////// // // //////// //
// Methods. // // Methods. //
@ -63,14 +64,21 @@ public class FlashcardController {
*/ */
@FXML @FXML
private void initialize() { private void initialize() {
// Call method from SharedCodeController to setup the menu screen.
setup();
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/flashcard-50.png"));
currentPageText.setText("Flashcard");
flashcardIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/flashcard-50.png"));
flashcardsText.setFill(Color.BLACK);
testWord.setText(Application.practiseList.getFirst().getWelsh()); testWord.setText(Application.practiseList.getFirst().getWelsh());
wordType.setText("Welsh"); wordType.setText("Welsh");
updateCounter(); updateCounter();
card = flashcard; card = flashcard;
left_arrow.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/left-50.png"))); leftArrow.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/left-50.png")));
right_arrow.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/right-50.png"))); rightArrow.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/right-50.png")));
} }
/** /**
@ -162,9 +170,5 @@ public class FlashcardController {
} }
@FXML
private void switchToAddWord() throws IOException {
AssessmentGenerator.generateAssessment(Application.practiseList);
}
} }

View file

@ -16,6 +16,7 @@ import javafx.fxml.Initializable;
import javafx.scene.control.*; import javafx.scene.control.*;
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.stage.Stage; import javafx.stage.Stage;
import uk.ac.aber.cs22120.group20.javafx.Application; import uk.ac.aber.cs22120.group20.javafx.Application;
import uk.ac.aber.cs22120.group20.json.DictionaryEntry; import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
@ -41,12 +42,14 @@ import java.util.ResourceBundle;
* @see DictionaryEntry * @see DictionaryEntry
* @see Application * @see Application
*/ */
public class PracticeListController { public class PracticeListController extends SharedCodeController{
public static Stage primaryStage = null; public static Stage primaryStage = null;
@FXML @FXML
private ImageView alphaSort; private ImageView alphaSort;
@FXML @FXML
private ImageView langSort;
@FXML
private TextField searchBox; private TextField searchBox;
@FXML @FXML
private TableView<DictionaryEntry> table; private TableView<DictionaryEntry> table;
@ -69,6 +72,16 @@ public class PracticeListController {
* @see DictionaryEntry * @see DictionaryEntry
*/ */
public void initialize() { public void initialize() {
setup();
currentPageIcon.setImage(new Image("file:src/main/resources/assets/icons/white_icons/50px/rating-50.png"));
currentPageText.setText("Practice List");
practiceListIcon.setImage(new Image("file:src/main/resources/assets/icons/black_icons/50px/rating-50.png"));
practiceListTest.setFill(Color.BLACK);
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"));
// list.addAll(Application.dictionary); // list.addAll(Application.dictionary);
list.addAll(Application.practiseList); list.addAll(Application.practiseList);
// for (DictionaryEntry entry : Application.dictionary) { // for (DictionaryEntry entry : Application.dictionary) {
@ -220,15 +233,7 @@ public class PracticeListController {
} }
} }
/**
* Switches to the primary scene.
*
* @throws IOException
*/
@FXML
private void switchToFlashCard() throws IOException {
ScreenSwitch.swap(ScreenSwitch.SceneEnum.flashcardScene);
}
} }

View file

@ -6,6 +6,7 @@ import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.shape.Rectangle; import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text; import javafx.scene.text.Text;
import uk.ac.aber.cs22120.group20.selfassessment.AssessmentGenerator;
/** /**
* Abstract class that contains all the shared FXML elements between the * Abstract class that contains all the shared FXML elements between the
@ -123,8 +124,7 @@ abstract public class SharedCodeController {
@FXML @FXML
private void studyIconClick() { private void studyIconClick() {
AssessmentGenerator.generateAssessment(Application.practiseList);
ScreenSwitch.swap(ScreenSwitch.SceneEnum.translationScene);
} }
@FXML @FXML

View file

@ -57,7 +57,7 @@ public class DictionaryEntry {
} }
public void setEnglish(String english) { public void setEnglish(String english) {
this.english = english; this.english = english.trim();
} }
public String getWelsh() { public String getWelsh() {
@ -65,7 +65,7 @@ public class DictionaryEntry {
} }
public void setWelsh(String welsh) { public void setWelsh(String welsh) {
this.welsh = welsh; this.welsh = welsh.trim();
} }
public String getWordType() { public String getWordType() {
@ -73,7 +73,7 @@ public class DictionaryEntry {
} }
public void setWordType(String wordType) { public void setWordType(String wordType) {
this.wordType = wordType; this.wordType = wordType.trim();
} }
public Boolean isPracticeWord() { public Boolean isPracticeWord() {

View file

@ -20,7 +20,7 @@ import java.util.*;
* @See * @See
*/ */
public class AssessmentGenerator { public class AssessmentGenerator {
static boolean isEnglish; public static boolean isEnglish;
static LinkedList<Question> listOfAssessment = new LinkedList<>(); static LinkedList<Question> listOfAssessment = new LinkedList<>();
static int currentAssessment = 0; static int currentAssessment = 0;
@ -182,16 +182,12 @@ public class AssessmentGenerator {
Optional<ButtonType> result = alert.showAndWait(); Optional<ButtonType> result = alert.showAndWait();
currentAssessment = 0;
Question.resetScore();
if (result.isEmpty() || result.get() == noBtn) { if (result.isEmpty() || result.get() == noBtn) {
currentAssessment=0;
Question.resetScore();
ScreenSwitch.swap(ScreenSwitch.SceneEnum.dictionaryScene); ScreenSwitch.swap(ScreenSwitch.SceneEnum.dictionaryScene);
} else { } else {
currentAssessment = 0;
Question.resetScore();
generateAssessment(Application.practiseList); generateAssessment(Application.practiseList);
} }
} }

View file

@ -0,0 +1,57 @@
package uk.ac.aber.cs22120.group20.test;
import org.junit.Before;
import org.junit.jupiter.api.Test;
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
import uk.ac.aber.cs22120.group20.selfassessment.AssessmentGenerator;
import uk.ac.aber.cs22120.group20.selfassessment.Question;
import uk.ac.aber.cs22120.group20.selfassessment.TranslationController;
import java.util.LinkedList;
import java.util.Random;
import static org.junit.jupiter.api.Assertions.*;
public class TranslationControllerTest {
LinkedList<DictionaryEntry> practiceList;
DictionaryEntry word1 = new DictionaryEntry("english1", "welsh1", "verb");
DictionaryEntry word2 = new DictionaryEntry("english2", "welsh2", "verb");
DictionaryEntry word3 = new DictionaryEntry("english3", "welsh3", "verb");
Random rand = new Random();
int chosenWord;
TranslationController controllerToTest = new TranslationController();
@Before
public void fillList(){
practiceList.add(word1);
practiceList.add(word2);
practiceList.add(word3);
chosenWord = rand.nextInt(practiceList.size());
TranslationController.answer = practiceList.get(chosenWord);
if(AssessmentGenerator.isEnglish){
controllerToTest.wordToTranslate.setText(TranslationController.answer.getEnglish());
}
else{
controllerToTest.wordToTranslate.setText(TranslationController.answer.getWelsh());
}
}
@Test
public void testText(){
if(AssessmentGenerator.isEnglish){
assertEquals(practiceList.get(chosenWord).getEnglish(),TranslationController.answer.getEnglish());
}
else{
}
}
}

View file

@ -4,62 +4,206 @@
<?import javafx.scene.control.ComboBox?> <?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?> <?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="506.0" prefWidth="702.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.javafx.AddWordController"> <?import javafx.scene.layout.*?>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <?import javafx.scene.shape.Rectangle?>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <?import javafx.scene.image.ImageView?>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="84.33331298828125" minWidth="10.0" prefWidth="10.666646321614593" /> <?import javafx.scene.text.Text?>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="273.3333536783854" minWidth="10.0" prefWidth="273.3333536783854" /> <?import javafx.scene.text.Font?>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="87.3333740234375" minWidth="7.6666259765625" prefWidth="7.6666259765625" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <BorderPane xmlns="http://javafx.com/javafx"
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> xmlns:fx="http://javafx.com/fxml"
</columnConstraints> fx:controller="uk.ac.aber.cs22120.group20.javafx.AddWordController"
<rowConstraints> fx:id="container"
<RowConstraints maxHeight="50.66668701171875" minHeight="10.0" prefHeight="50.66668701171875" vgrow="SOMETIMES" /> stylesheets=""
<RowConstraints maxHeight="46.33333333333332" minHeight="10.0" prefHeight="46.33333333333332" vgrow="SOMETIMES" /> minWidth="500"
<RowConstraints maxHeight="37.666646321614564" minHeight="10.0" prefHeight="37.666646321614564" vgrow="SOMETIMES" /> minHeight="550"
<RowConstraints maxHeight="34.3333740234375" minHeight="10.0" prefHeight="34.3333740234375" vgrow="SOMETIMES" /> >
<RowConstraints maxHeight="123.99998474121094" minHeight="10.0" prefHeight="76.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="110.0" minHeight="10.0" prefHeight="31.66668701171872" vgrow="SOMETIMES" /> <left>
<RowConstraints maxHeight="133.0" minHeight="10.0" prefHeight="28.999979654947936" vgrow="SOMETIMES" />
<RowConstraints maxHeight="129.33331298828125" minHeight="10.0" prefHeight="129.33331298828125" vgrow="SOMETIMES" /> <StackPane fx:id="outerBar">
</rowConstraints> <Rectangle fx:id="sideBar" fill="dimgray" height="${outerBar.height}" width="50"></Rectangle>
<children>
<Label alignment="CENTER" prefHeight="17.0" prefWidth="105.0" text="English" GridPane.columnIndex="1" GridPane.rowIndex="2" /> <VBox spacing="300">
<Label alignment="CENTER" prefHeight="17.0" prefWidth="105.0" text="Welsh" GridPane.columnIndex="5" GridPane.rowIndex="2" />
<ComboBox fx:id="wordType" prefHeight="25.0" prefWidth="275.0" promptText="Type" GridPane.columnIndex="3" GridPane.rowIndex="3" /> <VBox alignment="TOP_CENTER" maxHeight="${outerBar.height}">
<Button mnemonicParsing="false" onAction="#addButtonClick" prefHeight="25.0" prefWidth="274.0" text="Add Word" GridPane.columnIndex="3" GridPane.rowIndex="4" /> <StackPane onMouseClicked="#dictionaryIconClick">
<TextField fx:id="english" GridPane.columnIndex="1" GridPane.rowIndex="3" /> <Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<TextField fx:id="welsh" GridPane.columnIndex="5" GridPane.rowIndex="3" /> <HBox alignment="CENTER_RIGHT">
<Button mnemonicParsing="false" onAction="#switchToPrimary" prefHeight="25.0" prefWidth="107.0" text="Switch Scene" GridPane.columnIndex="1" GridPane.rowIndex="5" /> <Text fx:id="dictionaryText" fill="white">
<GridPane prefHeight="55.0" prefWidth="258.0" GridPane.columnIndex="3" GridPane.rowIndex="5"> <font>
<columnConstraints> <Font name="System Bold" size="25"></Font>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> </font>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> </Text>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ImageView fx:id="dictionaryIcon"></ImageView>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> </HBox>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> </StackPane>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <StackPane onMouseClicked="#practiceListIconClick">
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
</columnConstraints> <HBox alignment="CENTER_RIGHT">
<rowConstraints> <Text fx:id="practiceListTest" fill="white">
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <font>
</rowConstraints> <Font name="System Bold" size="25"></Font>
<children> </font>
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharch" prefHeight="25.0" prefWidth="35.0" text="ch" /> </Text>
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addChardd" prefHeight="25.0" prefWidth="34.0" text="dd" GridPane.columnIndex="1" /> <ImageView fx:id="practiceListIcon"></ImageView>
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharff" prefHeight="25.0" prefWidth="34.0" text="ff" GridPane.columnIndex="2" /> </HBox>
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharng" prefHeight="25.0" prefWidth="34.0" text="ng" GridPane.columnIndex="3" /> </StackPane>
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharll" prefHeight="25.0" prefWidth="34.0" text="ll" GridPane.columnIndex="4" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharph" prefHeight="25.0" prefWidth="34.0" text="ph" GridPane.columnIndex="5" /> <StackPane onMouseClicked="#flashcardIconClick">
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharrh" prefHeight="25.0" prefWidth="34.0" text="rh" GridPane.columnIndex="6" /> <Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharth" prefHeight="25.0" prefWidth="34.0" text="th" GridPane.columnIndex="7" /> <HBox alignment="CENTER_RIGHT">
</children> <Text fx:id="flashcardsText" fill="white">
</GridPane> <font>
</children> <Font name="System Bold" size="25"></Font>
</GridPane> </font>
</Text>
<ImageView fx:id="flashcardIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#studyIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="studyText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="studyIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
<StackPane alignment="BOTTOM_CENTER" onMouseClicked="#addWordIconClick">
<Rectangle fill="white" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="addDefinitionText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="addDefinitionIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
</StackPane>
</left>
<top>
<StackPane fx:id="topBar">
<Rectangle fx:id="parentRectangle" fill="dimgray" width="${topBar.width}" height="50"></Rectangle>
<HBox alignment="CENTER_LEFT" prefWidth="${topBar.width}" spacing="7">
<StackPane onMouseClicked="#expandMenuClick">
<Rectangle fill="dimgray" width="55" height="50"></Rectangle>
<ImageView fx:id="expandMenuIcon"></ImageView>
</StackPane>
<ImageView fx:id="currentPageIcon"></ImageView>
<Text fx:id="currentPageText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
</HBox>
</StackPane>
</top>
<center>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="506.0" prefWidth="702.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="84.33331298828125" minWidth="10.0" prefWidth="10.666646321614593" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="273.3333536783854" minWidth="10.0" prefWidth="273.3333536783854" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="87.3333740234375" minWidth="7.6666259765625" prefWidth="7.6666259765625" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="50.66668701171875" minHeight="10.0" prefHeight="50.66668701171875" vgrow="SOMETIMES" />
<RowConstraints maxHeight="46.33333333333332" minHeight="10.0" prefHeight="46.33333333333332" vgrow="SOMETIMES" />
<RowConstraints maxHeight="37.666646321614564" minHeight="10.0" prefHeight="37.666646321614564" vgrow="SOMETIMES" />
<RowConstraints maxHeight="34.3333740234375" minHeight="10.0" prefHeight="34.3333740234375" vgrow="SOMETIMES" />
<RowConstraints maxHeight="123.99998474121094" minHeight="10.0" prefHeight="76.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="110.0" minHeight="10.0" prefHeight="31.66668701171872" vgrow="SOMETIMES" />
<RowConstraints maxHeight="133.0" minHeight="10.0" prefHeight="28.999979654947936" vgrow="SOMETIMES" />
<RowConstraints maxHeight="129.33331298828125" minHeight="10.0" prefHeight="129.33331298828125" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label alignment="CENTER" prefHeight="17.0" prefWidth="105.0" text="English" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label alignment="CENTER" prefHeight="17.0" prefWidth="105.0" text="Welsh" GridPane.columnIndex="5" GridPane.rowIndex="2" />
<ComboBox fx:id="wordType" prefHeight="25.0" prefWidth="275.0" promptText="Type" GridPane.columnIndex="3" GridPane.rowIndex="3" />
<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 hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharch" prefHeight="25.0" prefWidth="35.0" text="ch" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addChardd" prefHeight="25.0" prefWidth="34.0" text="dd" GridPane.columnIndex="1" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharff" prefHeight="25.0" prefWidth="34.0" text="ff" GridPane.columnIndex="2" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharng" prefHeight="25.0" prefWidth="34.0" text="ng" GridPane.columnIndex="3" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharll" prefHeight="25.0" prefWidth="34.0" text="ll" GridPane.columnIndex="4" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharph" prefHeight="25.0" prefWidth="34.0" text="ph" GridPane.columnIndex="5" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharrh" prefHeight="25.0" prefWidth="34.0" text="rh" GridPane.columnIndex="6" />
<Button minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#addCharth" prefHeight="25.0" prefWidth="34.0" text="th" GridPane.columnIndex="7" />
</children>
</GridPane>
</children>
</GridPane>
</center>
</BorderPane>

View file

@ -12,69 +12,211 @@
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?> <?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.javafx.DictionaryController"> <?import javafx.scene.layout.*?>
<children>
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER"> <?import javafx.scene.shape.Rectangle?>
<children> <?import javafx.scene.image.ImageView?>
<Label minWidth="-Infinity" text="Search:"> <?import javafx.scene.text.Text?>
<font> <?import javafx.scene.text.Font?>
<Font name="System Bold" size="13.0" /> <BorderPane xmlns="http://javafx.com/javafx"
</font></Label> xmlns:fx="http://javafx.com/fxml"
<TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" /> fx:controller="uk.ac.aber.cs22120.group20.javafx.DictionaryController"
</children> fx:id="container"
</HBox> stylesheets=""
<HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER"> minWidth="450"
<children> minHeight="550"
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS"> >
<children>
<Label minWidth="-Infinity" text="English">
<font> <left>
<Font name="System Bold" size="13.0" />
</font></Label> <StackPane fx:id="outerBar">
</children> <Rectangle fx:id="sideBar" fill="dimgray" height="${outerBar.height}" width="50"></Rectangle>
<VBox spacing="300">
<VBox alignment="TOP_CENTER" maxHeight="${outerBar.height}">
<StackPane onMouseClicked="#dictionaryIconClick">
<Rectangle fill="white" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="dictionaryText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="dictionaryIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#practiceListIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="practiceListTest" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="practiceListIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#flashcardIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="flashcardsText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="flashcardIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#studyIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="studyText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="studyIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
<StackPane alignment="BOTTOM_CENTER" onMouseClicked="#addWordIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="addDefinitionText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="addDefinitionIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
</StackPane>
</left>
<top>
<StackPane fx:id="topBar">
<Rectangle fx:id="parentRectangle" fill="dimgray" width="${topBar.width}" height="50"></Rectangle>
<HBox alignment="CENTER_LEFT" prefWidth="${topBar.width}" spacing="7">
<StackPane onMouseClicked="#expandMenuClick">
<Rectangle fill="dimgray" width="55" height="50"></Rectangle>
<ImageView fx:id="expandMenuIcon"></ImageView>
</StackPane>
<ImageView fx:id="currentPageIcon"></ImageView>
<Text fx:id="currentPageText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
</HBox> </HBox>
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
<children> </StackPane>
<ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true"> </top>
<image>
<Image url="@../../../../../assets/icons/black_icons/50px/sort-alpha-up-50.png" /> <center>
</image>
<HBox.margin> <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">
<Insets right="5.0" /> <children>
</HBox.margin> <HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER">
</ImageView> <children>
<ImageView fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true"> <Label minWidth="-Infinity" text="Search:">
<image> <font>
<Image url="@../../../../../assets/icons/black_icons/50px/sort-lang-50.png" /> <Font name="System Bold" size="13.0" />
</image> </font></Label>
<HBox.margin> <TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" />
<Insets left="5.0" /> </children>
</HBox.margin> </HBox>
</ImageView> <HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER">
</children> <children>
</HBox> <HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS"> <children>
<children> <Label minWidth="-Infinity" text="English">
<Label minWidth="-Infinity" text="Welsh"> <font>
<font> <Font name="System Bold" size="13.0" />
<Font name="System Bold" size="13.0" /> </font></Label>
</font></Label> </children>
</children> </HBox>
</HBox> <HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
</children> <children>
</HBox> <ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true">
<TableView fx:id="table" VBox.vgrow="ALWAYS"> <HBox.margin>
<columns> <Insets right="5.0" />
<TableColumn fx:id="english" prefWidth="196.0" text="English" /> </HBox.margin>
<TableColumn fx:id="welsh" prefWidth="195.0" text="Welsh" /> </ImageView>
</columns> <ImageView fx:id="langSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true">
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> <HBox.margin>
</columnResizePolicy> <Insets left="5.0" />
</TableView> </HBox.margin>
<Button fx:id="primaryButton" onAction="#switchToPracticeList" text="Switch to Practice List" /> </ImageView>
</children> </children>
<padding> </HBox>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> <HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
</padding> <children>
</VBox> <Label minWidth="-Infinity" text="Welsh">
<font>
<Font name="System Bold" size="13.0" />
</font></Label>
</children>
</HBox>
</children>
</HBox>
<TableView fx:id="table" VBox.vgrow="ALWAYS">
<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>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</VBox>
</center>
</BorderPane>

View file

@ -1,45 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.*?>
<?import javafx.scene.control.Button?> <?import javafx.scene.layout.*?>
<?import javafx.scene.image.ImageView?> <?import javafx.scene.text.*?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?> <?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?> <?import javafx.scene.image.ImageView?>
<?import javafx.scene.text.Text?>
<VBox alignment="center" spacing="10" stylesheets="@styles.css" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.javafx.FlashcardController"> <?import javafx.scene.control.Button?>
<padding> <BorderPane xmlns="http://javafx.com/javafx"
<Insets bottom="10" left="25" right="25" top="25" /> xmlns:fx="http://javafx.com/fxml"
</padding> fx:controller="uk.ac.aber.cs22120.group20.javafx.FlashcardController"
<children> fx:id="container"
<StackPane onMouseClicked="#handleFlashcardClick"> minWidth="450"
<children> minHeight="550"
<Rectangle fx:id="flashcard" arcHeight="80" arcWidth="80" fill="white" height="360" stroke="black" width="550" />
<Text fx:id="testWord" textAlignment="CENTER"> >
<left>
<StackPane fx:id="outerBar">
<Rectangle fx:id="sideBar" fill="dimgray" height="${outerBar.height}" width="50"></Rectangle>
<VBox spacing="300">
<VBox alignment="TOP_CENTER" maxHeight="${outerBar.height}">
<StackPane onMouseClicked="#dictionaryIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="dictionaryText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="dictionaryIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#practiceListIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="practiceListTest" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="practiceListIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#flashcardIconClick">
<Rectangle fill="white" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="flashcardsText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="flashcardIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#studyIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="studyText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="studyIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
<StackPane alignment="BOTTOM_CENTER" onMouseClicked="#addWordIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="addDefinitionText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="addDefinitionIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
</StackPane>
</left>
<top>
<StackPane fx:id="topBar">
<Rectangle fx:id="parentRectangle" fill="dimgray" width="${topBar.width}" height="50"></Rectangle>
<HBox alignment="CENTER_LEFT" prefWidth="${topBar.width}" spacing="7">
<StackPane onMouseClicked="#expandMenuClick">
<Rectangle fill="dimgray" width="55" height="50"></Rectangle>
<ImageView fx:id="expandMenuIcon"></ImageView>
</StackPane>
<ImageView fx:id="currentPageIcon"></ImageView>
<Text fx:id="currentPageText" fill="white">
<font> <font>
<Font size="55" /> <Font name="System Bold" size="25"></Font>
</font> </font>
</Text> </Text>
</HBox>
<VBox alignment="BOTTOM_CENTER">
<Text fx:id="wordType" fill="dimgray">
<font>
<Font size="20" />
</font>
</Text>
</VBox>
</children>
</StackPane> </StackPane>
<HBox alignment="BASELINE_CENTER" spacing="190"> </top>
<center>
<VBox alignment="CENTER" spacing="10" minHeight="500" prefHeight="512" prefWidth="432" >
<padding>
<Insets top="25" right="25" bottom="10" left="25"/>
</padding>
<children> <children>
<ImageView fx:id="left_arrow" onMouseClicked="#handlePreviousCard" visible="true" /> <StackPane alignment="CENTER" onMouseClicked="#handleFlashcardClick" VBox.vgrow="NEVER" minWidth="350">
<Text fx:id="counter"><font> <Font size="20" /></font></Text> <children>
<ImageView fx:id="right_arrow" onMouseClicked="#handleNextCard" /> <Rectangle fx:id="flashcard" width="550" height="360" fill="white" arcHeight="80" arcWidth="80"
stroke="black"/>
<Text textAlignment="CENTER" fx:id="testWord">
<font>
<Font size="55"/>
</font>
</Text>
<VBox alignment="BOTTOM_CENTER">
<Text fx:id="wordType" fill="dimgray">
<font>
<Font size="20"></Font>
</font>
</Text>
</VBox>
</children>
</StackPane>
<HBox spacing="190" alignment="BASELINE_CENTER">
<children>
<ImageView fx:id="leftArrow" onMouseClicked="#handlePreviousCard"></ImageView>
<Text fx:id="counter"><font> <Font size = "20"></Font></font></Text>
<ImageView fx:id="rightArrow" onMouseClicked="#handleNextCard"></ImageView>
</children>
</HBox>
</children> </children>
</HBox>
<Button mnemonicParsing="false" onAction="#switchToAddWord" text="Add Word Screen" /> </VBox>
</children>
</VBox> </center>
</BorderPane>

View file

@ -6,75 +6,208 @@
<?import javafx.scene.control.TableColumn?> <?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?> <?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?> <?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?> <?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.text.Font?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.*?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.text.Font?> <?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.javafx.PracticeListController"> <BorderPane xmlns="http://javafx.com/javafx"
<children> xmlns:fx="http://javafx.com/fxml"
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER"> fx:controller="uk.ac.aber.cs22120.group20.javafx.PracticeListController"
<children> fx:id="container"
<Label minWidth="-Infinity" text="Search:"> minWidth="450"
<font> minHeight="550"
<Font name="System Bold" size="13.0" /> >
</font></Label>
<TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" />
</children> <left>
</HBox>
<HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER"> <StackPane fx:id="outerBar">
<children> <Rectangle fx:id="sideBar" fill="dimgray" height="${outerBar.height}" width="50"></Rectangle>
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
<children> <VBox spacing="300">
<Label minWidth="-Infinity" text="English">
<font> <VBox alignment="TOP_CENTER" maxHeight="${outerBar.height}">
<Font name="System Bold" size="13.0" /> <StackPane onMouseClicked="#dictionaryIconClick">
</font></Label> <Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
</children> <HBox alignment="CENTER_RIGHT">
<Text fx:id="dictionaryText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="dictionaryIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#practiceListIconClick">
<Rectangle fill="white" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="practiceListTest" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="practiceListIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#flashcardIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="flashcardsText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="flashcardIcon"></ImageView>
</HBox>
</StackPane>
<StackPane onMouseClicked="#studyIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="studyText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="studyIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
<StackPane alignment="BOTTOM_CENTER" onMouseClicked="#addWordIconClick">
<Rectangle fill="dimgray" height="60" width="${sideBar.width}"></Rectangle>
<HBox alignment="CENTER_RIGHT">
<Text fx:id="addDefinitionText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
<ImageView fx:id="addDefinitionIcon"></ImageView>
</HBox>
</StackPane>
</VBox>
</StackPane>
</left>
<top>
<StackPane fx:id="topBar">
<Rectangle fx:id="parentRectangle" fill="dimgray" width="${topBar.width}" height="50"></Rectangle>
<HBox alignment="CENTER_LEFT" prefWidth="${topBar.width}" spacing="7">
<StackPane onMouseClicked="#expandMenuClick">
<Rectangle fill="dimgray" width="55" height="50"></Rectangle>
<ImageView fx:id="expandMenuIcon"></ImageView>
</StackPane>
<ImageView fx:id="currentPageIcon"></ImageView>
<Text fx:id="currentPageText" fill="white">
<font>
<Font name="System Bold" size="25"></Font>
</font>
</Text>
</HBox> </HBox>
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
<children> </StackPane>
<ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true"> </top>
<image>
<Image url="@../../../../../assets/icons/black_icons/50px/sort-alpha-up-50.png" /> <center>
</image> <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">
<HBox.margin> <children>
<Insets right="5.0" /> <HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER">
</HBox.margin> <children>
</ImageView> <Label minWidth="-Infinity" text="Search:">
<ImageView fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true"> <font>
<image> <Font name="System Bold" size="13.0" />
<Image url="@../../../../../assets/icons/black_icons/50px/sort-lang-50.png" /> </font></Label>
</image> <TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" />
<HBox.margin> </children>
<Insets left="5.0" /> </HBox>
</HBox.margin> <HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER">
</ImageView> <children>
</children> <HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
</HBox> <children>
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS"> <Label minWidth="-Infinity" text="English">
<children> <font>
<Label minWidth="-Infinity" text="Welsh"> <Font name="System Bold" size="13.0" />
<font> </font></Label>
<Font name="System Bold" size="13.0" /> </children>
</font></Label> </HBox>
</children> <HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
</HBox> <children>
</children> <ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true">
</HBox>
<TableView fx:id="table" VBox.vgrow="ALWAYS"> <HBox.margin>
<columns> <Insets right="5.0" />
<TableColumn fx:id="english" prefWidth="196.0" text="English" /> </HBox.margin>
<TableColumn fx:id="welsh" prefWidth="195.0" text="Welsh" /> </ImageView>
</columns> <ImageView fx:id="langSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true">
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> <HBox.margin>
</columnResizePolicy> <Insets left="5.0" />
</TableView> </HBox.margin>
<Button fx:id="primaryButton" onAction="#switchToFlashCard" text="Switch to FlashCard View" /> </ImageView>
</children> </children>
<padding> </HBox>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> <HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
</padding> <children>
</VBox> <Label minWidth="-Infinity" text="Welsh">
<font>
<Font name="System Bold" size="13.0" />
</font></Label>
</children>
</HBox>
</children>
</HBox>
<TableView fx:id="table" VBox.vgrow="ALWAYS">
<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>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</VBox>
</center>
</BorderPane>