maven buildsystem
* maven is now used to build cemu_UI * cleaned up a lot of code for better overview
							
								
								
									
										53
									
								
								.classpath
									
									
									
									
									
								
							
							
						
						| @ -1,29 +1,32 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <classpath> | <classpath> | ||||||
| 	<classpathentry kind="src" path="src"/> | 	<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||||||
| 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | 		<attributes> | ||||||
|  | 			<attribute name="optional" value="true"/> | ||||||
|  | 			<attribute name="maven.pomderived" value="true"/> | ||||||
|  | 		</attributes> | ||||||
|  | 	</classpathentry> | ||||||
|  | 	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||||||
|  | 		<attributes> | ||||||
|  | 			<attribute name="maven.pomderived" value="true"/> | ||||||
|  | 		</attributes> | ||||||
|  | 	</classpathentry> | ||||||
|  | 	<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||||||
|  | 		<attributes> | ||||||
|  | 			<attribute name="optional" value="true"/> | ||||||
|  | 			<attribute name="maven.pomderived" value="true"/> | ||||||
|  | 		</attributes> | ||||||
|  | 	</classpathentry> | ||||||
|  | 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||||||
|  | 		<attributes> | ||||||
|  | 			<attribute name="maven.pomderived" value="true"/> | ||||||
|  | 		</attributes> | ||||||
|  | 	</classpathentry> | ||||||
| 	<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/> | 	<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/> | ||||||
| 	<classpathentry kind="lib" path="src/libraries/minimal-json-0.9.4.jar"/> | 	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||||||
| 	<classpathentry kind="lib" path="src/libraries/commons-vfs2-2.1.1744488.2.jar"/> | 		<attributes> | ||||||
| 	<classpathentry kind="lib" path="src/libraries/flow-8.0.1.jar"/> | 			<attribute name="maven.pomderived" value="true"/> | ||||||
| 	<classpathentry kind="lib" path="src/libraries/zip4j-1.3.2.jar"/> | 		</attributes> | ||||||
| 	<classpathentry kind="lib" path="src/libraries/log4j-api-2.8.2.jar"/> | 	</classpathentry> | ||||||
| 	<classpathentry kind="lib" path="src/libraries/log4j-core-2.8.2.jar"/> | 	<classpathentry kind="output" path="target/classes"/> | ||||||
| 	<classpathentry kind="lib" path="src/libraries/sqlite-jdbc-3.20.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/jfoenix-1.9.1.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/commons-codec-1.11.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/commons-io-2.6.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-api-client-1.23.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-api-services-drive-v3-rev87-1.23.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-http-client-1.23.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-http-client-jackson2-1.23.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-oauth-client-1.23.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-oauth-client-java6-1.23.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/google-oauth-client-jetty-1.23.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/jackson-core-2.9.2.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/javax.servlet-api-4.0.0.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/jetty-6.1.26.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/google_api_libraries/jetty-util-6.1.26.jar"/> |  | ||||||
| 	<classpathentry kind="lib" path="src/libraries/commons-logging-1.1.1.jar"/> |  | ||||||
| 	<classpathentry kind="output" path="bin"/> |  | ||||||
| </classpath> | </classpath> | ||||||
|  | |||||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -48,4 +48,5 @@ Temporary Items | |||||||
| config.xml | config.xml | ||||||
| client_secret.json | client_secret.json | ||||||
| .directory | .directory | ||||||
|  | target/ | ||||||
|  | cemu_UI.jar | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								.project
									
									
									
									
									
								
							
							
						
						| @ -15,8 +15,14 @@ | |||||||
| 			<arguments> | 			<arguments> | ||||||
| 			</arguments> | 			</arguments> | ||||||
| 		</buildCommand> | 		</buildCommand> | ||||||
|  | 		<buildCommand> | ||||||
|  | 			<name>org.eclipse.m2e.core.maven2Builder</name> | ||||||
|  | 			<arguments> | ||||||
|  | 			</arguments> | ||||||
|  | 		</buildCommand> | ||||||
| 	</buildSpec> | 	</buildSpec> | ||||||
| 	<natures> | 	<natures> | ||||||
|  | 		<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||||||
| 		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | 		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||||||
| 		<nature>org.eclipse.jdt.core.javanature</nature> | 		<nature>org.eclipse.jdt.core.javanature</nature> | ||||||
| 	</natures> | 	</natures> | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								.settings/org.eclipse.core.resources.prefs
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,5 @@ | |||||||
|  | eclipse.preferences.version=1 | ||||||
|  | encoding//src/main/java=UTF-8 | ||||||
|  | encoding//src/main/resources=UTF-8 | ||||||
|  | encoding//src/test/java=UTF-8 | ||||||
|  | encoding/<project>=UTF-8 | ||||||
| @ -9,4 +9,5 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate | |||||||
| org.eclipse.jdt.core.compiler.debug.sourceFile=generate | org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||||||
| org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||||||
| org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||||||
|  | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||||||
| org.eclipse.jdt.core.compiler.source=1.8 | org.eclipse.jdt.core.compiler.source=1.8 | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								.settings/org.eclipse.m2e.core.prefs
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,4 @@ | |||||||
|  | activeProfiles= | ||||||
|  | eclipse.preferences.version=1 | ||||||
|  | resolveWorkspaceProjects=true | ||||||
|  | version=1 | ||||||
							
								
								
									
										5
									
								
								bin/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -1,5 +0,0 @@ | |||||||
| /application/ |  | ||||||
| /cloudControllerInstances/ |  | ||||||
| /datatypes/ |  | ||||||
| /UIElements/ |  | ||||||
| /EventHandlers/ |  | ||||||
| @ -1,8 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="ASCII"?> |  | ||||||
| <anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build"> |  | ||||||
|   <deploy> |  | ||||||
|     <application name="cemu_UI"/> |  | ||||||
|     <info/> |  | ||||||
|   </deploy> |  | ||||||
|   <signjar/> |  | ||||||
| </anttasks:AntTask> |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								cemu_UI.jar
									
									
									
									
									
								
							
							
						
						
							
								
								
									
										222
									
								
								pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,222 @@ | |||||||
|  | <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/xsd/maven-4.0.0.xsd"> | ||||||
|  |   <modelVersion>4.0.0</modelVersion> | ||||||
|  |  | ||||||
|  |   <groupId>com</groupId> | ||||||
|  |   <artifactId>cemu_UI</artifactId> | ||||||
|  |   <version>0.2.1-SNAPSHOT</version> | ||||||
|  |   <packaging>jar</packaging> | ||||||
|  |  | ||||||
|  |   <name>cemu_UI</name> | ||||||
|  |   <url>http://www.kellerkinder.xyz</url> | ||||||
|  |  | ||||||
|  |   <properties> | ||||||
|  |     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||||
|  |     <maven.compiler.source>1.8</maven.compiler.source> | ||||||
|  |     <maven.compiler.target>1.8</maven.compiler.target> | ||||||
|  |   </properties> | ||||||
|  |  | ||||||
|  |   <dependencies> | ||||||
|  |        | ||||||
|  |     <dependency> | ||||||
|  |       <groupId>junit</groupId> | ||||||
|  |       <artifactId>junit</artifactId> | ||||||
|  |       <version>3.8.1</version> | ||||||
|  |       <scope>test</scope> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.jfoenix</groupId> | ||||||
|  |         <artifactId>jfoenix</artifactId> | ||||||
|  |         <version>1.9.0</version> | ||||||
|  |     </dependency> | ||||||
|  |          | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.eclipsesource.minimal-json</groupId> | ||||||
|  |         <artifactId>minimal-json</artifactId> | ||||||
|  |         <version>0.9.4</version> | ||||||
|  |     </dependency> | ||||||
|  |          | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>org.xerial</groupId> | ||||||
|  |         <artifactId>sqlite-jdbc</artifactId> | ||||||
|  |         <version>3.20.0</version> | ||||||
|  |     </dependency> | ||||||
|  | 	 | ||||||
|  | 	<dependency> | ||||||
|  | 		<groupId>org.apache.logging.log4j</groupId> | ||||||
|  | 		<artifactId>log4j-api</artifactId> | ||||||
|  | 		<version>2.9.0</version> | ||||||
|  | 	</dependency> | ||||||
|  | 	 | ||||||
|  | 	<dependency> | ||||||
|  | 		<groupId>org.apache.logging.log4j</groupId> | ||||||
|  | 		<artifactId>log4j-core</artifactId> | ||||||
|  | 		<version>2.9.0</version> | ||||||
|  | 	</dependency> | ||||||
|  |      | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>commons-io</groupId> | ||||||
|  |         <artifactId>commons-io</artifactId> | ||||||
|  |         <version>2.5</version> | ||||||
|  |     </dependency> | ||||||
|  |      | ||||||
|  |     <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-vfs2 --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>org.apache.commons</groupId> | ||||||
|  |         <artifactId>commons-vfs2</artifactId> | ||||||
|  |         <version>2.2</version> | ||||||
|  |     </dependency> | ||||||
|  |      | ||||||
|  |     <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>commons-codec</groupId> | ||||||
|  |         <artifactId>commons-codec</artifactId> | ||||||
|  |         <version>1.11</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/io.datafx/flow --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>io.datafx</groupId> | ||||||
|  |         <artifactId>flow</artifactId> | ||||||
|  |         <version>8.0.1</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/net.lingala.zip4j/zip4j --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>net.lingala.zip4j</groupId> | ||||||
|  |         <artifactId>zip4j</artifactId> | ||||||
|  |         <version>1.3.2</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- Google Drive-API libraries--> | ||||||
|  |     <!-- https://mvnrepository.com/artifact/commons-logging/commons-logging --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>commons-logging</groupId> | ||||||
|  |         <artifactId>commons-logging</artifactId> | ||||||
|  |         <version>1.1.1</version> | ||||||
|  |     </dependency> | ||||||
|  |      | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.google.api-client/google-api-client --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.google.api-client</groupId> | ||||||
|  |         <artifactId>google-api-client</artifactId> | ||||||
|  |         <version>1.23.0</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-drive --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.google.apis</groupId> | ||||||
|  |         <artifactId>google-api-services-drive</artifactId> | ||||||
|  |         <version>v3-rev87-1.23.0</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.google.http-client/google-http-client --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.google.http-client</groupId> | ||||||
|  |         <artifactId>google-http-client</artifactId> | ||||||
|  |         <version>1.23.0</version> | ||||||
|  |     </dependency> | ||||||
|  |      | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.google.http-client/google-http-client-jackson2 --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.google.http-client</groupId> | ||||||
|  |         <artifactId>google-http-client-jackson2</artifactId> | ||||||
|  |         <version>1.23.0</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.google.oauth-client</groupId> | ||||||
|  |         <artifactId>google-oauth-client</artifactId> | ||||||
|  |         <version>1.23.0</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-java6 --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.google.oauth-client</groupId> | ||||||
|  |         <artifactId>google-oauth-client-java6</artifactId> | ||||||
|  |         <version>1.23.0</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.google.oauth-client</groupId> | ||||||
|  |         <artifactId>google-oauth-client-jetty</artifactId> | ||||||
|  |         <version>1.23.0</version> | ||||||
|  |     </dependency> | ||||||
|  |      | ||||||
|  |     <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>com.fasterxml.jackson.core</groupId> | ||||||
|  |         <artifactId>jackson-core</artifactId> | ||||||
|  |         <version>2.9.2</version> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>javax.servlet</groupId> | ||||||
|  |         <artifactId>javax.servlet-api</artifactId> | ||||||
|  |         <version>4.0.0-b01</version> | ||||||
|  |         <scope>provided</scope> | ||||||
|  |     </dependency> | ||||||
|  |  | ||||||
|  |     <!-- https://mvnrepository.com/artifact/org.mortbay.jetty/jetty --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>org.mortbay.jetty</groupId> | ||||||
|  |         <artifactId>jetty</artifactId> | ||||||
|  |         <version>6.1.26</version> | ||||||
|  |     </dependency> | ||||||
|  |      | ||||||
|  |     <!-- https://mvnrepository.com/artifact/org.mortbay.jetty/jetty-util --> | ||||||
|  |     <dependency> | ||||||
|  |         <groupId>org.mortbay.jetty</groupId> | ||||||
|  |         <artifactId>jetty-util</artifactId> | ||||||
|  |         <version>6.1.26</version> | ||||||
|  |     </dependency> | ||||||
|  |      | ||||||
|  |   </dependencies> | ||||||
|  |    | ||||||
|  |   <build> | ||||||
|  |       <plugins> | ||||||
|  |           <plugin> | ||||||
|  |             <groupId>org.apache.maven.plugins</groupId> | ||||||
|  |             <artifactId>maven-jar-plugin</artifactId> | ||||||
|  |             <version>3.0.2</version> | ||||||
|  |             <configuration> | ||||||
|  |                 <archive> | ||||||
|  |                     <manifest> | ||||||
|  |                         <addClasspath>true</addClasspath> | ||||||
|  |                         <classpathPrefix>libraries/</classpathPrefix> | ||||||
|  |                         <mainClass>com.cemu_UI.application.Main</mainClass> | ||||||
|  |                     </manifest> | ||||||
|  |                 </archive> | ||||||
|  |             </configuration> | ||||||
|  |         </plugin> | ||||||
|  |  | ||||||
|  |         <plugin> | ||||||
|  |             <groupId>org.apache.maven.plugins</groupId> | ||||||
|  |             <artifactId>maven-dependency-plugin</artifactId> | ||||||
|  |             <executions> | ||||||
|  |                 <execution> | ||||||
|  |                     <id>copy-dependencies</id> | ||||||
|  |                     <phase>package</phase> | ||||||
|  |                     <goals> | ||||||
|  |                         <goal>copy-dependencies</goal> | ||||||
|  |                     </goals> | ||||||
|  |                     <configuration> | ||||||
|  |                         <outputDirectory>${project.build.directory}/libraries</outputDirectory> | ||||||
|  |                         <overWriteReleases>false</overWriteReleases> | ||||||
|  |                         <overWriteSnapshots>false</overWriteSnapshots> | ||||||
|  |                         <overWriteIfNewer>true</overWriteIfNewer> | ||||||
|  |                     </configuration> | ||||||
|  |                 </execution> | ||||||
|  |             </executions> | ||||||
|  |         </plugin> | ||||||
|  |          | ||||||
|  |         </plugins> | ||||||
|  |     </build> | ||||||
|  |    | ||||||
|  | </project> | ||||||
| @ -1,127 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
|  |  | ||||||
| <?import com.jfoenix.controls.JFXButton?> |  | ||||||
| <?import com.jfoenix.controls.JFXColorPicker?> |  | ||||||
| <?import com.jfoenix.controls.JFXHamburger?> |  | ||||||
| <?import com.jfoenix.controls.JFXTextField?> |  | ||||||
| <?import com.jfoenix.controls.JFXToggleButton?> |  | ||||||
| <?import com.jfoenix.controls.JFXTreeTableView?> |  | ||||||
| <?import javafx.geometry.Insets?> |  | ||||||
| <?import javafx.scene.control.ChoiceBox?> |  | ||||||
| <?import javafx.scene.control.Label?> |  | ||||||
| <?import javafx.scene.control.ScrollPane?> |  | ||||||
| <?import javafx.scene.image.ImageView?> |  | ||||||
| <?import javafx.scene.layout.AnchorPane?> |  | ||||||
| <?import javafx.scene.layout.HBox?> |  | ||||||
| <?import javafx.scene.layout.VBox?> |  | ||||||
| <?import javafx.scene.text.Font?> |  | ||||||
| <?import javafx.scene.text.TextFlow?> |  | ||||||
|  |  | ||||||
| <AnchorPane fx:id="mainAnchorPane" prefHeight="600.0" prefWidth="904.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController"> |  | ||||||
|    <children> |  | ||||||
|       <ScrollPane fx:id="mainScrollPane" fitToWidth="true" layoutY="38.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0"> |  | ||||||
|          <content> |  | ||||||
|             <AnchorPane fx:id="gamesAnchorPane"> |  | ||||||
|                <padding> |  | ||||||
|                   <Insets bottom="17.0" /> |  | ||||||
|                </padding></AnchorPane> |  | ||||||
|          </content> |  | ||||||
|       </ScrollPane> |  | ||||||
|       <HBox fx:id="topHBox" prefHeight="38.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> |  | ||||||
|          <children> |  | ||||||
|             <JFXHamburger fx:id="menuHam" prefHeight="38.0" prefWidth="38.0" stylesheets="@MainWindows.css" /> |  | ||||||
|          </children> |  | ||||||
|       </HBox> |  | ||||||
|       <VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="568.0" prefWidth="175.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="38.0"> |  | ||||||
|          <children> |  | ||||||
|             <JFXButton fx:id="aboutBtn" alignment="TOP_LEFT" maxHeight="38.0" maxWidth="190.0" onAction="#aboutBtnAction" prefHeight="38.0" prefWidth="190.0" text="About" textAlignment="LEFT"> |  | ||||||
|                <font> |  | ||||||
|                   <Font name="System Bold" size="14.0" /> |  | ||||||
|                </font> |  | ||||||
|             </JFXButton> |  | ||||||
|             <JFXButton fx:id="settingsBtn" alignment="TOP_LEFT" maxHeight="38.0" maxWidth="213.0" onAction="#settingsBtnAction" prefHeight="38.0" prefWidth="213.0" text="Settings" textAlignment="LEFT"> |  | ||||||
|                <font> |  | ||||||
|                   <Font name="System Bold" size="14.0" /> |  | ||||||
|                </font> |  | ||||||
|             </JFXButton> |  | ||||||
|             <JFXButton fx:id="addBtn" alignment="TOP_LEFT" maxHeight="38.0" maxWidth="193.0" onAction="#addBtnAction" prefHeight="38.0" prefWidth="193.0" text="Add new Game" textAlignment="LEFT"> |  | ||||||
|                <font> |  | ||||||
|                   <Font name="System Bold" size="14.0" /> |  | ||||||
|                </font> |  | ||||||
|             </JFXButton> |  | ||||||
|             <JFXButton fx:id="reloadRomsBtn" alignment="TOP_LEFT" maxHeight="38.0" maxWidth="199.0" onAction="#reloadRomsBtnAction" prefHeight="38.0" prefWidth="199.0" text="reload roms" textAlignment="LEFT"> |  | ||||||
|                <font> |  | ||||||
|                   <Font name="System Bold" size="14.0" /> |  | ||||||
|                </font> |  | ||||||
|             </JFXButton> |  | ||||||
|             <JFXButton fx:id="smmdbBtn" alignment="TOP_LEFT" onAction="#smmdbBtnAction" prefHeight="38.0" prefWidth="216.0" text="smmdb"> |  | ||||||
|                <font> |  | ||||||
|                   <Font name="System Bold" size="14.0" /> |  | ||||||
|                </font> |  | ||||||
|             </JFXButton> |  | ||||||
|          </children> |  | ||||||
|       </VBox> |  | ||||||
|       <ScrollPane fx:id="settingsScrollPane" style="-fx-background: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="175.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0"> |  | ||||||
|          <content> |  | ||||||
|            		<!-- space between settings sections  35px, between sections elements (label + element) 20px, between label and element 3px(or more) --> |  | ||||||
|             <AnchorPane fx:id="settingsAnchorPane" prefHeight="562.0" prefWidth="511.0" style="-fx-background-color: white;"> |  | ||||||
|                <children> |  | ||||||
|                   <Label fx:id="cemuDirectoryLbl" layoutX="10.0" layoutY="39.0" text="Cemu Directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="39.0" /> |  | ||||||
|                   <JFXTextField fx:id="cemuTextField" layoutX="10.0" layoutY="59.0" maxWidth="305.0" minWidth="305.0" onAction="#cemuTextFieldAction" prefHeight="32.0" prefWidth="305.0" promptText="cemu directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="59.0" /> |  | ||||||
|                   <JFXTextField fx:id="romTextField" layoutX="10.0" layoutY="131.0" maxWidth="305.0" minWidth="305.0" onAction="#romTextFieldAction" prefHeight="32.0" prefWidth="305.0" promptText="rom directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="131.0" /> |  | ||||||
|                   <JFXButton fx:id="romTFBtn" layoutX="329.0" layoutY="131.0" onAction="#romTFBtnAction" prefHeight="32.0" text="choose directory" AnchorPane.leftAnchor="329.0" AnchorPane.topAnchor="131.0" /> |  | ||||||
|                   <JFXButton fx:id="cemuTFBtn" layoutX="329.0" layoutY="59.0" onAction="#cemuTFBtnAction" prefHeight="32.0" text="choose directory" AnchorPane.leftAnchor="329.0" AnchorPane.topAnchor="59.0" /> |  | ||||||
|                   <JFXColorPicker fx:id="colorPicker" layoutX="12.0" layoutY="207.0" onAction="#colorPickerAction" AnchorPane.leftAnchor="12.0" AnchorPane.topAnchor="207.0" /> |  | ||||||
|                   <JFXToggleButton fx:id="fullscreenToggleBtn" layoutX="16.0" layoutY="488.0" onAction="#fullscreenToggleBtnAction" text="start game in fullscreen" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="488.0" /> |  | ||||||
|                   <Label fx:id="romDirectoryLbl" layoutX="10.0" layoutY="111.0" text="Rom Directory" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="111.0" /> |  | ||||||
|                   <Label fx:id="mainColorLbl" layoutX="10.0" layoutY="183.0" text="main Color" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="183.0" /> |  | ||||||
|                   <Label fx:id="cemuSettingsLbl" layoutX="16.0" layoutY="450.0" text="Cemu Settings" AnchorPane.leftAnchor="16.0" AnchorPane.topAnchor="465.0"> |  | ||||||
|                      <font> |  | ||||||
|                         <Font name="System Bold" size="14.0" /> |  | ||||||
|                      </font> |  | ||||||
|                   </Label> |  | ||||||
|                   <Label fx:id="cemu_UISettingsLbl" layoutX="22.0" layoutY="14.0" text="cemu_UI Settings" AnchorPane.leftAnchor="18.0" AnchorPane.topAnchor="14.0"> |  | ||||||
|                      <font> |  | ||||||
|                         <Font name="System Bold" size="14.0" /> |  | ||||||
|                      </font> |  | ||||||
|                   </Label> |  | ||||||
|                   <JFXToggleButton fx:id="cloudSyncToggleBtn" layoutX="10.0" layoutY="247.0" onAction="#cloudSyncToggleBtnAction" text="cloud savegames (Google Drive)" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="247.0" /> |  | ||||||
|                   <Label fx:id="updateLbl" layoutX="10.0" layoutY="315.0" text="Updates" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="315.0" /> |  | ||||||
|                   <JFXButton fx:id="updateBtn" layoutX="14.0" layoutY="335.0" onAction="#updateBtnAction" prefHeight="32.0" text="check now!" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="335.0" /> |  | ||||||
|                   <JFXToggleButton fx:id="autoUpdateToggleBtn" layoutX="10.0" layoutY="372.0" onAction="#autoUpdateToggleBtnAction" text="check for updates on startup" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="372.0" /> |  | ||||||
|                   <ChoiceBox fx:id="branchChoisBox" layoutX="270.0" layoutY="339.0" prefWidth="150.0" AnchorPane.leftAnchor="270.0" AnchorPane.topAnchor="339.0" /> |  | ||||||
|                   <Label fx:id="branchLbl" layoutX="204.0" layoutY="337.0" prefHeight="32.0" text="Branch" AnchorPane.leftAnchor="204.0" AnchorPane.topAnchor="335.0" /> |  | ||||||
|                </children> |  | ||||||
|             </AnchorPane> |  | ||||||
|          </content> |  | ||||||
|       </ScrollPane> |  | ||||||
|       <AnchorPane fx:id="smmdbAnchorPane" style="-fx-background-color: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="175.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0"> |  | ||||||
|          <children> |  | ||||||
|             <JFXTreeTableView fx:id="courseTreeTable" layoutX="14.0" layoutY="14.0" prefHeight="537.0" prefWidth="405.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0" /> |  | ||||||
|             <ImageView fx:id="smmdbImageView" fitHeight="150.0" fitWidth="267.0" layoutX="436.0" layoutY="14.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="436.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0" /> |  | ||||||
|             <ScrollPane fx:id="smmdbScrollPane" layoutX="436.0" layoutY="181.0" prefHeight="290.0" prefWidth="267.0" AnchorPane.bottomAnchor="91.0" AnchorPane.leftAnchor="436.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="181.0"> |  | ||||||
|                <content> |  | ||||||
|                   <TextFlow fx:id="smmdbTextFlow" maxWidth="265.0" prefWidth="265.0" /> |  | ||||||
|                </content> |  | ||||||
|             </ScrollPane> |  | ||||||
|             <JFXButton fx:id="smmdbDownloadBtn" buttonType="RAISED" layoutX="436.0" layoutY="479.0" onAction="#smmdbDownloadBtnAction" prefHeight="38.0" prefWidth="267.0" text="download" AnchorPane.bottomAnchor="45.0" AnchorPane.leftAnchor="436.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="479.0"> |  | ||||||
|                <font> |  | ||||||
|                   <Font name="System Bold" size="14.0" /> |  | ||||||
|                </font> |  | ||||||
|             </JFXButton> |  | ||||||
|             <Label fx:id="helpLabel" layoutX="436.0" layoutY="538.0" prefHeight="17.0" prefWidth="267.0" text="please help me improving this! click me!"> |  | ||||||
|                <font> |  | ||||||
|                   <Font size="14.0" /> |  | ||||||
|                </font> |  | ||||||
|             </Label> |  | ||||||
|          </children></AnchorPane> |  | ||||||
|       <JFXButton fx:id="playBtn" buttonType="RAISED" layoutX="396.0" maxHeight="28.0" minWidth="100.0" onAction="#playBtnAction" ripplerFill="#00aacc" text="play" textAlignment="CENTER" visible="false" AnchorPane.bottomAnchor="12.0"> |  | ||||||
|          <font> |  | ||||||
|             <Font name="System Bold" size="14.0" /> |  | ||||||
|          </font> |  | ||||||
|       </JFXButton> |  | ||||||
|       <JFXButton fx:id="totalPlaytimeBtn" buttonType="RAISED" layoutX="275.5" maxHeight="32.0" minWidth="100.0" onAction="#totalPlaytimeBtnAction" prefHeight="32.0" style="-fx-background-color: #ffffff; -fx-button-type: RAISED; -fx-text-fill: BLACK;" text="0 h     0 min" visible="false" AnchorPane.bottomAnchor="10.0"> |  | ||||||
|       </JFXButton> |  | ||||||
|       <JFXButton fx:id="lastTimePlayedBtn" buttonType="RAISED" layoutX="516.5" maxHeight="32.0" minWidth="100.0" onAction="#lastTimePlayedBtnAction" prefHeight="32.0" style="-fx-background-color: #ffffff; -fx-button-type: RAISED; -fx-text-fill: BLACK;" text="Last played, never" visible="false" AnchorPane.bottomAnchor="10.0" /> |  | ||||||
|    </children> |  | ||||||
| </AnchorPane> |  | ||||||
| @ -1,86 +0,0 @@ | |||||||
| /* |  | ||||||
|  * HAMBURGER CSS |  | ||||||
|  */ |  | ||||||
|   |  | ||||||
| .jfx-hamburgerW StackPane { |  | ||||||
| 	-fx-background-color: white;  |  | ||||||
| 	-fx-background-radius: 5px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .jfx-hamburgerB StackPane { |  | ||||||
| 	-fx-background-color: black; |  | ||||||
| 	-fx-background-radius: 5px; |  | ||||||
| } |  | ||||||
| 							 |  | ||||||
| /* |  | ||||||
|  * TREE TABLE CSS |  | ||||||
|  */ |  | ||||||
|  |  | ||||||
| .tree-table-view { |  | ||||||
| 	-fx-tree-table-color: rgba(0, 168, 204, 0.2); |  | ||||||
|     -fx-tree-table-rippler-color: rgba(0, 168, 204, 0.4); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view:focused .tree-table-row-cell:selected { |  | ||||||
|     -fx-background-color: -fx-tree-table-color; |  | ||||||
|     -fx-table-cell-border-color: -fx-tree-table-color; |  | ||||||
|     -fx-text-fill: BLACK; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view:focused .tree-table-row-cell:selected .tree-table-cell { |  | ||||||
|     -fx-text-fill: BLACK; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .jfx-rippler { |  | ||||||
| 	-jfx-rippler-fill: -fx-tree-table-rippler-color; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-header, |  | ||||||
| .tree-table-view .column-header-background, |  | ||||||
| .tree-table-view .column-header-background .filler { |  | ||||||
|     -fx-background-color: TRANSPARENT; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-header { |  | ||||||
|     -fx-border-width: 0 1 0 1; |  | ||||||
|     -fx-border-color: #F3F3F3; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-header .label { |  | ||||||
|     -fx-text-fill: #949494; |  | ||||||
|     -fx-padding: 16 0 16 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-header .arrow, .tree-table-view .column-header .sort-order-dot { |  | ||||||
|     -fx-background-color: #949494; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-header:last-visible { |  | ||||||
|     -fx-border-width: 0 2 0 1; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-header-background { |  | ||||||
|     -fx-border-width: 0 0.0 1 0; |  | ||||||
|     -fx-border-color: #F3F3F3; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .tree-table-cell { |  | ||||||
|     -fx-border-width: 0 0 0 0; |  | ||||||
|     -fx-padding: 16 0 16 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-overlay { |  | ||||||
|     -fx-background-color: -fx-tree-table-color; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view .column-resize-line, .tree-table-view .column-drag-header { |  | ||||||
|     -fx-background-color: -fx-tree-table-rippler-color; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .tree-table-view:focused { |  | ||||||
|     -fx-background-color: -fx-tree-table-color, -fx-box-border, -fx-control-inner-background; |  | ||||||
|     -fx-background-insets: -1.4, 0, 1; |  | ||||||
|     -fx-background-radius: 1.4, 0, 0; |  | ||||||
|     /*....*/ |  | ||||||
|     -fx-padding: 1; /* 0.083333em; */ |  | ||||||
| } |  | ||||||
| @ -1,20 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
| <Configuration status="INFO"> |  | ||||||
|     <Appenders> |  | ||||||
|          |  | ||||||
|         <Console name="console" target="SYSTEM_OUT"> |  | ||||||
|             <PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss} [%t] %c{1} - %msg%n" /> |  | ||||||
|         </Console> |  | ||||||
|          |  | ||||||
|         <File name="file" fileName="${sys:logFilename}" immediateFlush="true"> |  | ||||||
|             <PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss} [%t] %c{1} - %msg%n" /> |  | ||||||
|         </File> |  | ||||||
|      |  | ||||||
|     </Appenders> |  | ||||||
|     <Loggers> |  | ||||||
|         <Root level="debug" additivity="false"> |  | ||||||
|             <AppenderRef ref="console" /> |  | ||||||
|             <AppenderRef ref="file"/> |  | ||||||
|         </Root> |  | ||||||
|     </Loggers> |  | ||||||
| </Configuration> |  | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package application; | package com.cemu_UI.application; | ||||||
| 	 | 	 | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||||
| @ -33,6 +33,9 @@ import java.util.TimerTask; | |||||||
| 
 | 
 | ||||||
| import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
|  | 
 | ||||||
|  | import com.cemu_UI.controller.CloudController; | ||||||
|  | 
 | ||||||
| import javafx.application.Application; | import javafx.application.Application; | ||||||
| import javafx.beans.value.ChangeListener; | import javafx.beans.value.ChangeListener; | ||||||
| import javafx.beans.value.ObservableValue; | import javafx.beans.value.ObservableValue; | ||||||
| @ -66,16 +69,22 @@ public class Main extends Application { | |||||||
| 	 | 	 | ||||||
| 	@Override | 	@Override | ||||||
| 	public void start(Stage primaryStage) { | 	public void start(Stage primaryStage) { | ||||||
|  | 		try { | ||||||
| 			this.primaryStage = primaryStage; | 			this.primaryStage = primaryStage; | ||||||
| 		cloudController = new CloudController(this); | 			cloudController = new CloudController(mainWindowController); | ||||||
| 			mainWindow(); | 			mainWindow(); | ||||||
| 			initActions(); | 			initActions(); | ||||||
|  | 		} catch (Exception e) { | ||||||
|  | 			LOGGER.error("ooooops",e); | ||||||
|  | 		} | ||||||
|  | 		 | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	private void mainWindow(){ | 	private void mainWindow(){ | ||||||
| 		try { | 		try { | ||||||
| 			FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindow.fxml")); | 			FXMLLoader loader = new FXMLLoader(); | ||||||
| 			pane = loader.load(); | 			loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml")); | ||||||
|  | 			pane = (AnchorPane) loader.load(); | ||||||
| //			primaryStage.setResizable(false); | //			primaryStage.setResizable(false); | ||||||
| 			primaryStage.setTitle("cemu_UI"); | 			primaryStage.setTitle("cemu_UI"); | ||||||
| //			primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/resources/Homeflix_Icon_64x64.png"))); //adds application icon | //			primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/resources/Homeflix_Icon_64x64.png"))); //adds application icon | ||||||
| @ -100,7 +109,7 @@ public class Main extends Application { | |||||||
| 			 | 			 | ||||||
| 			//startup checks | 			//startup checks | ||||||
| 			//check if client_secret.jason is present | 			//check if client_secret.jason is present | ||||||
| 			if (Main.class.getResourceAsStream("/resources/client_secret.json") == null) { | 			if (Main.class.getResourceAsStream("/client_secret.json") == null) { | ||||||
| 				LOGGER.error("client_secret is missing!!!!!"); | 				LOGGER.error("client_secret is missing!!!!!"); | ||||||
| 				 | 				 | ||||||
| 				Alert alert = new Alert(AlertType.ERROR); | 				Alert alert = new Alert(AlertType.ERROR); | ||||||
| @ -160,7 +169,7 @@ public class Main extends Application { | |||||||
| 			mainWindowController.addUIData(); | 			mainWindowController.addUIData(); | ||||||
| 			 | 			 | ||||||
| 			scene = new Scene(pane);	//create new scene, append pane to scene | 			scene = new Scene(pane);	//create new scene, append pane to scene | ||||||
| 			scene.getStylesheets().add(Main.class.getResource("MainWindows.css").toExternalForm()); | 			scene.getStylesheets().add(Main.class.getResource("/css/MainWindows.css").toExternalForm()); | ||||||
| 			primaryStage.setScene(scene);	//append scene to stage | 			primaryStage.setScene(scene);	//append scene to stage | ||||||
| 			primaryStage.show();	//show stage | 			primaryStage.show();	//show stage | ||||||
| 			} catch (IOException e) { | 			} catch (IOException e) { | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package application; | package com.cemu_UI.application; | ||||||
| 
 | 
 | ||||||
| import java.awt.Desktop; | import java.awt.Desktop; | ||||||
| import java.awt.Graphics2D; | import java.awt.Graphics2D; | ||||||
| @ -51,8 +51,18 @@ import org.apache.commons.io.FileUtils; | |||||||
| import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
| 
 | 
 | ||||||
|  | import com.cemu_UI.controller.SmmdbApiQuery; | ||||||
|  | import com.cemu_UI.controller.UpdateController; | ||||||
|  | import com.cemu_UI.controller.dbController; | ||||||
|  | import com.cemu_UI.datatypes.CourseTableDataType; | ||||||
|  | import com.cemu_UI.datatypes.SmmdbApiDataType; | ||||||
|  | import com.cemu_UI.datatypes.UIROMDataType; | ||||||
|  | import com.cemu_UI.uiElements.JFXInfoDialog; | ||||||
|  | import com.cemu_UI.uiElements.JFXOkayCancelDialog; | ||||||
| import com.jfoenix.controls.JFXButton; | import com.jfoenix.controls.JFXButton; | ||||||
| import com.jfoenix.controls.JFXColorPicker; | import com.jfoenix.controls.JFXColorPicker; | ||||||
|  | import com.jfoenix.controls.JFXDialog; | ||||||
|  | import com.jfoenix.controls.JFXDialogLayout; | ||||||
| import com.jfoenix.controls.JFXHamburger; | import com.jfoenix.controls.JFXHamburger; | ||||||
| import com.jfoenix.controls.JFXTextField; | import com.jfoenix.controls.JFXTextField; | ||||||
| import com.jfoenix.controls.JFXToggleButton; | import com.jfoenix.controls.JFXToggleButton; | ||||||
| @ -60,11 +70,6 @@ import com.jfoenix.controls.JFXTreeTableColumn; | |||||||
| import com.jfoenix.controls.JFXTreeTableView; | import com.jfoenix.controls.JFXTreeTableView; | ||||||
| import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition; | import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition; | ||||||
| 
 | 
 | ||||||
| import UIElements.JFXInfoDialog; |  | ||||||
| import UIElements.JFXOkayCancelDialog; |  | ||||||
| import datatypes.CourseTableDataType; |  | ||||||
| import datatypes.SmmdbApiDataType; |  | ||||||
| import datatypes.UIROMDataType; |  | ||||||
| import javafx.animation.FadeTransition; | import javafx.animation.FadeTransition; | ||||||
| import javafx.animation.ParallelTransition; | import javafx.animation.ParallelTransition; | ||||||
| import javafx.animation.TranslateTransition; | import javafx.animation.TranslateTransition; | ||||||
| @ -96,6 +101,7 @@ import javafx.scene.input.MouseEvent; | |||||||
| import javafx.scene.layout.AnchorPane; | import javafx.scene.layout.AnchorPane; | ||||||
| import javafx.scene.layout.GridPane; | import javafx.scene.layout.GridPane; | ||||||
| import javafx.scene.layout.HBox; | import javafx.scene.layout.HBox; | ||||||
|  | import javafx.scene.layout.StackPane; | ||||||
| import javafx.scene.layout.VBox; | import javafx.scene.layout.VBox; | ||||||
| import javafx.scene.paint.Color; | import javafx.scene.paint.Color; | ||||||
| import javafx.scene.paint.Paint; | import javafx.scene.paint.Paint; | ||||||
| @ -270,7 +276,7 @@ public class MainWindowController { | |||||||
|     private String selectedGameTitle; |     private String selectedGameTitle; | ||||||
|     private String id; |     private String id; | ||||||
|     private String version = "0.2.0"; |     private String version = "0.2.0"; | ||||||
|     private String buildNumber = "047"; |     private String buildNumber = "053"; | ||||||
|     private String versionName = "Puzzle Plank Galaxy"; |     private String versionName = "Puzzle Plank Galaxy"; | ||||||
|     private int xPos = -200; |     private int xPos = -200; | ||||||
|     private int yPos = 17; |     private int yPos = 17; | ||||||
| @ -285,8 +291,8 @@ public class MainWindowController { | |||||||
| 	private File dirLinux = new File(System.getProperty("user.home") + "/cemu_UI"); | 	private File dirLinux = new File(System.getProperty("user.home") + "/cemu_UI"); | ||||||
| 	private File configFileWin = new File(dirWin + "/config.xml"); | 	private File configFileWin = new File(dirWin + "/config.xml"); | ||||||
| 	private File configFileLinux = new File(dirLinux + "/config.xml"); | 	private File configFileLinux = new File(dirLinux + "/config.xml"); | ||||||
| 	File pictureCacheWin = new File(dirWin+"/picture_cache"); | 	private File pictureCacheWin = new File(dirWin+"/picture_cache"); | ||||||
| 	File pictureCacheLinux = new File(dirLinux+"/picture_cache"); | 	private File pictureCacheLinux = new File(dirLinux+"/picture_cache"); | ||||||
| 	private ObservableList<String> branches = FXCollections.observableArrayList("stable", "beta"); | 	private ObservableList<String> branches = FXCollections.observableArrayList("stable", "beta"); | ||||||
| 	private ObservableList<String> smmIDs = FXCollections.observableArrayList("fe31b7f2", "44fc5929");	//TODO add more IDs | 	private ObservableList<String> smmIDs = FXCollections.observableArrayList("fe31b7f2", "44fc5929");	//TODO add more IDs | ||||||
| 	private ObservableList<UIROMDataType> games = FXCollections.observableArrayList(); | 	private ObservableList<UIROMDataType> games = FXCollections.observableArrayList(); | ||||||
| @ -304,17 +310,17 @@ public class MainWindowController { | |||||||
| 	private ContextMenu gameContextMenu = new ContextMenu(edit, remove, update, addDLC); | 	private ContextMenu gameContextMenu = new ContextMenu(edit, remove, update, addDLC); | ||||||
| 	private Label lastGameLabel = new Label(); | 	private Label lastGameLabel = new Label(); | ||||||
| 	 | 	 | ||||||
| 	private ImageView add_circle_black = new ImageView(new Image("resources/icons/ic_add_circle_black_24dp_1x.png")); | 	private ImageView add_circle_black = new ImageView(new Image("icons/ic_add_circle_black_24dp_1x.png")); | ||||||
| 	private ImageView info_black = new ImageView(new Image("resources/icons/ic_info_black_24dp_1x.png")); | 	private ImageView info_black = new ImageView(new Image("icons/ic_info_black_24dp_1x.png")); | ||||||
| 	private ImageView settings_black = new ImageView(new Image("resources/icons/ic_settings_black_24dp_1x.png")); | 	private ImageView settings_black = new ImageView(new Image("icons/ic_settings_black_24dp_1x.png")); | ||||||
| 	private ImageView cached_black = new ImageView(new Image("resources/icons/ic_cached_black_24dp_1x.png"));	 | 	private ImageView cached_black = new ImageView(new Image("icons/ic_cached_black_24dp_1x.png"));	 | ||||||
| 	private ImageView smmdb_black = new ImageView(new Image("resources/icons/ic_get_app_black_24dp_1x.png")); | 	private ImageView smmdb_black = new ImageView(new Image("icons/ic_get_app_black_24dp_1x.png")); | ||||||
| 	private ImageView add_circle_white = new ImageView(new Image("resources/icons/ic_add_circle_white_24dp_1x.png")); | 	private ImageView add_circle_white = new ImageView(new Image("icons/ic_add_circle_white_24dp_1x.png")); | ||||||
| 	private ImageView info_white = new ImageView(new Image("resources/icons/ic_info_white_24dp_1x.png")); | 	private ImageView info_white = new ImageView(new Image("icons/ic_info_white_24dp_1x.png")); | ||||||
| 	private ImageView settings_white = new ImageView(new Image("resources/icons/ic_settings_white_24dp_1x.png")); | 	private ImageView settings_white = new ImageView(new Image("icons/ic_settings_white_24dp_1x.png")); | ||||||
| 	private ImageView cached_white = new ImageView(new Image("resources/icons/ic_cached_white_24dp_1x.png")); | 	private ImageView cached_white = new ImageView(new Image("icons/ic_cached_white_24dp_1x.png")); | ||||||
| 	private ImageView smmdb_white = new ImageView(new Image("resources/icons/ic_get_app_white_24dp_1x.png")); | 	private ImageView smmdb_white = new ImageView(new Image("icons/ic_get_app_white_24dp_1x.png")); | ||||||
| 	private Image close_black = new Image("resources/icons/close_black_2048x2048.png"); | 	private Image close_black = new Image("icons/close_black_2048x2048.png"); | ||||||
|      |      | ||||||
| 	public void setMain(Main main) { | 	public void setMain(Main main) { | ||||||
| 		this.main = main; | 		this.main = main; | ||||||
| @ -1089,18 +1095,37 @@ public class MainWindowController { | |||||||
| 			LOGGER.info("No parameter set!"); | 			LOGGER.info("No parameter set!"); | ||||||
| 			 | 			 | ||||||
| 			//addGame error dialog | 			//addGame error dialog | ||||||
| 			String headingText = "Error while adding a new Game!"; | 			JFXDialogLayout content= new JFXDialogLayout(); | ||||||
| 	    	String bodyText = "There was some truble adding your game." | 	    	content.setHeading(new Text("Error while adding a new Game!")); | ||||||
| 	    					+ "\nOne of the needed values was empty, please try again to add your game.";  | 	    	content.setBody(new Text("There was some truble adding your game." | ||||||
| 	    	JFXInfoDialog addGameErrorDialog = new JFXInfoDialog(headingText, bodyText, dialogBtnStyle, 450, 170, main.pane); | 	    			+ "\nOne of the needed values was empty, please try again to add your game."));  | ||||||
| 	    	addGameErrorDialog.show(); | 	    	content.setPrefSize(450, 170); | ||||||
|  | 	    	StackPane stackPane = new StackPane(); | ||||||
|  | 	    	stackPane.autosize(); | ||||||
|  | 	    	JFXDialog errorDialog =new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true); | ||||||
|  | 	    	JFXButton button=new JFXButton("Okay"); | ||||||
|  | 	    	button.setOnAction(new EventHandler<ActionEvent>(){ | ||||||
|  | 	    	    @Override | ||||||
|  | 	    	    public void handle(ActionEvent event){ | ||||||
|  | 	    	    	errorDialog.close(); | ||||||
|  | 	    	    } | ||||||
|  | 	    	}); | ||||||
|  | 	    	button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED); | ||||||
|  | 	    	button.setPrefHeight(32); | ||||||
|  | 	    	button.setStyle(dialogBtnStyle); | ||||||
|  | 	    	content.setActions(button); | ||||||
|  | 	    	main.pane.getChildren().add(stackPane); | ||||||
|  | 	    	AnchorPane.setTopAnchor(stackPane, (main.pane.getHeight()-content.getPrefHeight())/2); | ||||||
|  | 	    	AnchorPane.setLeftAnchor(stackPane, (main.pane.getWidth()-content.getPrefWidth())/2); | ||||||
|  | 	    	errorDialog.show(); | ||||||
|  | 			 | ||||||
| 		} else { | 		} else { | ||||||
| 			coverName = new File(coverPath).getName(); | 			coverName = new File(coverPath).getName(); | ||||||
| 			try	{ | 			try	{ | ||||||
| 				if (System.getProperty("os.name").equals("Linux")) { | 				if (System.getProperty("os.name").equals("Linux")) { | ||||||
| 					pictureCache = pictureCacheLinux; | 					pictureCache = getPictureCacheLinux(); | ||||||
| 				} else { | 				} else { | ||||||
| 					pictureCache = pictureCacheWin; | 					pictureCache = getPictureCacheWin(); | ||||||
| 				} | 				} | ||||||
| 				 | 				 | ||||||
| 			    BufferedImage originalImage = ImageIO.read(new File(coverPath)); //load cover | 			    BufferedImage originalImage = ImageIO.read(new File(coverPath)); //load cover | ||||||
| @ -1129,7 +1154,7 @@ public class MainWindowController { | |||||||
|      * @param romPath : path to ROM file (.rpx) |      * @param romPath : path to ROM file (.rpx) | ||||||
|      * @param titleID : ROM ID |      * @param titleID : ROM ID | ||||||
|      */ |      */ | ||||||
|     void addGame(String title, String coverPath, String romPath, String titleID){ |     public void addGame(String title, String coverPath, String romPath, String titleID){ | ||||||
|     	VBox VBox = new VBox(); |     	VBox VBox = new VBox(); | ||||||
|     	Label gameTitleLabel = new Label(); |     	Label gameTitleLabel = new Label(); | ||||||
|     	JFXButton gameBtn = new JFXButton(); |     	JFXButton gameBtn = new JFXButton(); | ||||||
| @ -1495,7 +1520,7 @@ public class MainWindowController { | |||||||
| 		} | 		} | ||||||
|     } |     } | ||||||
| 		 | 		 | ||||||
|     void saveSettings(){ |     public void saveSettings(){ | ||||||
|     	LOGGER.info("saving Settings ..."); |     	LOGGER.info("saving Settings ..."); | ||||||
|     	OutputStream outputStream;	//new output-stream |     	OutputStream outputStream;	//new output-stream | ||||||
|     	try { |     	try { | ||||||
| @ -1761,6 +1786,22 @@ public class MainWindowController { | |||||||
| 		this.color = color; | 		this.color = color; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	public File getPictureCacheLinux() { | ||||||
|  | 		return pictureCacheLinux; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public void setPictureCacheLinux(File pictureCacheLinux) { | ||||||
|  | 		this.pictureCacheLinux = pictureCacheLinux; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public File getPictureCacheWin() { | ||||||
|  | 		return pictureCacheWin; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public void setPictureCacheWin(File pictureCacheWin) { | ||||||
|  | 		this.pictureCacheWin = pictureCacheWin; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	public int getxPos() { | 	public int getxPos() { | ||||||
| 		return xPos; | 		return xPos; | ||||||
| 	} | 	} | ||||||
| @ -19,13 +19,15 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package application; | package com.cemu_UI.application; | ||||||
| 
 | 
 | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| 
 | 
 | ||||||
| import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
| 
 | 
 | ||||||
|  | import com.cemu_UI.controller.dbController; | ||||||
|  | 
 | ||||||
| import javafx.application.Platform; | import javafx.application.Platform; | ||||||
| 
 | 
 | ||||||
| public class playGame extends Thread{ | public class playGame extends Thread{ | ||||||
| @ -34,7 +36,7 @@ public class playGame extends Thread{ | |||||||
| 	dbController dbController; | 	dbController dbController; | ||||||
| 	private static final Logger LOGGER = LogManager.getLogger(playGame.class.getName()); | 	private static final Logger LOGGER = LogManager.getLogger(playGame.class.getName()); | ||||||
| 	 | 	 | ||||||
| 	public playGame(MainWindowController m, dbController db){ | 	public playGame(MainWindowController m, com.cemu_UI.controller.dbController db){ | ||||||
| 		mainWindowController = m; | 		mainWindowController = m; | ||||||
| 		dbController = db; | 		dbController = db; | ||||||
| 	} | 	} | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package application; | package com.cemu_UI.controller; | ||||||
| 
 | 
 | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| @ -27,20 +27,22 @@ import java.io.IOException; | |||||||
| import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
| 
 | 
 | ||||||
| import cloudControllerInstances.GoogleDriveController; | import com.cemu_UI.application.MainWindowController; | ||||||
|  | import com.cemu_UI.vendorCloudController.GoogleDriveController; | ||||||
|  | 
 | ||||||
| import javafx.application.Platform; | import javafx.application.Platform; | ||||||
| 
 | 
 | ||||||
| public class CloudController { | public class CloudController { | ||||||
| 
 | 
 | ||||||
| 	public CloudController(Main ma) { | 	public CloudController(MainWindowController mwc) { | ||||||
| 		main = ma; | 		this.mwc = mwc; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	private Main main; | 	private MainWindowController mwc; | ||||||
| 	private GoogleDriveController googleDriveController = new GoogleDriveController(); | 	private GoogleDriveController googleDriveController = new GoogleDriveController(); | ||||||
| 	private static final Logger LOGGER = LogManager.getLogger(CloudController.class.getName()); | 	private static final Logger LOGGER = LogManager.getLogger(CloudController.class.getName()); | ||||||
| 	 | 	 | ||||||
| 	boolean initializeConnection(String cloudService, String cemuDirectory) { | 	public boolean initializeConnection(String cloudService, String cemuDirectory) { | ||||||
| 		boolean success = false; | 		boolean success = false; | ||||||
| 		LOGGER.info("sartting cloud initialisation ..."); | 		LOGGER.info("sartting cloud initialisation ..."); | ||||||
| 		 | 		 | ||||||
| @ -62,23 +64,23 @@ public class CloudController { | |||||||
| 		return success; | 		return success; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	void stratupCheck(String cloudService, String cemuDirectory) { | 	public void stratupCheck(String cloudService, String cemuDirectory) { | ||||||
| 		if(cloudService.equals("GoogleDrive")) { | 		if(cloudService.equals("GoogleDrive")) { | ||||||
| 			LOGGER.info("starting startup check google drive ..."); | 			LOGGER.info("starting startup check google drive ..."); | ||||||
| 			try { | 			try { | ||||||
| 				if (!googleDriveController.checkFolder()) { | 				if (!googleDriveController.checkFolder()) { | ||||||
| 					googleDriveController.creatFolder(); | 					googleDriveController.creatFolder(); | ||||||
| 					main.mainWindowController.saveSettings(); | 					mwc.saveSettings(); | ||||||
| 					 | 					 | ||||||
| 	        		Thread thread = new Thread(new Runnable() { | 	        		Thread thread = new Thread(new Runnable() { | ||||||
| 	        			@Override | 	        			@Override | ||||||
| 						public void run() { | 						public void run() { | ||||||
| 	        				Platform.runLater(() -> { | 	        				Platform.runLater(() -> { | ||||||
| 	    	            		main.mainWindowController.getPlayBtn().setText("syncing..."); | 	    	            		mwc.getPlayBtn().setText("syncing..."); | ||||||
| 	    	                }); | 	    	                }); | ||||||
| 	        				googleDriveController.uploadAllFiles(); | 	        				googleDriveController.uploadAllFiles(); | ||||||
| 	        				Platform.runLater(() -> { | 	        				Platform.runLater(() -> { | ||||||
| 	    	            		main.mainWindowController.getPlayBtn().setText("play"); | 	        				mwc.getPlayBtn().setText("play"); | ||||||
| 	    	                }); | 	    	                }); | ||||||
| 	        			} | 	        			} | ||||||
| 	        		}); | 	        		}); | ||||||
| @ -97,14 +99,14 @@ public class CloudController { | |||||||
| 	 | 	 | ||||||
| 	 | 	 | ||||||
| 	 | 	 | ||||||
| 	void sync(String cloudService, String cemuDirectory) { | 	public void sync(String cloudService, String cemuDirectory) { | ||||||
| 		 | 		 | ||||||
| 		//running sync in a new thread, instead of blocking the main thread | 		//running sync in a new thread, instead of blocking the main thread | ||||||
| 		Thread thread = new Thread(new Runnable() { | 		Thread thread = new Thread(new Runnable() { | ||||||
| 			@Override | 			@Override | ||||||
| 			public void run() { | 			public void run() { | ||||||
|             	Platform.runLater(() -> { |             	Platform.runLater(() -> { | ||||||
|         			main.mainWindowController.getPlayBtn().setText("syncing..."); |         			mwc.getPlayBtn().setText("syncing..."); | ||||||
|                  }); |                  }); | ||||||
|             	LOGGER.info("starting synchronization in new thread ..."); |             	LOGGER.info("starting synchronization in new thread ..."); | ||||||
|             	 |             	 | ||||||
| @ -119,9 +121,9 @@ public class CloudController { | |||||||
|         			 |         			 | ||||||
|         		} |         		} | ||||||
|         		Platform.runLater(() -> { |         		Platform.runLater(() -> { | ||||||
|             		main.mainWindowController.getPlayBtn().setText("play"); |             		mwc.getPlayBtn().setText("play"); | ||||||
|                  }); |                  }); | ||||||
|         		main.mainWindowController.saveSettings(); |         		mwc.saveSettings(); | ||||||
|         		LOGGER.info("synchronization successful!"); |         		LOGGER.info("synchronization successful!"); | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package application; | package com.cemu_UI.controller; | ||||||
| 
 | 
 | ||||||
| import java.io.BufferedReader; | import java.io.BufferedReader; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| @ -30,12 +30,11 @@ import java.util.ArrayList; | |||||||
| import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
| 
 | 
 | ||||||
|  | import com.cemu_UI.datatypes.SmmdbApiDataType; | ||||||
| import com.eclipsesource.json.Json; | import com.eclipsesource.json.Json; | ||||||
| import com.eclipsesource.json.JsonArray; | import com.eclipsesource.json.JsonArray; | ||||||
| import com.eclipsesource.json.JsonValue; | import com.eclipsesource.json.JsonValue; | ||||||
| 
 | 
 | ||||||
| import datatypes.SmmdbApiDataType; |  | ||||||
| 
 |  | ||||||
| public class SmmdbApiQuery { | public class SmmdbApiQuery { | ||||||
| 	 | 	 | ||||||
| 	private String URL = "https://smmdb.ddns.net/api/getcourses?format=json"; | 	private String URL = "https://smmdb.ddns.net/api/getcourses?format=json"; | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package application; | package com.cemu_UI.controller; | ||||||
| 
 | 
 | ||||||
| import java.io.BufferedReader; | import java.io.BufferedReader; | ||||||
| import java.io.File; | import java.io.File; | ||||||
| @ -27,6 +27,7 @@ import java.io.IOException; | |||||||
| import java.io.InputStreamReader; | import java.io.InputStreamReader; | ||||||
| import java.net.HttpURLConnection; | import java.net.HttpURLConnection; | ||||||
| import java.net.URL; | import java.net.URL; | ||||||
|  | 
 | ||||||
| import javax.swing.ProgressMonitor; | import javax.swing.ProgressMonitor; | ||||||
| import javax.swing.ProgressMonitorInputStream; | import javax.swing.ProgressMonitorInputStream; | ||||||
| 
 | 
 | ||||||
| @ -34,6 +35,7 @@ import org.apache.commons.io.FileUtils; | |||||||
| import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.LogManager; | ||||||
| import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.Logger; | ||||||
| 
 | 
 | ||||||
|  | import com.cemu_UI.application.MainWindowController; | ||||||
| import com.eclipsesource.json.Json; | import com.eclipsesource.json.Json; | ||||||
| import com.eclipsesource.json.JsonArray; | import com.eclipsesource.json.JsonArray; | ||||||
| import com.eclipsesource.json.JsonObject; | import com.eclipsesource.json.JsonObject; | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package application; | package com.cemu_UI.controller; | ||||||
| 
 | 
 | ||||||
| import java.awt.Graphics2D; | import java.awt.Graphics2D; | ||||||
| import java.awt.image.BufferedImage; | import java.awt.image.BufferedImage; | ||||||
| @ -45,6 +45,8 @@ import org.apache.logging.log4j.Logger; | |||||||
| import org.w3c.dom.Document; | import org.w3c.dom.Document; | ||||||
| import org.xml.sax.SAXException; | import org.xml.sax.SAXException; | ||||||
| 
 | 
 | ||||||
|  | import com.cemu_UI.application.MainWindowController; | ||||||
|  | 
 | ||||||
| public class dbController { | public class dbController { | ||||||
| 	 | 	 | ||||||
| 	public dbController(MainWindowController m) { | 	public dbController(MainWindowController m) { | ||||||
| @ -134,7 +136,7 @@ public class dbController { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	void addRom(String title, String coverPath, String romPath, String titleID, String productCode, String region, String lastPlayed, String timePlayed) throws SQLException{ | 	public void addRom(String title, String coverPath, String romPath, String titleID, String productCode, String region, String lastPlayed, String timePlayed) throws SQLException{ | ||||||
| 		Statement stmt = connection.createStatement(); | 		Statement stmt = connection.createStatement(); | ||||||
| 		stmt.executeUpdate("insert into local_roms values ('"+title+"','"+coverPath+"','"+romPath+"','"+titleID+"'," | 		stmt.executeUpdate("insert into local_roms values ('"+title+"','"+coverPath+"','"+romPath+"','"+titleID+"'," | ||||||
| 				+ "'"+productCode+"','"+region+"','"+lastPlayed+"','"+timePlayed+"')"); | 				+ "'"+productCode+"','"+region+"','"+lastPlayed+"','"+timePlayed+"')"); | ||||||
| @ -143,7 +145,7 @@ public class dbController { | |||||||
| 		LOGGER.info("added \""+title+"\" to ROM database"); | 		LOGGER.info("added \""+title+"\" to ROM database"); | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	void removeRom(String titleID) throws SQLException{ | 	public void removeRom(String titleID) throws SQLException{ | ||||||
| 		Statement stmt = connection.createStatement(); | 		Statement stmt = connection.createStatement(); | ||||||
| 		stmt.executeUpdate("delete from local_roms where titleID = '"+titleID+"'"); | 		stmt.executeUpdate("delete from local_roms where titleID = '"+titleID+"'"); | ||||||
| 		connection.commit(); | 		connection.commit(); | ||||||
| @ -168,7 +170,7 @@ public class dbController { | |||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	//load one single ROM after manual adding into the mainWindowController | 	//load one single ROM after manual adding into the mainWindowController | ||||||
| 	void loadSingleRom(String titleID){ | 	public void loadSingleRom(String titleID){ | ||||||
| 		LOGGER.info("loading a single ROM (ID: "+titleID+") into the mainWindowController ...");  | 		LOGGER.info("loading a single ROM (ID: "+titleID+") into the mainWindowController ...");  | ||||||
| 		try {  | 		try {  | ||||||
| 			Statement stmt = connection.createStatement();  | 			Statement stmt = connection.createStatement();  | ||||||
| @ -184,7 +186,7 @@ public class dbController { | |||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	//get all files with .rpx TODO add other formats | 	//get all files with .rpx TODO add other formats | ||||||
| 	void loadRomDirectory(String directory){ | 	public void loadRomDirectory(String directory){ | ||||||
| 		File dir = new File(directory); | 		File dir = new File(directory); | ||||||
| 		File appFile; | 		File appFile; | ||||||
| 		String[] extensions = new String[] { "rpx", "jsp" }; | 		String[] extensions = new String[] { "rpx", "jsp" }; | ||||||
| @ -192,9 +194,9 @@ public class dbController { | |||||||
| 		String coverPath; | 		String coverPath; | ||||||
| 		 | 		 | ||||||
| 		if(System.getProperty("os.name").equals("Linux")){ | 		if(System.getProperty("os.name").equals("Linux")){ | ||||||
| 			pictureCache = mainWindowController.pictureCacheLinux; | 			pictureCache = mainWindowController.getPictureCacheLinux(); | ||||||
| 		}else{ | 		}else{ | ||||||
| 			pictureCache = mainWindowController.pictureCacheWin; | 			pictureCache = mainWindowController.getPictureCacheWin(); | ||||||
| 		}  | 		}  | ||||||
| 		 | 		 | ||||||
| 		try { | 		try { | ||||||
| @ -272,7 +274,7 @@ public class dbController { | |||||||
| 	 * @param titleID Title-ID of the Game | 	 * @param titleID Title-ID of the Game | ||||||
| 	 * @return title, coverPath, romPath, titleID (in this order) | 	 * @return title, coverPath, romPath, titleID (in this order) | ||||||
| 	 */ | 	 */ | ||||||
| 	String[] getGameInfo(String titleID){ | 	public String[] getGameInfo(String titleID){ | ||||||
| 		String[] gameInfo = new String[4]; | 		String[] gameInfo = new String[4]; | ||||||
| 		LOGGER.info("getting game info for titleID: "+titleID+" ...");  | 		LOGGER.info("getting game info for titleID: "+titleID+" ...");  | ||||||
| 		try {  | 		try {  | ||||||
| @ -292,7 +294,7 @@ public class dbController { | |||||||
| 		return gameInfo; | 		return gameInfo; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	void setGameInfo(String title, String titleID, String romPath, String coverPath){ | 	public void setGameInfo(String title, String titleID, String romPath, String coverPath){ | ||||||
| 		LOGGER.info("setting game info for titleID: "+titleID+" ...");  | 		LOGGER.info("setting game info for titleID: "+titleID+" ...");  | ||||||
| 		try {  | 		try {  | ||||||
| 			Statement stmt = connection.createStatement();  | 			Statement stmt = connection.createStatement();  | ||||||
| @ -305,7 +307,7 @@ public class dbController { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	void setLastPlayed(String titleID){ | 	public void setLastPlayed(String titleID){ | ||||||
| 		try{ | 		try{ | ||||||
| 			Statement stmt = connection.createStatement();  | 			Statement stmt = connection.createStatement();  | ||||||
| 			stmt.executeUpdate("UPDATE local_roms SET lastPlayed=date('now') WHERE titleID = '"+titleID+"';"); | 			stmt.executeUpdate("UPDATE local_roms SET lastPlayed=date('now') WHERE titleID = '"+titleID+"';"); | ||||||
| @ -316,7 +318,7 @@ public class dbController { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	String getLastPlayed(String titleID){ | 	public String getLastPlayed(String titleID){ | ||||||
| 		String lastPlayed = null; | 		String lastPlayed = null; | ||||||
| 		try{ | 		try{ | ||||||
| 			Statement stmt = connection.createStatement();  | 			Statement stmt = connection.createStatement();  | ||||||
| @ -330,7 +332,7 @@ public class dbController { | |||||||
| 		return lastPlayed; | 		return lastPlayed; | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	void setTotalPlaytime(String timePlayed, String titleID){ | 	public void setTotalPlaytime(String timePlayed, String titleID){ | ||||||
| 		try{ | 		try{ | ||||||
| 			Statement stmt = connection.createStatement();  | 			Statement stmt = connection.createStatement();  | ||||||
| 			stmt.executeUpdate("UPDATE local_roms SET timePlayed='"+timePlayed+"' WHERE titleID = '"+titleID+"';"); | 			stmt.executeUpdate("UPDATE local_roms SET timePlayed='"+timePlayed+"' WHERE titleID = '"+titleID+"';"); | ||||||
| @ -342,7 +344,7 @@ public class dbController { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	String getTotalPlaytime(String titleID){ | 	public String getTotalPlaytime(String titleID){ | ||||||
| 		String timePlayed = null; | 		String timePlayed = null; | ||||||
| 		try{ | 		try{ | ||||||
| 			Statement stmt = connection.createStatement();  | 			Statement stmt = connection.createStatement();  | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package datatypes; | package com.cemu_UI.datatypes; | ||||||
| 
 | 
 | ||||||
| import com.jfoenix.controls.datamodels.treetable.RecursiveTreeObject; | import com.jfoenix.controls.datamodels.treetable.RecursiveTreeObject; | ||||||
| 
 | 
 | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package datatypes; | package com.cemu_UI.datatypes; | ||||||
| 
 | 
 | ||||||
| import javafx.beans.property.IntegerProperty; | import javafx.beans.property.IntegerProperty; | ||||||
| import javafx.beans.property.SimpleIntegerProperty; | import javafx.beans.property.SimpleIntegerProperty; | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package datatypes; | package com.cemu_UI.datatypes; | ||||||
| 
 | 
 | ||||||
| import com.jfoenix.controls.JFXButton; | import com.jfoenix.controls.JFXButton; | ||||||
| 
 | 
 | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package UIElements; | package com.cemu_UI.uiElements; | ||||||
| 
 | 
 | ||||||
| import com.jfoenix.controls.JFXButton; | import com.jfoenix.controls.JFXButton; | ||||||
| import com.jfoenix.controls.JFXDialog; | import com.jfoenix.controls.JFXDialog; | ||||||
| @ -20,7 +20,7 @@ | |||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| package UIElements; | package com.cemu_UI.uiElements; | ||||||
| 
 | 
 | ||||||
| import com.jfoenix.controls.JFXButton; | import com.jfoenix.controls.JFXButton; | ||||||
| import com.jfoenix.controls.JFXDialog; | import com.jfoenix.controls.JFXDialog; | ||||||
| @ -19,7 +19,7 @@ | |||||||
|  * MA 02110-1301, USA. |  * MA 02110-1301, USA. | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| package cloudControllerInstances; | package com.cemu_UI.vendorCloudController; | ||||||
| 
 | 
 | ||||||
| import java.io.FileInputStream; | import java.io.FileInputStream; | ||||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||||
| @ -101,7 +101,7 @@ public class GoogleDriveController { | |||||||
| 	  */ | 	  */ | ||||||
| 	 public Credential authorize() throws IOException { | 	 public Credential authorize() throws IOException { | ||||||
| 		 // Load client secrets. | 		 // Load client secrets. | ||||||
| 	     InputStream in = getClass().getClassLoader().getResourceAsStream("resources/client_secret.json"); | 	     InputStream in = getClass().getClassLoader().getResourceAsStream("client_secret.json"); | ||||||
| 	     GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in)); | 	     GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in)); | ||||||
| 
 | 
 | ||||||
| 		 //FIXME Linux fails to open a new browser window, application crashes, maybe a kde only bug | 		 //FIXME Linux fails to open a new browser window, application crashes, maybe a kde only bug | ||||||
| @ -17,7 +17,7 @@ | |||||||
| <?import javafx.scene.text.Font?> | <?import javafx.scene.text.Font?> | ||||||
| <?import javafx.scene.text.TextFlow?> | <?import javafx.scene.text.TextFlow?> | ||||||
| 
 | 
 | ||||||
| <AnchorPane fx:id="mainAnchorPane" prefHeight="600.0" prefWidth="904.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController"> | <AnchorPane fx:id="mainAnchorPane" prefHeight="600.0" prefWidth="904.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.cemu_UI.application.MainWindowController"> | ||||||
|    <children> |    <children> | ||||||
|       <ScrollPane fx:id="mainScrollPane" fitToWidth="true" layoutY="38.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0"> |       <ScrollPane fx:id="mainScrollPane" fitToWidth="true" layoutY="38.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0"> | ||||||
|          <content> |          <content> | ||||||
| @ -29,7 +29,7 @@ | |||||||
|       </ScrollPane> |       </ScrollPane> | ||||||
|       <HBox fx:id="topHBox" prefHeight="38.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> |       <HBox fx:id="topHBox" prefHeight="38.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | ||||||
|          <children> |          <children> | ||||||
|             <JFXHamburger fx:id="menuHam" prefHeight="38.0" prefWidth="38.0" stylesheets="@MainWindows.css" /> |             <JFXHamburger fx:id="menuHam" prefHeight="38.0" prefWidth="38.0" stylesheets="@../css/MainWindows.css" /> | ||||||
|          </children> |          </children> | ||||||
|       </HBox> |       </HBox> | ||||||
|       <VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="568.0" prefWidth="175.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="38.0"> |       <VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="568.0" prefWidth="175.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="38.0"> | ||||||
| Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB | 
| Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B | 
| Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B | 
| Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B | 
| Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B | 
| Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B | 
| Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 116 B | 
| Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B | 
| Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B | 
| Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B | 
| Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |