Merge branch 'master' of https://gitlab.dcs.aber.ac.uk/ncw/gp20
This commit is contained in:
commit
4d768483bd
14 changed files with 888 additions and 273 deletions
Binary file not shown.
Binary file not shown.
|
@ -8,6 +8,8 @@ import javafx.scene.control.TextField;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.paint.Color;
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
||||
|
||||
|
@ -15,7 +17,7 @@ import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
|||
* Add Word Controller
|
||||
*/
|
||||
|
||||
public class AddWordController {
|
||||
public class AddWordController extends SharedCodeController {
|
||||
|
||||
@FXML
|
||||
private TextField welsh;
|
||||
|
@ -34,6 +36,12 @@ public class AddWordController {
|
|||
|
||||
@FXML
|
||||
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.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
|
||||
public void addCharch(ActionEvent actionEvent) {
|
||||
welsh.appendText("ch");
|
||||
|
|
|
@ -19,6 +19,7 @@ import javafx.scene.control.TableView;
|
|||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
import uk.ac.aber.cs22120.group20.javafx.Application;
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
@ -45,12 +46,14 @@ import java.util.ResourceBundle;
|
|||
* @see Application
|
||||
*/
|
||||
//public class DictionaryController implements Initializable {
|
||||
public class DictionaryController {
|
||||
public class DictionaryController extends SharedCodeController {
|
||||
public static Stage primaryStage = null;
|
||||
|
||||
@FXML
|
||||
private ImageView alphaSort;
|
||||
@FXML
|
||||
private ImageView langSort;
|
||||
@FXML
|
||||
private TextField searchBox;
|
||||
@FXML
|
||||
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.
|
||||
|
@ -135,6 +129,13 @@ public class DictionaryController {
|
|||
* @see DictionaryEntry
|
||||
*/
|
||||
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);
|
||||
|
||||
table.setRowFactory(tv -> {
|
||||
|
|
|
@ -5,6 +5,7 @@ import javafx.fxml.FXML;
|
|||
import javafx.scene.Node;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.shape.Rectangle;
|
||||
import javafx.scene.text.Text;
|
||||
import javafx.scene.transform.Rotate;
|
||||
|
@ -30,7 +31,7 @@ import java.io.IOException;
|
|||
* @see SharedCodeController
|
||||
*/
|
||||
|
||||
public class FlashcardController {
|
||||
public class FlashcardController extends SharedCodeController {
|
||||
|
||||
// /////////////////// //
|
||||
// Instance Variables. //
|
||||
|
@ -49,9 +50,9 @@ public class FlashcardController {
|
|||
private Text testWord;
|
||||
|
||||
@FXML
|
||||
private ImageView left_arrow;
|
||||
private ImageView leftArrow;
|
||||
@FXML
|
||||
private ImageView right_arrow;
|
||||
private ImageView rightArrow;
|
||||
|
||||
// //////// //
|
||||
// Methods. //
|
||||
|
@ -63,14 +64,21 @@ public class FlashcardController {
|
|||
*/
|
||||
@FXML
|
||||
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());
|
||||
wordType.setText("Welsh");
|
||||
|
||||
updateCounter();
|
||||
card = flashcard;
|
||||
|
||||
left_arrow.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")));
|
||||
leftArrow.setImage(new Image(getClass().getResourceAsStream("/assets/icons/black_icons/50px/left-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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import javafx.fxml.Initializable;
|
|||
import javafx.scene.control.*;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
import uk.ac.aber.cs22120.group20.javafx.Application;
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
@ -41,12 +42,14 @@ import java.util.ResourceBundle;
|
|||
* @see DictionaryEntry
|
||||
* @see Application
|
||||
*/
|
||||
public class PracticeListController {
|
||||
public class PracticeListController extends SharedCodeController{
|
||||
public static Stage primaryStage = null;
|
||||
|
||||
@FXML
|
||||
private ImageView alphaSort;
|
||||
@FXML
|
||||
private ImageView langSort;
|
||||
@FXML
|
||||
private TextField searchBox;
|
||||
@FXML
|
||||
private TableView<DictionaryEntry> table;
|
||||
|
@ -69,6 +72,16 @@ public class PracticeListController {
|
|||
* @see DictionaryEntry
|
||||
*/
|
||||
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.practiseList);
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import javafx.scene.image.Image;
|
|||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.shape.Rectangle;
|
||||
import javafx.scene.text.Text;
|
||||
import uk.ac.aber.cs22120.group20.selfassessment.AssessmentGenerator;
|
||||
|
||||
/**
|
||||
* Abstract class that contains all the shared FXML elements between the
|
||||
|
@ -123,8 +124,7 @@ abstract public class SharedCodeController {
|
|||
|
||||
@FXML
|
||||
private void studyIconClick() {
|
||||
|
||||
ScreenSwitch.swap(ScreenSwitch.SceneEnum.translationScene);
|
||||
AssessmentGenerator.generateAssessment(Application.practiseList);
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
|
|
@ -57,7 +57,7 @@ public class DictionaryEntry {
|
|||
}
|
||||
|
||||
public void setEnglish(String english) {
|
||||
this.english = english;
|
||||
this.english = english.trim();
|
||||
}
|
||||
|
||||
public String getWelsh() {
|
||||
|
@ -65,7 +65,7 @@ public class DictionaryEntry {
|
|||
}
|
||||
|
||||
public void setWelsh(String welsh) {
|
||||
this.welsh = welsh;
|
||||
this.welsh = welsh.trim();
|
||||
}
|
||||
|
||||
public String getWordType() {
|
||||
|
@ -73,7 +73,7 @@ public class DictionaryEntry {
|
|||
}
|
||||
|
||||
public void setWordType(String wordType) {
|
||||
this.wordType = wordType;
|
||||
this.wordType = wordType.trim();
|
||||
}
|
||||
|
||||
public Boolean isPracticeWord() {
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.util.*;
|
|||
* @See
|
||||
*/
|
||||
public class AssessmentGenerator {
|
||||
static boolean isEnglish;
|
||||
public static boolean isEnglish;
|
||||
static LinkedList<Question> listOfAssessment = new LinkedList<>();
|
||||
static int currentAssessment = 0;
|
||||
|
||||
|
@ -182,16 +182,12 @@ public class AssessmentGenerator {
|
|||
|
||||
Optional<ButtonType> result = alert.showAndWait();
|
||||
|
||||
|
||||
currentAssessment = 0;
|
||||
Question.resetScore();
|
||||
|
||||
if (result.isEmpty() || result.get() == noBtn) {
|
||||
currentAssessment=0;
|
||||
Question.resetScore();
|
||||
ScreenSwitch.swap(ScreenSwitch.SceneEnum.dictionaryScene);
|
||||
|
||||
} else {
|
||||
currentAssessment = 0;
|
||||
Question.resetScore();
|
||||
generateAssessment(Application.practiseList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -4,62 +4,206 @@
|
|||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?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">
|
||||
<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" />
|
||||
<Button mnemonicParsing="false" onAction="#switchToPrimary" prefHeight="25.0" prefWidth="107.0" text="Switch Scene" GridPane.columnIndex="1" GridPane.rowIndex="5" />
|
||||
<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>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<?import javafx.scene.shape.Rectangle?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="uk.ac.aber.cs22120.group20.javafx.AddWordController"
|
||||
fx:id="container"
|
||||
stylesheets=""
|
||||
minWidth="500"
|
||||
minHeight="550"
|
||||
>
|
||||
|
||||
<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="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="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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,69 +12,211 @@
|
|||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<VBox alignment="CENTER" prefHeight="512.0" prefWidth="432.0" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.javafx.DictionaryController">
|
||||
<children>
|
||||
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="Search:">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
<TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="English">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
</children>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<?import javafx.scene.shape.Rectangle?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="uk.ac.aber.cs22120.group20.javafx.DictionaryController"
|
||||
fx:id="container"
|
||||
stylesheets=""
|
||||
minWidth="450"
|
||||
minHeight="550"
|
||||
>
|
||||
|
||||
|
||||
<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="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 alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../../../../../assets/icons/black_icons/50px/sort-alpha-up-50.png" />
|
||||
</image>
|
||||
<HBox.margin>
|
||||
<Insets right="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../../../../../assets/icons/black_icons/50px/sort-lang-50.png" />
|
||||
</image>
|
||||
<HBox.margin>
|
||||
<Insets left="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<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>
|
||||
<Button fx:id="primaryButton" onAction="#switchToPracticeList" text="Switch to Practice List" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
|
||||
</padding>
|
||||
</VBox>
|
||||
|
||||
</StackPane>
|
||||
</top>
|
||||
|
||||
<center>
|
||||
|
||||
<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">
|
||||
<children>
|
||||
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="Search:">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
<TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="English">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true">
|
||||
<HBox.margin>
|
||||
<Insets right="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
<ImageView fx:id="langSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true">
|
||||
|
||||
<HBox.margin>
|
||||
<Insets left="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,45 +1,175 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<?import javafx.scene.shape.Rectangle?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
|
||||
<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">
|
||||
<padding>
|
||||
<Insets bottom="10" left="25" right="25" top="25" />
|
||||
</padding>
|
||||
<children>
|
||||
<StackPane onMouseClicked="#handleFlashcardClick">
|
||||
<children>
|
||||
<Rectangle fx:id="flashcard" arcHeight="80" arcWidth="80" fill="white" height="360" stroke="black" width="550" />
|
||||
<Text fx:id="testWord" textAlignment="CENTER">
|
||||
<?import javafx.scene.control.Button?>
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="uk.ac.aber.cs22120.group20.javafx.FlashcardController"
|
||||
fx:id="container"
|
||||
minWidth="450"
|
||||
minHeight="550"
|
||||
|
||||
>
|
||||
|
||||
|
||||
<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 size="55" />
|
||||
<Font name="System Bold" size="25"></Font>
|
||||
</font>
|
||||
</Text>
|
||||
</HBox>
|
||||
|
||||
<VBox alignment="BOTTOM_CENTER">
|
||||
<Text fx:id="wordType" fill="dimgray">
|
||||
<font>
|
||||
<Font size="20" />
|
||||
</font>
|
||||
</Text>
|
||||
</VBox>
|
||||
</children>
|
||||
</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>
|
||||
<ImageView fx:id="left_arrow" onMouseClicked="#handlePreviousCard" visible="true" />
|
||||
<Text fx:id="counter"><font> <Font size="20" /></font></Text>
|
||||
<ImageView fx:id="right_arrow" onMouseClicked="#handleNextCard" />
|
||||
<StackPane alignment="CENTER" onMouseClicked="#handleFlashcardClick" VBox.vgrow="NEVER" minWidth="350">
|
||||
<children>
|
||||
<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>
|
||||
</HBox>
|
||||
<Button mnemonicParsing="false" onAction="#switchToAddWord" text="Add Word Screen" />
|
||||
</children>
|
||||
</VBox>
|
||||
|
||||
</VBox>
|
||||
|
||||
</center>
|
||||
</BorderPane>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,75 +6,208 @@
|
|||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.shape.Rectangle?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
<?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">
|
||||
<children>
|
||||
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="Search:">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
<TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="English">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
</children>
|
||||
<BorderPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="uk.ac.aber.cs22120.group20.javafx.PracticeListController"
|
||||
fx:id="container"
|
||||
minWidth="450"
|
||||
minHeight="550"
|
||||
>
|
||||
|
||||
|
||||
<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="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 alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../../../../../assets/icons/black_icons/50px/sort-alpha-up-50.png" />
|
||||
</image>
|
||||
<HBox.margin>
|
||||
<Insets right="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
<ImageView fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../../../../../assets/icons/black_icons/50px/sort-lang-50.png" />
|
||||
</image>
|
||||
<HBox.margin>
|
||||
<Insets left="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<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>
|
||||
<Button fx:id="primaryButton" onAction="#switchToFlashCard" text="Switch to FlashCard View" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
|
||||
</padding>
|
||||
</VBox>
|
||||
|
||||
</StackPane>
|
||||
</top>
|
||||
|
||||
<center>
|
||||
<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">
|
||||
<children>
|
||||
<HBox alignment="CENTER_LEFT" prefHeight="11.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="Search:">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
<TextField fx:id="searchBox" prefHeight="26.0" prefWidth="519.0" HBox.hgrow="ALWAYS" />
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" fillHeight="false" prefHeight="14.0" prefWidth="392.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="English">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font></Label>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fx:id="alphaSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchAlphaSort" pickOnBounds="true" preserveRatio="true">
|
||||
|
||||
<HBox.margin>
|
||||
<Insets right="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
<ImageView fx:id="langSort" fitHeight="20.0" fitWidth="20.0" onMouseClicked="#switchLangSort" pickOnBounds="true" preserveRatio="true">
|
||||
|
||||
<HBox.margin>
|
||||
<Insets left="5.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Reference in a new issue