From fbde4e6ec46fb1a94a80b2322688e16bb46126b1 Mon Sep 17 00:00:00 2001 From: top19 Date: Sun, 19 Apr 2020 16:37:24 +0100 Subject: [PATCH] Added flashcard project that implements the arrow buttons --- .../Switch Scenes/hellofx/.idea/hellofx.iml | 9 ++++++++ .../Switch Scenes/hellofx/.idea/modules.xml | 8 +++++++ .../law39/Switch Scenes/hellofx/.idea/vcs.xml | 1 + .../top19/flashcardfx/hellofx/.idea/vcs.xml | 6 ++++++ .../flashcardfx/hellofx/.idea/workspace.xml | 6 +++--- .../top19/flashcardfx/hellofx/pom.xml | 2 +- .../main/java/jsonStuff/WelshDictionary.java | 11 +++++++++- .../src/main/java/org/openjfx/javaFX/App.java | 2 -- .../org/openjfx/javaFX/PrimaryController.java | 16 +++++++++++--- ...sentation_src_img_Icons_icons8-left-50.png | Bin 0 -> 305 bytes ...entation_src_img_Icons_icons8-right-50.png | Bin 0 -> 302 bytes .../resources/org/openjfx/javaFX/sample.fxml | 20 ++++++++---------- .../resources/org/openjfx/javaFX/styles.css | 4 ++++ ...sentation_src_img_Icons_icons8-left-50.png | Bin 0 -> 305 bytes ...entation_src_img_Icons_icons8-right-50.png | Bin 0 -> 302 bytes .../classes/jsonStuff/WelshDictionary.class | Bin 1734 -> 1965 bytes .../classes/org/openjfx/javaFX/App.class | Bin 3140 -> 3140 bytes .../openjfx/javaFX/PrimaryController.class | Bin 4140 -> 4948 bytes .../classes/org/openjfx/javaFX/sample.fxml | 20 ++++++++---------- .../classes/org/openjfx/javaFX/styles.css | 4 ++++ 20 files changed, 77 insertions(+), 32 deletions(-) create mode 100644 dev/20200225/law39/Switch Scenes/hellofx/.idea/hellofx.iml create mode 100644 dev/20200225/law39/Switch Scenes/hellofx/.idea/modules.xml create mode 100644 dev/20200414/top19/flashcardfx/hellofx/.idea/vcs.xml create mode 100644 dev/20200414/top19/flashcardfx/hellofx/src/main/resources/assets/docs_ui_spec_presentation_src_img_Icons_icons8-left-50.png create mode 100644 dev/20200414/top19/flashcardfx/hellofx/src/main/resources/assets/docs_ui_spec_presentation_src_img_Icons_icons8-right-50.png create mode 100644 dev/20200414/top19/flashcardfx/hellofx/target/classes/assets/docs_ui_spec_presentation_src_img_Icons_icons8-left-50.png create mode 100644 dev/20200414/top19/flashcardfx/hellofx/target/classes/assets/docs_ui_spec_presentation_src_img_Icons_icons8-right-50.png diff --git a/dev/20200225/law39/Switch Scenes/hellofx/.idea/hellofx.iml b/dev/20200225/law39/Switch Scenes/hellofx/.idea/hellofx.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/dev/20200225/law39/Switch Scenes/hellofx/.idea/hellofx.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/dev/20200225/law39/Switch Scenes/hellofx/.idea/modules.xml b/dev/20200225/law39/Switch Scenes/hellofx/.idea/modules.xml new file mode 100644 index 0000000..960167d --- /dev/null +++ b/dev/20200225/law39/Switch Scenes/hellofx/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/dev/20200225/law39/Switch Scenes/hellofx/.idea/vcs.xml b/dev/20200225/law39/Switch Scenes/hellofx/.idea/vcs.xml index 94a25f7..e15e368 100644 --- a/dev/20200225/law39/Switch Scenes/hellofx/.idea/vcs.xml +++ b/dev/20200225/law39/Switch Scenes/hellofx/.idea/vcs.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/dev/20200414/top19/flashcardfx/hellofx/.idea/vcs.xml b/dev/20200414/top19/flashcardfx/hellofx/.idea/vcs.xml new file mode 100644 index 0000000..bc59970 --- /dev/null +++ b/dev/20200414/top19/flashcardfx/hellofx/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/dev/20200414/top19/flashcardfx/hellofx/.idea/workspace.xml b/dev/20200414/top19/flashcardfx/hellofx/.idea/workspace.xml index 598071f..d7a3843 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/.idea/workspace.xml +++ b/dev/20200414/top19/flashcardfx/hellofx/.idea/workspace.xml @@ -155,8 +155,8 @@ - @@ -264,7 +264,7 @@ - + diff --git a/dev/20200414/top19/flashcardfx/hellofx/pom.xml b/dev/20200414/top19/flashcardfx/hellofx/pom.xml index 71a830f..694447c 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/pom.xml +++ b/dev/20200414/top19/flashcardfx/hellofx/pom.xml @@ -9,7 +9,7 @@ 11 13 - + org.openjfx javafx-controls diff --git a/dev/20200414/top19/flashcardfx/hellofx/src/main/java/jsonStuff/WelshDictionary.java b/dev/20200414/top19/flashcardfx/hellofx/src/main/java/jsonStuff/WelshDictionary.java index 2f407b1..7b57538 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/src/main/java/jsonStuff/WelshDictionary.java +++ b/dev/20200414/top19/flashcardfx/hellofx/src/main/java/jsonStuff/WelshDictionary.java @@ -4,9 +4,10 @@ public class WelshDictionary { private String english; private String welsh; private String wordType; - + private boolean practiceWord; public WelshDictionary() { + practiceWord = false; } public WelshDictionary(String english, String welsh, String wordType) { @@ -39,6 +40,14 @@ public class WelshDictionary { this.wordType = wordType; } + public boolean isPracticeWord() { + return practiceWord; + } + + public void setPracticeWord(boolean practiceWord) { + this.practiceWord = practiceWord; + } + @Override public String toString() { return "WelshDictionary{" + diff --git a/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/App.java b/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/App.java index c3af887..f0bf418 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/App.java +++ b/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/App.java @@ -2,12 +2,10 @@ package org.openjfx.javaFX; import javafx.application.Application; import javafx.application.Platform; -import javafx.event.EventHandler; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; -import javafx.stage.WindowEvent; import jsonStuff.JsonProcessing; import jsonStuff.WelshDictionary; diff --git a/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/PrimaryController.java b/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/PrimaryController.java index 2f8fcc6..ab9527f 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/PrimaryController.java +++ b/dev/20200414/top19/flashcardfx/hellofx/src/main/java/org/openjfx/javaFX/PrimaryController.java @@ -3,13 +3,12 @@ package org.openjfx.javaFX; import javafx.animation.*; import javafx.fxml.FXML; import javafx.scene.Node; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; import javafx.scene.shape.Rectangle; import javafx.scene.text.Text; import javafx.scene.transform.Rotate; import javafx.util.Duration; -import jsonStuff.WelshDictionary; - -import java.util.Stack; public class PrimaryController { int index = 0; @@ -24,6 +23,11 @@ public class PrimaryController { @FXML private Text testWord; + @FXML + private ImageView left_arrow; + @FXML + private ImageView right_arrow; + @FXML private void initialize() { testWord.setText(App.words.getFirst().getWelsh()); @@ -31,6 +35,12 @@ public class PrimaryController { updateCounter(); card = flashcard; + + Image left = new Image(getClass().getResource("/assets/docs_ui_spec_presentation_src_img_Icons_icons8-left-50.png").toExternalForm()); + Image right = new Image(getClass().getResourceAsStream("/assets/docs_ui_spec_presentation_src_img_Icons_icons8-right-50.png")); + + left_arrow.setImage(left); + right_arrow.setImage(right); } @FXML diff --git a/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/assets/docs_ui_spec_presentation_src_img_Icons_icons8-left-50.png b/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/assets/docs_ui_spec_presentation_src_img_Icons_icons8-left-50.png new file mode 100644 index 0000000000000000000000000000000000000000..e0812e935a8ca2c155e1f5ed92ae8da93be8861c GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-wj^(N7l!{JxM1({$v}~3o-U3d z8I5mmIPx8IkU09WKKJdM#@jbGCAsdHv{!mV0q0hsM|@&34%v%4FI-xAtmfEn)y>(r zzE66&<)?#-i;GG{tpeLLhug)|PAzj_TC#oXSLx-mjtkw)`o;5f)ruph(lx@99~>&~ zl*p(&^HilnNIB#X+tdw*YC2aOF%?djR{WOl1=I3f&QCq;YtK#i(?7Srl))<0%jLjD zhsNKg`dqgwg4J~I|JK%eE}4*?{kC%B*1D&u{td;l=2}*D<`R~5u`7B)>jRIS(eLJ- zx>2j+p|e^?VSri(W9%~aHI1zHHb$a?f`Thgir!ZE*s`@hD*@z$%|3r_tD;G{##wd_hI8%#7W-$ImsCcRV=!rbEStNoEEAWXmF~^RFb*eqvrkzyu%SeCvuk6O{DGcsR|EFoR=r7_F{PTaR(~lJY+KvUY w_ye~#>$wOpotpNN%|fu^bO_LWM-B)d4S&;j;nW*Npm!NOUHx3vIVCg!0L6`b@c;k- literal 0 HcmV?d00001 diff --git a/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/sample.fxml b/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/sample.fxml index a2d52bd..028abdc 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/sample.fxml +++ b/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/sample.fxml @@ -1,43 +1,41 @@ - - - + + stylesheets="@styles.css" fx:controller="org.openjfx.javaFX.PrimaryController" alignment="center" spacing="10"> - - + - + - + - - - + + + diff --git a/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/styles.css b/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/styles.css index 65f6003..5c0b525 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/styles.css +++ b/dev/20200414/top19/flashcardfx/hellofx/src/main/resources/org/openjfx/javaFX/styles.css @@ -1,3 +1,7 @@ .button { -fx-text-fill: blue; } + +#counter { + -fx-text-fill: blue; +} \ No newline at end of file diff --git a/dev/20200414/top19/flashcardfx/hellofx/target/classes/assets/docs_ui_spec_presentation_src_img_Icons_icons8-left-50.png b/dev/20200414/top19/flashcardfx/hellofx/target/classes/assets/docs_ui_spec_presentation_src_img_Icons_icons8-left-50.png new file mode 100644 index 0000000000000000000000000000000000000000..e0812e935a8ca2c155e1f5ed92ae8da93be8861c GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-wj^(N7l!{JxM1({$v}~3o-U3d z8I5mmIPx8IkU09WKKJdM#@jbGCAsdHv{!mV0q0hsM|@&34%v%4FI-xAtmfEn)y>(r zzE66&<)?#-i;GG{tpeLLhug)|PAzj_TC#oXSLx-mjtkw)`o;5f)ruph(lx@99~>&~ zl*p(&^HilnNIB#X+tdw*YC2aOF%?djR{WOl1=I3f&QCq;YtK#i(?7Srl))<0%jLjD zhsNKg`dqgwg4J~I|JK%eE}4*?{kC%B*1D&u{td;l=2}*D<`R~5u`7B)>jRIS(eLJ- zx>2j+p|e^?VSri(W9%~aHI1zHHb$a?f`Thgir!ZE*s`@hD*@z$%|3r_tD;G{##wd_hI8%#7W-$ImsCcRV=!rbEStNoEEAWXmF~^RFb*eqvrkzyu%SeCvuk6O{DGcsR|EFoR=r7_F{PTaR(~lJY+KvUY w_ye~#>$wOpotpNN%|fu^bO_LWM-B)d4S&;j;nW*Npm!NOUHx3vIVCg!0L6`b@c;k- literal 0 HcmV?d00001 diff --git a/dev/20200414/top19/flashcardfx/hellofx/target/classes/jsonStuff/WelshDictionary.class b/dev/20200414/top19/flashcardfx/hellofx/target/classes/jsonStuff/WelshDictionary.class index f6f0aef8d8594005301248a1db5ee254d6bb0188..221487fa2dd81b927707ce247e1d5985e76327ac 100644 GIT binary patch literal 1965 zcmbW1+fEx-6o&tejcx4VVAqgPQc7A{Y(wItDJ8@}q|%_Iat{&+BziTN4IY@xpqU{k zs`?&%h+ec(QKVet0rF5${xvhjgBhwQ7v6{Ewg3I?b(pvBUcUjbgvUh;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}V=Lvw%sSF&c9$P+B~PQYxP#Ra!bn zrmHtbJ6I)#6scaLUm7=%@w7|+{y>|QJaC4}dFV`%<1YhUO5ir8gOe*X`siPwd?u#| z7@cnh5)Z?k!ECU3gS=Td?jd(U{fmzi?u4f>=6hYj#RE7&kq!e%^@B`>g4_)UN%e!w z5XkHmAe>f?z+5OurXOT36l6Xeq$hQLMDheuxB`Sz!ypTnAnRVLfNY6ULoG!ub3sW# kKUKMhDjP&OihEu*^K>Gpo&}23DtJJ%Bv}vf2#+!O3n=PW>i_@% diff --git a/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/App.class b/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/App.class index 79c3ec15ba3c839576e5baf8ee6b6752751b1975..86ef2e2716a8825f94a4adb726df015ed6651d1e 100644 GIT binary patch delta 93 zcmX>iaYSN+7Z;}x0}F!~13!cK%I delta 93 zcmX>iaYSN+7Z;}p0}F!$13!c0NX#G75w!aA6Tl5m9p)r|~h4!VJv}O4`q-S+;14 zy%znoubOG8=tI%W$~G(8EVbSCeb*MNU+2D=U_kw&f8Kfb+;h+Oo$s9c-o}9kv!wn1 zbnF3e9!_kLrWh0vBL$?*b1iT+v^s)r*(W=^O)ih@sN_!x1{5=#j}ie^j~p7+=n4h} zq-5t*^CON%m(SzSokdn$D4@(i`*JAgnB#W`oh@ExuvvCHn*(xC_Jv#_uixhk2HZ|> zlgC-<_WOcP#mh~>&_=l-G&Fzsux6h}LK#Mh7|k#SV+ADi01^;OL~7-rza`+71!QJN zQJEA9czvFt2s@t~a!jtRE|O4zN)c5IF+8qrGEXG`7KW{8Q!SQ!%XZFMQ%fyFGj=fSEo7h5eYvObjlel4#U-2~j^_TPIGR1~Q=&ku5YXWu^%t#F)vdV19+C*6k{Yi%eD=1Talz8buThB z4A5{UxpLG*mZa=L;WV3uqT~xSlxiq%M|E|lZ@h*H?Wn7v=qb4xrjvEq$#${HLJT1c zLJBg`4`*Q@1|u6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es/org/openjfx/javaFX/sample.fxml b/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/sample.fxml index a2d52bd..028abdc 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/sample.fxml +++ b/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/sample.fxml @@ -1,43 +1,41 @@ - - - + + stylesheets="@styles.css" fx:controller="org.openjfx.javaFX.PrimaryController" alignment="center" spacing="10"> - - + - + - + - - - + + + diff --git a/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/styles.css b/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/styles.css index 65f6003..5c0b525 100644 --- a/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/styles.css +++ b/dev/20200414/top19/flashcardfx/hellofx/target/classes/org/openjfx/javaFX/styles.css @@ -1,3 +1,7 @@ .button { -fx-text-fill: blue; } + +#counter { + -fx-text-fill: blue; +} \ No newline at end of file