Added fully functional Dictionary & Practice pages
Dictionary and Practice pages both are 100% functional. The only a few changes need to still be made: - Commenting - Alpha sort icons needs to change on click - Highlighted words need to have white text (CSS) - Headers need to be removed (CSS)
2
dev/20200421/osp1/Welsh Vocabulary Tutor/.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Default ignored files
|
||||
/workspace.xml
|
16
dev/20200421/osp1/Welsh Vocabulary Tutor/.idea/compiler.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="Welsh Vocabulary Tutor" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="Welsh Vocabulary Tutor" target="11" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-base:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-base:linux:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-controls:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-controls:linux:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-fxml:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-fxml:linux:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-graphics:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.openjfx:javafx-graphics:linux:11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,12 @@
|
|||
<component name="libraryTable">
|
||||
<library name="com.fasterxml.jackson.core:jackson-databind:2.9.4" type="repository">
|
||||
<properties maven-id="com.fasterxml.jackson.core:jackson-databind:2.9.4" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.9.4/jackson-databind-2.9.4.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.9.4/jackson-core-2.9.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,10 @@
|
|||
<component name="libraryTable">
|
||||
<library name="com.jfoenix:jfoenix:9.0.9" type="repository">
|
||||
<properties maven-id="com.jfoenix:jfoenix:9.0.9" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/jfoenix/jfoenix/9.0.9/jfoenix-9.0.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,15 @@
|
|||
<component name="libraryTable">
|
||||
<library name="org.openjfx:javafx-controls:11" type="repository">
|
||||
<properties maven-id="org.openjfx:javafx-controls:11" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,17 @@
|
|||
<component name="libraryTable">
|
||||
<library name="org.openjfx:javafx-fxml:11" type="repository">
|
||||
<properties maven-id="org.openjfx:javafx-fxml:11" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,17 @@
|
|||
<component name="libraryTable">
|
||||
<library name="org.openjfx:javafx-fxml:111" type="repository">
|
||||
<properties maven-id="org.openjfx:javafx-fxml:11" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/11/javafx-fxml-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/11/javafx-controls-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/11/javafx-graphics-11-linux.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/openjfx/javafx-base/11/javafx-base-11-linux.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
11
dev/20200421/osp1/Welsh Vocabulary Tutor/.idea/misc.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" project-jdk-name="13" project-jdk-type="JavaSDK" />
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Welsh Vocabulary Tutor.iml" filepath="$PROJECT_DIR$/Welsh Vocabulary Tutor.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
124
dev/20200421/osp1/Welsh Vocabulary Tutor/.idea/uiDesigner.xml
Normal file
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
6
dev/20200421/osp1/Welsh Vocabulary Tutor/.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="com.fasterxml.jackson.core:jackson-databind:2.9.4" level="project" />
|
||||
<orderEntry type="library" name="org.openjfx:javafx-fxml:111" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-fxml:11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.openjfx:javafx-fxml:linux:11" level="project" />
|
||||
<orderEntry type="library" name="com.jfoenix:jfoenix:9.0.9" level="project" />
|
||||
</component>
|
||||
</module>
|
44
dev/20200421/osp1/Welsh Vocabulary Tutor/pom.xml
Normal file
|
@ -0,0 +1,44 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>uk.ac.aber.cs22120.group20</groupId>
|
||||
<artifactId>Welsh Vocabulary Tutor</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-controls</artifactId>
|
||||
<version>11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-fxml</artifactId>
|
||||
<version>11</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<release>11</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-maven-plugin</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<configuration>
|
||||
<mainClass>uk.ac.aber.cs22120.group20.Application</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
module uk.ac.aber.cs22120.group20 {
|
||||
requires javafx.controls;
|
||||
requires javafx.fxml;
|
||||
requires com.fasterxml.jackson.core;
|
||||
requires com.fasterxml.jackson.databind;
|
||||
|
||||
opens uk.ac.aber.cs22120.group20 to javafx.fxml;
|
||||
exports uk.ac.aber.cs22120.group20;
|
||||
opens uk.ac.aber.cs22120.group20.json to com.fasterxml.jackson.databind;
|
||||
exports uk.ac.aber.cs22120.group20.json to com.fasterxml.jackson.databind;
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* @(#) App.java 0,1 2020/04/07
|
||||
* <p>
|
||||
* Copyright (c) 2020 Aberystwyth University.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.FileChooser;
|
||||
import javafx.stage.Stage;
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
import uk.ac.aber.cs22120.group20.json.JsonProcessing;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* A class that launches the Welsh Vocabulary tutor Application.
|
||||
*
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
*
|
||||
* @version 0.1 Initial development
|
||||
*/
|
||||
public class Application extends javafx.application.Application {
|
||||
private static Scene scene;
|
||||
|
||||
private JsonProcessing jsonProcessing = new JsonProcessing();
|
||||
private Scanner scanner = new Scanner(System.in);
|
||||
|
||||
public static LinkedList<DictionaryEntry> dictionary = new LinkedList<>();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param stage
|
||||
* @throws IOException
|
||||
*/
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
File jsonFileLocation = null;
|
||||
|
||||
while(jsonFileLocation ==null) {
|
||||
FileChooser fileChooser = new FileChooser();
|
||||
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Json Files", "*.json"));
|
||||
fileChooser.setTitle("Open Json File");
|
||||
jsonFileLocation = fileChooser.showOpenDialog(stage);
|
||||
}
|
||||
|
||||
final File jsonFileFinalLocation = jsonFileLocation;
|
||||
dictionary = jsonProcessing.readInJson(jsonFileFinalLocation);
|
||||
// dictionary.add(new DictionaryEntry("abbey", "abaty", "nm", false));
|
||||
// dictionary.add(new DictionaryEntry("believe", "credu", "verb", true));
|
||||
// dictionary.add(new DictionaryEntry("concert", "cyngerdd", "nm", false));
|
||||
// dictionary.add(new DictionaryEntry("disease", "clefyd", "nm", true));
|
||||
// dictionary.add(new DictionaryEntry("extremely", "dros ben", "other", false));
|
||||
// dictionary.add(new DictionaryEntry("flu", "ffliw", "nm", false));
|
||||
scene = new Scene(loadFXML("primary"));
|
||||
stage.setScene(scene);
|
||||
// stage.setOnCloseRequest(e -> {
|
||||
// jsonProcessing.writeOutJson(jsonFileLocation, dictionary);
|
||||
// Platform.exit();
|
||||
// System.exit(0);
|
||||
// });
|
||||
stage.show();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fxml
|
||||
* @throws IOException
|
||||
*/
|
||||
static void setRoot(String fxml) throws IOException {
|
||||
scene.setRoot(loadFXML(fxml));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fxml
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private static Parent loadFXML(String fxml) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(Application.class.getResource(fxml + ".fxml"));
|
||||
return fxmlLoader.load();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,194 @@
|
|||
/**
|
||||
* @(#) DictionaryController.java 0,1 2020/04/07
|
||||
* <p>
|
||||
* Copyright (c) 2020 Aberystwyth University.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.collections.transformation.FilteredList;
|
||||
import javafx.collections.transformation.SortedList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
||||
/**
|
||||
* A class that handles the keyboard and mouse input and interaction for the 'Dictionary Page' which is
|
||||
* defined by 'dictionary.fxml'
|
||||
*
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development.
|
||||
* @see DictionaryEntry
|
||||
* @see Application
|
||||
*/
|
||||
public class DictionaryController implements Initializable {
|
||||
public static Stage primaryStage = null;
|
||||
|
||||
@FXML
|
||||
private TextField searchBox;
|
||||
@FXML
|
||||
private TableView<DictionaryEntry> table;
|
||||
@FXML
|
||||
private TableColumn<DictionaryEntry, String> english = new TableColumn<>();
|
||||
@FXML
|
||||
private TableColumn<DictionaryEntry, String> welsh = new TableColumn<>();
|
||||
|
||||
public ObservableList<DictionaryEntry> list = FXCollections.observableArrayList();
|
||||
|
||||
@FXML
|
||||
private void switchLangSort() {
|
||||
if (table.getSortOrder().contains(english)) {
|
||||
table.getSortOrder().clear();
|
||||
table.getSortOrder().add(welsh);
|
||||
} else if (table.getSortOrder().contains(welsh)) {
|
||||
table.getSortOrder().clear();
|
||||
table.getSortOrder().add(english);
|
||||
}
|
||||
table.sort();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void switchAlphaSort() {
|
||||
if (table.getSortOrder().contains(english)) {
|
||||
if (english.getSortType().equals(TableColumn.SortType.ASCENDING)) {
|
||||
english.setSortType(TableColumn.SortType.DESCENDING);
|
||||
} else {
|
||||
english.setSortType(TableColumn.SortType.ASCENDING);
|
||||
}
|
||||
} else if (table.getSortOrder().contains(welsh)) {
|
||||
if (welsh.getSortType().equals(TableColumn.SortType.ASCENDING)) {
|
||||
welsh.setSortType(TableColumn.SortType.DESCENDING);
|
||||
} else {
|
||||
welsh.setSortType(TableColumn.SortType.ASCENDING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Switches to the primary scene.
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@FXML
|
||||
private void switchToPracticeList() throws IOException {
|
||||
Application.setRoot("practicelist");
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the table of dictionary entries.
|
||||
* <p>
|
||||
* An observable list of DictionaryEntries is loaded from the Application class into a local instance of ObservableList.
|
||||
* It also sets up Lambda expressions related to live searching functionality and the display of DictionaryEntries.
|
||||
*
|
||||
* @param url
|
||||
* @param resourceBundle
|
||||
* @see Application
|
||||
* @see DictionaryEntry
|
||||
*/
|
||||
@Override
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
list.addAll(Application.dictionary);
|
||||
|
||||
table.setRowFactory(tv -> {
|
||||
TableRow<DictionaryEntry> row = new TableRow<DictionaryEntry>() {
|
||||
@Override
|
||||
protected void updateItem(DictionaryEntry dictionaryEntry, boolean b) {
|
||||
super.updateItem(dictionaryEntry, b);
|
||||
if (!isEmpty()) {
|
||||
if (dictionaryEntry.isPracticeWord()) {
|
||||
setStyle("-fx-background-color: gray;");
|
||||
} else {
|
||||
setStyle(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
row.setOnMouseClicked(mouseEvent -> {
|
||||
if (mouseEvent.getClickCount() == 1 && (!row.isEmpty())) {
|
||||
if (row.getItem().isPracticeWord()) {
|
||||
Application.dictionary.get(list.indexOf(row.getItem())).setPracticeWord(false);
|
||||
// row.getItem().setPracticeWord(false);
|
||||
} else if (!row.getItem().isPracticeWord()) {
|
||||
Application.dictionary.get(list.indexOf(row.getItem())).setPracticeWord(true);
|
||||
// row.getItem().setPracticeWord(true);
|
||||
}
|
||||
table.getSelectionModel().clearSelection();
|
||||
}
|
||||
});
|
||||
return row;
|
||||
}
|
||||
);
|
||||
welsh.setCellValueFactory(dictionaryEntryStringCellDataFeatures -> {
|
||||
if (dictionaryEntryStringCellDataFeatures.getValue().getWordType().equals("nm")) {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getWelsh() + " {nm}");
|
||||
} else if (dictionaryEntryStringCellDataFeatures.getValue().getWordType().equals("nf")) {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getWelsh() + " {nf}");
|
||||
} else {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getWelsh());
|
||||
}
|
||||
});
|
||||
|
||||
english.setCellValueFactory(dictionaryEntryStringCellDataFeatures -> {
|
||||
if (dictionaryEntryStringCellDataFeatures.getValue().getWordType().equals("verb")) {
|
||||
return new SimpleStringProperty("to " + dictionaryEntryStringCellDataFeatures.getValue().getEnglish());
|
||||
} else {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getEnglish());
|
||||
}
|
||||
});
|
||||
|
||||
FilteredList<DictionaryEntry> filteredList = new FilteredList<>(list, p -> true); // Wrap list in a FilteredList
|
||||
|
||||
searchBox.textProperty().addListener((observable, oldSearchTerm, newSearchTerm) -> {
|
||||
filteredList.setPredicate(dictionaryEntry -> { // returns true on a filter match, false if no match
|
||||
boolean result = false;
|
||||
|
||||
table.refresh(); // This fixes the table highlighting issue
|
||||
|
||||
if (newSearchTerm == null || newSearchTerm.isEmpty()) { // If filter text is empty, display all dictionary entries
|
||||
result = true;
|
||||
} else {
|
||||
// need all same case for compare.
|
||||
final String lowerCaseSearchFilter = newSearchTerm.toLowerCase();
|
||||
if (dictionaryEntry.getWelsh().toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
result = true; // Filter matches Welsh
|
||||
} else if (dictionaryEntry.getEnglish().toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
result = true; // Filter matches English
|
||||
// } else if (dictionaryEntry.getWordType().toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
// result = true; // Filter matches Word Type
|
||||
} else if (dictionaryEntry.getWordType().equals("verb") && ("to " + dictionaryEntry.getEnglish()).toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
result = true; // Filter matches ['to' + a word] or [a word] if word is a verb
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
});
|
||||
|
||||
SortedList<DictionaryEntry> sortedList = new SortedList<>(filteredList); //Wrap the filtered list in a SortedList
|
||||
sortedList.comparatorProperty().bind(table.comparatorProperty()); //Bind the sorted list comparator to the table comparator
|
||||
// welsh.setCellValueFactory(new PropertyValueFactory<DictionaryEntry, String>("welsh"));
|
||||
// english.setCellValueFactory(new PropertyValueFactory<DictionaryEntry, String>("english"));
|
||||
|
||||
table.setItems(sortedList);
|
||||
table.getSortOrder().add(english);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
/**
|
||||
* @(#) DictionaryController.java 0,1 2020/04/07
|
||||
* <p>
|
||||
* Copyright (c) 2020 Aberystwyth University.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.collections.transformation.FilteredList;
|
||||
import javafx.collections.transformation.SortedList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.TableColumn;
|
||||
import javafx.scene.control.TableRow;
|
||||
import javafx.scene.control.TableView;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.stage.Stage;
|
||||
import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* A class that handles the keyboard and mouse input and interaction for the 'Dictionary Page' which is
|
||||
* defined by 'dictionary.fxml'
|
||||
*
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development.
|
||||
* @see DictionaryEntry
|
||||
* @see Application
|
||||
*/
|
||||
public class PracticeListController implements Initializable {
|
||||
public static Stage primaryStage = null;
|
||||
|
||||
@FXML
|
||||
private TextField searchBox;
|
||||
@FXML
|
||||
private TableView<DictionaryEntry> table;
|
||||
@FXML
|
||||
private TableColumn<DictionaryEntry, String> english = new TableColumn<>();
|
||||
@FXML
|
||||
private TableColumn<DictionaryEntry, String> welsh = new TableColumn<>();
|
||||
|
||||
public ObservableList<DictionaryEntry> list = FXCollections.observableArrayList();
|
||||
|
||||
/**
|
||||
* Initializes the table of dictionary entries.
|
||||
* <p>
|
||||
* An observable list of DictionaryEntries is loaded from the Application class into a local instance of ObservableList.
|
||||
* It also sets up Lambda expressions related to live searching functionality and the display of DictionaryEntries.
|
||||
*
|
||||
* @param url
|
||||
* @param resourceBundle
|
||||
* @see Application
|
||||
* @see DictionaryEntry
|
||||
*/
|
||||
@Override
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
// list.addAll(Application.dictionary);
|
||||
for (DictionaryEntry entry : Application.dictionary) {
|
||||
if (entry.isPracticeWord())
|
||||
list.add(entry);
|
||||
}
|
||||
|
||||
|
||||
FilteredList<DictionaryEntry> filteredList = new FilteredList<>(list, p -> true); // Wrap list in a FilteredList
|
||||
|
||||
searchBox.textProperty().addListener((observable, oldSearchTerm, newSearchTerm) -> {
|
||||
filteredList.setPredicate(dictionaryEntry -> { // returns true on a filter match, false if no match
|
||||
boolean result = false;
|
||||
|
||||
table.refresh(); // This fixes the table highlighting issue
|
||||
|
||||
if (newSearchTerm == null || newSearchTerm.isEmpty()) { // If filter text is empty, display all dictionary entries
|
||||
result = true;
|
||||
} else {
|
||||
// need all same case for compare.
|
||||
final String lowerCaseSearchFilter = newSearchTerm.toLowerCase();
|
||||
if (dictionaryEntry.getWelsh().toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
result = true; // Filter matches Welsh
|
||||
} else if (dictionaryEntry.getEnglish().toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
result = true; // Filter matches English
|
||||
// } else if (dictionaryEntry.getWordType().toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
// result = true; // Filter matches Word Type
|
||||
} else if (dictionaryEntry.getWordType().equals("verb") && ("to " + dictionaryEntry.getEnglish()).toLowerCase().contains(lowerCaseSearchFilter)) {
|
||||
result = true; // Filter matches ['to' + a word] or [a word] if word is a verb
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
});
|
||||
|
||||
SortedList<DictionaryEntry> sortedList = new SortedList<>(filteredList); //Wrap the filtered list in a SortedList
|
||||
sortedList.comparatorProperty().bind(table.comparatorProperty()); //Bind the sorted list comparator to the table comparator
|
||||
// welsh.setCellValueFactory(new PropertyValueFactory<DictionaryEntry, String>("welsh"));
|
||||
// english.setCellValueFactory(new PropertyValueFactory<DictionaryEntry, String>("english"));
|
||||
|
||||
table.setRowFactory(tv -> {
|
||||
TableRow<DictionaryEntry> row = new TableRow<DictionaryEntry>() {
|
||||
@Override
|
||||
protected void updateItem(DictionaryEntry dictionaryEntry, boolean b) {
|
||||
super.updateItem(dictionaryEntry, b);
|
||||
if (!isEmpty()) {
|
||||
if (dictionaryEntry.isPracticeWord()) {
|
||||
setStyle("-fx-background-color: gray;");
|
||||
} else {
|
||||
setStyle(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
row.setOnMouseClicked(mouseEvent -> {
|
||||
if (mouseEvent.getClickCount() == 1 && (!row.isEmpty())) {
|
||||
for(DictionaryEntry entry : Application.dictionary) {
|
||||
if (entry.equals(row.getItem())) {
|
||||
entry.setPracticeWord(false);
|
||||
list.remove(row.getItem());
|
||||
table.refresh();
|
||||
}
|
||||
}
|
||||
table.getSelectionModel().clearSelection();
|
||||
}
|
||||
});
|
||||
return row;
|
||||
}
|
||||
);
|
||||
|
||||
welsh.setCellValueFactory(dictionaryEntryStringCellDataFeatures -> {
|
||||
|
||||
if (dictionaryEntryStringCellDataFeatures.getValue().getWordType().equals("nm")) {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getWelsh() + " {nm}");
|
||||
} else if (dictionaryEntryStringCellDataFeatures.getValue().getWordType().equals("nf")) {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getWelsh() + " {nf}");
|
||||
} else {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getWelsh());
|
||||
}
|
||||
});
|
||||
|
||||
english.setCellValueFactory(dictionaryEntryStringCellDataFeatures -> {
|
||||
if (dictionaryEntryStringCellDataFeatures.getValue().getWordType().equals("verb")) {
|
||||
return new SimpleStringProperty("to " + dictionaryEntryStringCellDataFeatures.getValue().getEnglish());
|
||||
} else {
|
||||
return new SimpleStringProperty(dictionaryEntryStringCellDataFeatures.getValue().getEnglish());
|
||||
}
|
||||
});
|
||||
|
||||
table.setItems(sortedList);
|
||||
table.getSortOrder().add(english);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void switchLangSort() {
|
||||
if (table.getSortOrder().contains(english)) {
|
||||
table.getSortOrder().clear();
|
||||
table.getSortOrder().add(welsh);
|
||||
} else if (table.getSortOrder().contains(welsh)) {
|
||||
table.getSortOrder().clear();
|
||||
table.getSortOrder().add(english);
|
||||
}
|
||||
table.sort();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void switchAlphaSort() {
|
||||
if (table.getSortOrder().contains(english)) {
|
||||
if (english.getSortType().equals(TableColumn.SortType.ASCENDING)) {
|
||||
english.setSortType(TableColumn.SortType.DESCENDING);
|
||||
} else {
|
||||
english.setSortType(TableColumn.SortType.ASCENDING);
|
||||
}
|
||||
} else if (table.getSortOrder().contains(welsh)) {
|
||||
if (welsh.getSortType().equals(TableColumn.SortType.ASCENDING)) {
|
||||
welsh.setSortType(TableColumn.SortType.DESCENDING);
|
||||
} else {
|
||||
welsh.setSortType(TableColumn.SortType.ASCENDING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Switches to the primary scene.
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@FXML
|
||||
private void switchToPrimary() throws IOException {
|
||||
Application.setRoot("primary");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* @(#) PrimaryController.java 0,1 2020/04/07
|
||||
*
|
||||
* Copyright (c) 2020 Aberystwyth University.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import java.io.IOException;
|
||||
import javafx.fxml.FXML;
|
||||
|
||||
/**
|
||||
* A class that generates a dictionary entry which is made up of:
|
||||
* 1. a Welsh word
|
||||
* 2. it's English translation
|
||||
* 3. it's word type
|
||||
* 4. whether or not it's a practice word (by default: not a practice word)
|
||||
*
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
* @see Application
|
||||
*/
|
||||
public class PrimaryController {
|
||||
|
||||
@FXML
|
||||
private void switchToSecondary() throws IOException {
|
||||
Application.setRoot("secondary");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* @(#) SecondaryController.java 0,1 2020/04/07
|
||||
*
|
||||
* Copyright (c) 2020 Aberystwyth University.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import java.io.IOException;
|
||||
import javafx.fxml.FXML;
|
||||
|
||||
/**
|
||||
* A class that demonstrates how a controller works.
|
||||
*
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
* @see Application
|
||||
*/
|
||||
public class SecondaryController {
|
||||
|
||||
@FXML
|
||||
private void switchToDictionary() throws IOException {
|
||||
Application.setRoot("dictionary");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
/**
|
||||
* @(#) DictionaryEntry.java 0,1 2020/04/07
|
||||
* <p>
|
||||
* Copyright (c) 2020 Aberystwyth University.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package uk.ac.aber.cs22120.group20.json;
|
||||
|
||||
import uk.ac.aber.cs22120.group20.Application;
|
||||
import uk.ac.aber.cs22120.group20.DictionaryController;
|
||||
|
||||
/**
|
||||
* A class that demonstrates how a controller works.
|
||||
*
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
* @see DictionaryController
|
||||
*/
|
||||
public class DictionaryEntry {
|
||||
private String english;
|
||||
private String welsh;
|
||||
private String wordType;
|
||||
private Boolean practiceWord;
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new instance of a DictionaryEntry
|
||||
*/
|
||||
public DictionaryEntry() {
|
||||
practiceWord = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new instance of a DictionaryEntry
|
||||
*
|
||||
* @param english english translation of the word
|
||||
* @param welsh welsh translation of the word
|
||||
* @param wordType type of word
|
||||
* @see Application
|
||||
* @see DictionaryController
|
||||
*/
|
||||
public DictionaryEntry(String english, String welsh, String wordType) {
|
||||
this.english = english;
|
||||
this.welsh = welsh;
|
||||
this.wordType = wordType;
|
||||
}
|
||||
|
||||
public String getEnglish() {
|
||||
return english;
|
||||
}
|
||||
|
||||
public void setEnglish(String english) {
|
||||
this.english = english;
|
||||
}
|
||||
|
||||
public String getWelsh() {
|
||||
return welsh;
|
||||
}
|
||||
|
||||
public void setWelsh(String welsh) {
|
||||
this.welsh = welsh;
|
||||
}
|
||||
|
||||
public String getWordType() {
|
||||
return wordType;
|
||||
}
|
||||
|
||||
public void setWordType(String wordType) {
|
||||
this.wordType = wordType;
|
||||
}
|
||||
|
||||
public Boolean isPracticeWord() {
|
||||
return practiceWord;
|
||||
}
|
||||
|
||||
public void setPracticeWord(Boolean practiceWord) {
|
||||
this.practiceWord = practiceWord;
|
||||
}
|
||||
|
||||
public boolean equals(DictionaryEntry entry) {
|
||||
return entry.getEnglish().equals(this.getEnglish()) && entry.getWelsh().equals(this.getWelsh()) && entry.getWordType().equals(this.getWordType());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package uk.ac.aber.cs22120.group20.json;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
|
||||
public class JsonProcessing {
|
||||
|
||||
public LinkedList<DictionaryEntry> readInJson(File file) {
|
||||
LinkedList<DictionaryEntry> returnVal = new LinkedList<>();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
try {
|
||||
returnVal.addAll(Arrays.asList(objectMapper.readValue(file, DictionaryEntry[].class)));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
public void writeOutJson(String directoryAndFile, LinkedList<DictionaryEntry> words) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String JsonString = "";
|
||||
|
||||
try {
|
||||
JsonString = objectMapper.writeValueAsString(words);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
Files.writeString(Paths.get(directoryAndFile), JsonString);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 520 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 558 B |
After Width: | Height: | Size: 403 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 786 B |
After Width: | Height: | Size: 549 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 854 B |
After Width: | Height: | Size: 720 B |
After Width: | Height: | Size: 291 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 747 B |
After Width: | Height: | Size: 305 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 823 B |
After Width: | Height: | Size: 676 B |
After Width: | Height: | Size: 431 B |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 806 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 783 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 807 B |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 851 B |
After Width: | Height: | Size: 796 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 501 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 844 B |
After Width: | Height: | Size: 501 B |
After Width: | Height: | Size: 429 B |
After Width: | Height: | Size: 894 B |
After Width: | Height: | Size: 758 B |
After Width: | Height: | Size: 555 B |
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 920 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 567 B |
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?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?>
|
||||
|
||||
<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.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>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView 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>
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?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?>
|
||||
|
||||
<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.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>
|
||||
</HBox>
|
||||
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView 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="#switchToPrimary" text="Switch to Primary View" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
|
||||
</padding>
|
||||
</VBox>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<VBox alignment="CENTER" 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.PrimaryController">
|
||||
<children>
|
||||
<Label text="Primary View"/>
|
||||
<Button fx:id="primaryButton" onAction="#switchToSecondary" text="Switch to Secondary View"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
|
||||
</padding>
|
||||
</VBox>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<VBox alignment="CENTER" 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.SecondaryController">
|
||||
<children>
|
||||
<Label text="Secondary View"/>
|
||||
<Button fx:id="dictionaryButton" text="Switch to Dictionary View" onAction="#switchToDictionary"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
|
||||
</padding>
|
||||
</VBox>
|
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 520 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 558 B |