From 08a4f5e4bc534ab5d35fbb4ede76970f1942965f Mon Sep 17 00:00:00 2001 From: law39 Date: Sat, 25 Apr 2020 22:08:43 +0100 Subject: [PATCH] Updated sharedcodecontroller Shared code compiler now runs to show main screen, if it didn't already. --- dev/20200421/top19/sharedcontroller/pom.xml | 44 ++++++++++++------ .../src/main/java/{ => code}/Application.java | 6 ++- .../java/{ => code}/SharedCodeController.java | 2 + .../src/main/java/module-info.java | 7 ++- .../src/main/resources/test.fxml | 2 +- .../target/classes/Application.class | Bin 2109 -> 0 bytes .../target/classes/code/Application.class | Bin 0 -> 2319 bytes .../{ => code}/SharedCodeController.class | Bin 3453 -> 3463 bytes .../target/classes/module-info.class | Bin 205 -> 210 bytes .../sharedcontroller/target/classes/test.fxml | 2 +- 10 files changed, 44 insertions(+), 19 deletions(-) rename dev/20200421/top19/sharedcontroller/src/main/java/{ => code}/Application.java (80%) rename dev/20200421/top19/sharedcontroller/src/main/java/{ => code}/SharedCodeController.java (99%) delete mode 100644 dev/20200421/top19/sharedcontroller/target/classes/Application.class create mode 100644 dev/20200421/top19/sharedcontroller/target/classes/code/Application.class rename dev/20200421/top19/sharedcontroller/target/classes/{ => code}/SharedCodeController.class (69%) diff --git a/dev/20200421/top19/sharedcontroller/pom.xml b/dev/20200421/top19/sharedcontroller/pom.xml index 0e4176a..d2e762f 100644 --- a/dev/20200421/top19/sharedcontroller/pom.xml +++ b/dev/20200421/top19/sharedcontroller/pom.xml @@ -1,28 +1,44 @@ - - + 4.0.0 - - org.top19 - sharedcontroller + uk.ac.aber.cs22120.group20 + Welsh Vocabulary Tutor 1.0-SNAPSHOT - 11 - 13 + UTF-8 + 11 + 11 org.openjfx - javafx - 13 + javafx-controls + 11 org.openjfx javafx-fxml - 13 + 11 - - + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.1 + + uk.ac.aber.cs22120.group20.App + + + + \ No newline at end of file diff --git a/dev/20200421/top19/sharedcontroller/src/main/java/Application.java b/dev/20200421/top19/sharedcontroller/src/main/java/code/Application.java similarity index 80% rename from dev/20200421/top19/sharedcontroller/src/main/java/Application.java rename to dev/20200421/top19/sharedcontroller/src/main/java/code/Application.java index 0eaabc9..281f71a 100644 --- a/dev/20200421/top19/sharedcontroller/src/main/java/Application.java +++ b/dev/20200421/top19/sharedcontroller/src/main/java/code/Application.java @@ -1,9 +1,13 @@ +package code; + import javafx.application.Platform; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; +import java.util.Objects; + public class Application extends javafx.application.Application { private static Scene scene; public static void main(String[] args) { @@ -12,7 +16,7 @@ public class Application extends javafx.application.Application { @Override public void start(Stage primaryStage) throws Exception { - Parent root = FXMLLoader.load(getClass().getResource("test.fxml")); + Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getClassLoader().getResource("test.fxml"))); primaryStage.setTitle("test"); primaryStage.setScene(new Scene(root,300, 275)); diff --git a/dev/20200421/top19/sharedcontroller/src/main/java/SharedCodeController.java b/dev/20200421/top19/sharedcontroller/src/main/java/code/SharedCodeController.java similarity index 99% rename from dev/20200421/top19/sharedcontroller/src/main/java/SharedCodeController.java rename to dev/20200421/top19/sharedcontroller/src/main/java/code/SharedCodeController.java index fd4e252..6dd9571 100644 --- a/dev/20200421/top19/sharedcontroller/src/main/java/SharedCodeController.java +++ b/dev/20200421/top19/sharedcontroller/src/main/java/code/SharedCodeController.java @@ -1,3 +1,5 @@ +package code; + import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.image.Image; diff --git a/dev/20200421/top19/sharedcontroller/src/main/java/module-info.java b/dev/20200421/top19/sharedcontroller/src/main/java/module-info.java index 1c069e2..d4588b0 100644 --- a/dev/20200421/top19/sharedcontroller/src/main/java/module-info.java +++ b/dev/20200421/top19/sharedcontroller/src/main/java/module-info.java @@ -1,4 +1,7 @@ -module sharedcontroller { - requires javafx.graphics; +module code { + requires javafx.controls; requires javafx.fxml; + + opens code to javafx.fxml; + exports code; } \ No newline at end of file diff --git a/dev/20200421/top19/sharedcontroller/src/main/resources/test.fxml b/dev/20200421/top19/sharedcontroller/src/main/resources/test.fxml index d7e9bab..f3e00ab 100644 --- a/dev/20200421/top19/sharedcontroller/src/main/resources/test.fxml +++ b/dev/20200421/top19/sharedcontroller/src/main/resources/test.fxml @@ -12,7 +12,7 @@ diff --git a/dev/20200421/top19/sharedcontroller/target/classes/Application.class b/dev/20200421/top19/sharedcontroller/target/classes/Application.class deleted file mode 100644 index 1286c8536d914f4bd9704d852a7dba72c6f7dab1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2109 zcmbVNU3b$)5WO2amZON+n0z#$P)Y-}6Nu<(ffiF5aFUYNA!!@}lzy%4jjcqM9BG}8 zwm+bMr!OXlp7!v};WzbkRuZvHLm&FGyBh7>xpQYUdinSBzX06CuQ~>h(2z7Rh!n&5 zZNA614ou!|+g6QB%XQ4Vy)#4Vw&hsz4nrbe*wm0_$SN1p=1#+`NY8Q_I&=(cFbtf+ z2*Yr{zs);Nt;sN+e_DRivsl>Fk;Q2ZIRj@f+6TT`-4->;kZuTBvbpawoXHnr7=f{v z#yG=}6uz9>I%wHC-od1XDFbKmE<>glGQt=pxOL&X9j_)BF6Lu^VLHVqh9ji;aJ^jA zaUSn!xM1LYT%G4Xr?DD$s7?L&}dWf&xTy*47&@f|Q7FQT@uP;m95F|UTB#bZQh9zw}j-8YSm1{2M8pNrnH8tW6&_Ty?g~`*cl3S;AGiA#W4?3-?@HTi=36LwhHEwTm&r;8kF)5oCHTbD= z?BgjCNQ+wzZQN_9_CMhZQamL0NSas`dR;rW?a zOroMM9@Ioz4G3QYkNP(p1IKR|Mr_`y*7XN0j%f{rHQ?(@1J)-SPkGEHZY`S$nlft%+9oQOL1{}EbO{%LQSIgORcZ69E zXp#rt;x*}dhcvfZ@uycI?>?t6K-jAOblG)xI_+Y>Jw6WOmMB{2xN+DP|L)fqGhJkI zV_i%f;oJ*+uriyw)WwIhf8gqqE2A(+@zFDU+{KOA=ePxQac8!Rd%cKL#2Lt_KOM%A zqY+0Qn8bBV1q?2PQKBpq_ow)dm}GGo-{S{j^CS5yaem6`sz`KF{BF@6Lxg%{KS diff --git a/dev/20200421/top19/sharedcontroller/target/classes/code/Application.class b/dev/20200421/top19/sharedcontroller/target/classes/code/Application.class new file mode 100644 index 0000000000000000000000000000000000000000..1a5977282881465fbba1c1cc145daa0359de8caf GIT binary patch literal 2319 zcmbVNSy$Ue6#fPqWQ1xQ2a*^{lBR?jNKw*-v^dSi($Jcvn2@CDHrN9e$dZv{mhSuZ z)}PWBhm)T6@Z8hi)YChXY>TCR=*uj3=HC0=@7_D}=ig8N0B{{Yt7t<^L0m&SIvCDx z@NK@ftMh8rG>Y6aY)ik>S~GOqFf7Bn$q>s9uP8_`q@;>&a%){Lc#dJMt5DIUK-2IH zl5}3QOX7$Tlh>?bnc+!+PIGr7i z*zkop6=!f(!8r{X^f7d|e1uBLhJN1WCE+k+j#~+iatS=k(CG=+8(Z70m@3ZWf`W@0 zp2H=E-Xo?P_PWTyl5p*sQxpuBvJr>@OSurWB|QE9Ql20W;1m3`NZb*BWO1e1sweBMh2vF!ZM43SLw&ra{M5N`pM3tjqZH znTK=vMigYCM|oT!8JIelDiR6_5Bp&*m2uApo#`MZf{-n7brF9?|f{RGMkBJ*(j@yiL7O=2l5U9SDnu?2B!RS)Z2U zJ^$39%#LGD!#ox!trXvaHEG(eSfXSSE7WsMS0^Y30N>HDB-=CYmhBxC%eb##MZ*Ir z>koO1w(O$Gy*1mZkcQYbi1|l&SHWYc@!p|+D(tzQkk_)a!z&E!K0ORQez`X33WBFw zlhn%8PI#VaF+S1Bp{u)i`-n{jv@Dtp7acrB+^d62Ws7`{SPVW{)Rlant0y`|? z;5}=eQ16+%vRdMUKBhtHnSo~3NJItvz_3d8j-PlR8zWl!nl6uBA-@IxahNeAfvLzN zJ0=rKqPqm!^&DQE6JFUax!oPuRk4SU6?~%MQ+!5^DX#`t4Qt!p6nfr=Ng8~O7d_kA zW9X_xcYg)A4=Du>f_ila^R~TNtLA*{(RV#63B3i1%X?Mv{|*C}|E(K+Y(lq_+%yY@ zCvqu#5v`9%|4tAahm15MC^Ac`{-=x2Tqev&>gXnfWR8vXIMv>JV_hBAb}Xow?^vduA?{IU&p{c zoAoqU~nmHZ}2TiRFZs$AMg`0{{SZSTQ>jz literal 0 HcmV?d00001 diff --git a/dev/20200421/top19/sharedcontroller/target/classes/SharedCodeController.class b/dev/20200421/top19/sharedcontroller/target/classes/code/SharedCodeController.class similarity index 69% rename from dev/20200421/top19/sharedcontroller/target/classes/SharedCodeController.class rename to dev/20200421/top19/sharedcontroller/target/classes/code/SharedCodeController.class index 5fd60b8fe5e1c0da807756a0d48b5e042d82d631..c84571819552e24f750a44562a38686a84970cd2 100644 GIT binary patch delta 238 zcmew>)h<23gH19yKP6RvvLd_4#@Lmt?9x7P{$?4r4kkw4$xAu>d5syk7)%)W7)%+& z8O$d$az2%{0Z77BVtnlFO{gCB!DLjZ#&Lm*H#7%a=hZOs@l`67?@*w6g+eY9-KA831nh BHEI9= delta 220 zcmZpd{wp=XgHdFo-(FTGF`vysY;%|xxhJpZ@aHvT;9@Xh;A1dm5N9x*%+2{!)&j_~ zWYA-W$0qCV_3*wKbe;+Rn&=rlfjumh{1(H8mLBv!Hq$e!F@6# zxA5dyTtT8^W^7j*yt diff --git a/dev/20200421/top19/sharedcontroller/target/classes/test.fxml b/dev/20200421/top19/sharedcontroller/target/classes/test.fxml index d7e9bab..f3e00ab 100644 --- a/dev/20200421/top19/sharedcontroller/target/classes/test.fxml +++ b/dev/20200421/top19/sharedcontroller/target/classes/test.fxml @@ -12,7 +12,7 @@