From e69991a4ac780b2230081f596767c6a2cd04b3df Mon Sep 17 00:00:00 2001 From: top19 Date: Wed, 29 Apr 2020 17:19:42 +0100 Subject: [PATCH] Integrated dictionary screen with the menu.c --- .../group20/javafx/DictionaryController.java | 12 +- .../ac/aber/cs22120/group20/dictionary.fxml | 273 +++++++++++++----- 2 files changed, 219 insertions(+), 66 deletions(-) diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/DictionaryController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/DictionaryController.java index 8bc416e..c6435c9 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/DictionaryController.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/DictionaryController.java @@ -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 table; @@ -135,6 +138,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 -> { diff --git a/src/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml b/src/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml index 0b33364..f677954 100644 --- a/src/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml +++ b/src/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/dictionary.fxml @@ -12,69 +12,212 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -