Fixed image in translationTest, and loads from dictionary.

Replaced submit button with an arrow, and words are now drawn from practice list.
This commit is contained in:
Brad Corbett 2020-04-21 12:37:53 +01:00
parent 15b5afae18
commit e3f0f9d2b9
7 changed files with 66 additions and 43 deletions

View file

@ -2,7 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="b436be74-9b31-4913-bf6e-41784cacd483" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/main/resources/assets/right-icon.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/target/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -16,17 +16,17 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/App.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="341">
<caret line="48" column="71" selection-start-line="48" selection-start-column="71" selection-end-line="48" selection-end-column="71" />
<state relative-caret-position="-68">
<caret line="27" column="31" lean-forward="true" selection-start-line="27" selection-start-column="31" selection-end-line="27" selection-end-column="31" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/resources/uk/ac/aber/cs22120/group20/translationTest.fxml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="164">
<caret line="33" column="27" selection-start-line="33" selection-start-column="27" selection-end-line="33" selection-end-column="27" />
<state relative-caret-position="133">
<caret line="10" column="264" selection-start-line="10" selection-start-column="264" selection-end-line="10" selection-end-column="264" />
</state>
</provider>
<provider editor-type-id="JavaFX-Scene-Builder" />
@ -50,11 +50,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="223">
<caret line="57" column="40" lean-forward="true" selection-start-line="57" selection-start-column="40" selection-end-line="57" selection-end-column="40" />
<state relative-caret-position="748">
<caret line="53" column="96" selection-start-line="53" selection-start-column="96" selection-end-line="53" selection-end-column="96" />
<folding>
<element signature="imports" expanded="true" />
</folding>
@ -83,13 +83,13 @@
<list>
<option value="$PROJECT_DIR$/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml" />
<option value="$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java" />
<option value="$PROJECT_DIR$/src/main/resources/uk/ac/aber/cs22120/group20/translationTest.fxml" />
<option value="$PROJECT_DIR$/src/main/java/jsonStuff/JsonProcessing.java" />
<option value="$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java" />
<option value="$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/DictionaryController.java" />
<option value="$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/WelshDictionary.java" />
<option value="$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java" />
<option value="$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/App.java" />
<option value="$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java" />
<option value="$PROJECT_DIR$/src/main/resources/uk/ac/aber/cs22120/group20/translationTest.fxml" />
</list>
</option>
</component>
@ -115,7 +115,6 @@
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
@ -139,6 +138,21 @@
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Welsh Vocabulary Tutor" type="b2602c69:ProjectViewProjectNode" />
<item name="Welsh Vocabulary Tutor" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Welsh Vocabulary Tutor" type="b2602c69:ProjectViewProjectNode" />
<item name="Welsh Vocabulary Tutor" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="group20" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Welsh Vocabulary Tutor" type="b2602c69:ProjectViewProjectNode" />
<item name="Welsh Vocabulary Tutor" type="462c0819:PsiDirectoryNode" />
@ -146,6 +160,14 @@
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Welsh Vocabulary Tutor" type="b2602c69:ProjectViewProjectNode" />
<item name="Welsh Vocabulary Tutor" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="assets" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Welsh Vocabulary Tutor" type="b2602c69:ProjectViewProjectNode" />
<item name="Welsh Vocabulary Tutor" type="462c0819:PsiDirectoryNode" />
@ -163,6 +185,7 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="ProjectViewState">
@ -174,7 +197,7 @@
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1587451257147" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1587451303629" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../../../src/Welsh Vocabulary Tutor" />
<property name="project.structure.last.edited" value="Libraries" />
<property name="project.structure.proportion" value="0.0" />
@ -243,7 +266,7 @@
<frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24508321" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24886535" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
@ -252,7 +275,7 @@
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.3289689" />
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3289689" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.3289689" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@ -349,6 +372,20 @@
</provider>
<provider editor-type-id="JavaFX-Scene-Builder" />
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="11" column="28" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/App.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-68">
<caret line="27" column="31" lean-forward="true" selection-start-line="27" selection-start-column="31" selection-end-line="27" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/DictionaryEntry.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
@ -363,40 +400,26 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/SecondaryController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="11" column="28" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/App.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="341">
<caret line="48" column="71" selection-start-line="48" selection-start-column="71" selection-end-line="48" selection-end-column="71" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/uk/ac/aber/cs22120/group20/translationTest.fxml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="164">
<caret line="33" column="27" selection-start-line="33" selection-start-column="27" selection-end-line="33" selection-end-column="27" />
</state>
</provider>
<provider editor-type-id="JavaFX-Scene-Builder" />
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/uk/ac/aber/cs22120/group20/PrimaryController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="223">
<caret line="57" column="40" lean-forward="true" selection-start-line="57" selection-start-column="40" selection-end-line="57" selection-end-column="40" />
<state relative-caret-position="748">
<caret line="53" column="96" selection-start-line="53" selection-start-column="96" selection-end-line="53" selection-end-column="96" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/uk/ac/aber/cs22120/group20/translationTest.fxml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="133">
<caret line="10" column="264" selection-start-line="10" selection-start-column="264" selection-end-line="10" selection-end-column="264" />
</state>
</provider>
<provider editor-type-id="JavaFX-Scene-Builder" />
</entry>
</component>
</project>

View file

@ -46,7 +46,7 @@ public class App extends Application {
}
private static Parent loadFXML(String fxml) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource( "translationTest.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource( fxml + ".fxml"));
return fxmlLoader.load();
}

View file

@ -51,7 +51,7 @@ public class PrimaryController {
@FXML
private void initialize(){
submitButton.setImage(new Image (getClass().getResourceAsStream("/assets/right-icon.png")));
submitButton.setImage(new Image ("file:src/main/resources/assets/right-icon.png"));
for(DictionaryEntry entry : App.dictionary){
if(entry.isPracticeWord()){

View file

@ -8,7 +8,7 @@
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="PrimaryController">
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.PrimaryController">
<children>
<TitledPane animated="false" prefHeight="400.0" prefWidth="600.0" text="Learn">
<content>

View file

@ -8,7 +8,7 @@
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="PrimaryController">
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.PrimaryController">
<children>
<TitledPane animated="false" prefHeight="400.0" prefWidth="600.0" text="Learn">
<content>