Compare commits
134 Commits
Author | SHA1 | Date |
---|---|---|
|
3805e6563d | 3 years ago |
|
ae20909012 | 3 years ago |
|
75a80535a7 | 3 years ago |
|
d8062513e9 | 3 years ago |
|
9f8a7c0f4c | 3 years ago |
|
5488bece2d | 3 years ago |
|
9af3ad26bd | 3 years ago |
|
989281ff8d | 3 years ago |
|
e84e7f9d20 | 3 years ago |
|
c38be08905 | 3 years ago |
|
512b715c1a | 3 years ago |
|
693650fece | 3 years ago |
|
656c22d48a | 3 years ago |
|
2bbbfff532 | 3 years ago |
|
f23e6c77ea | 3 years ago |
|
bb8bcd460a | 3 years ago |
|
4d503546ff | 3 years ago |
|
4ff8b7819f | 3 years ago |
|
7dbe0d46d8 | 3 years ago |
|
ea9e740552 | 3 years ago |
|
fdb39ea2f5 | 3 years ago |
|
46cd28a642 | 3 years ago |
|
3381047e76 | 3 years ago |
|
0786770e97 | 3 years ago |
|
e47f3ea2f7 | 3 years ago |
|
c735583a04 | 3 years ago |
|
5600456556 | 3 years ago |
|
cc05600e0a | 3 years ago |
|
291f183f5e | 3 years ago |
|
a80e077d47 | 3 years ago |
|
3e80354d88 | 3 years ago |
|
d3d22db7a8 | 3 years ago |
|
060527ae03 | 3 years ago |
|
2daeb86d67 | 3 years ago |
|
29c6b30168 | 3 years ago |
|
1d06aaeaa2 | 4 years ago |
|
a677abc15c | 4 years ago |
|
c3a148b267 | 4 years ago |
|
6585908717 | 4 years ago |
|
201109e79d | 4 years ago |
|
f1ccb04f9e | 4 years ago |
|
9f8c19ab8e | 4 years ago |
|
079f15cd59 | 4 years ago |
|
0d9ffb36e5 | 4 years ago |
|
5e89faff49 | 4 years ago |
|
fed25f2fce | 4 years ago |
|
0cf02c52a6 | 4 years ago |
|
b8a67fbc27 | 4 years ago |
|
5a3b647060 | 4 years ago |
|
ffe068e1b0 | 4 years ago |
|
4d31e53a7c | 4 years ago |
|
2e86836041 | 4 years ago |
|
a23b87fcb8 | 4 years ago |
|
a1319382ff | 4 years ago |
|
a491937b30 | 4 years ago |
|
e6ce1dc464 | 4 years ago |
|
abbb272bff | 4 years ago |
|
96bfc461cb | 4 years ago |
|
32fc533c00 | 4 years ago |
|
76bb0fa8b1 | 4 years ago |
|
8f6832c147 | 4 years ago |
|
fe1dc01605 | 4 years ago |
|
814bb00158 | 4 years ago |
|
f68b0c0feb | 4 years ago |
|
d16e724cce | 4 years ago |
|
23ac33ca9b | 4 years ago |
|
67142662d8 | 4 years ago |
|
b603051c59 | 4 years ago |
|
3b188904f6 | 4 years ago |
|
50ae1747e6 | 4 years ago |
|
b1f9a6c505 | 4 years ago |
|
4b1b20f814 | 4 years ago |
|
95d29d772c | 4 years ago |
|
3840e31849 | 4 years ago |
|
031046643c | 4 years ago |
|
1fca1c551d | 4 years ago |
|
036ed8ad11 | 4 years ago |
|
26f26ec9f8 | 4 years ago |
|
e1ec3cae7e | 4 years ago |
|
311577fe7c | 4 years ago |
|
9577508311 | 4 years ago |
|
d7ed7c7b21 | 4 years ago |
|
1e0ab2b943 | 4 years ago |
|
46efa77fce | 4 years ago |
|
402a004ef6 | 4 years ago |
|
48b9c99baa | 4 years ago |
|
74e8783082 | 4 years ago |
|
391ef59f70 | 4 years ago |
|
85a403a834 | 4 years ago |
|
46c1c43cab | 4 years ago |
|
d7e9ce56c1 | 4 years ago |
|
d70ad34df4 | 4 years ago |
|
d609715771 | 4 years ago |
|
53f68c9a69 | 4 years ago |
|
535efd98ee | 4 years ago |
|
9a4eae0be9 | 4 years ago |
|
23e46b7913 | 4 years ago |
|
d3ea1b1956 | 4 years ago |
|
75ad137346 | 4 years ago |
|
7631169d26 | 4 years ago |
|
0c1b21ac05 | 4 years ago |
|
94e32b938a | 4 years ago |
|
913513a237 | 4 years ago |
|
2c1ce23315 | 4 years ago |
|
e3feebcbb4 | 4 years ago |
|
e12da3d116 | 4 years ago |
|
78fa84758d | 4 years ago |
|
96e3d9e3ac | 4 years ago |
|
4b5c9482c8 | 4 years ago |
|
ffa7de49dd | 4 years ago |
|
87b3eae9fb | 4 years ago |
|
ee3ec73a63 | 4 years ago |
|
3afc836df7 | 4 years ago |
|
d6554b9acd | 4 years ago |
|
2c3e9fd5e7 | 4 years ago |
|
0379de6179 | 4 years ago |
|
5e4373d70d | 4 years ago |
|
a918b0b1d8 | 4 years ago |
|
2881c1f9d6 | 4 years ago |
|
2d0d138c08 | 4 years ago |
|
22df604093 | 4 years ago |
|
34371bb2b5 | 4 years ago |
|
8ec7653a5e | 4 years ago |
|
2d5887db4f | 4 years ago |
|
f9a54abf68 | 4 years ago |
|
4be971efee | 4 years ago |
|
1299748bed | 4 years ago |
|
865e732445 | 5 years ago |
|
4ca4f7ad3a | 5 years ago |
|
85d65b6235 | 5 years ago |
|
08048d57ac | 5 years ago |
|
6baa47b852 | 5 years ago |
|
944151d35f | 5 years ago |
|
b331ffd270 | 5 years ago |
61 changed files with 4606 additions and 2390 deletions
@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<classpath> |
||||
<classpathentry kind="src" output="target/classes" path="src/main/java"> |
||||
<attributes> |
||||
<attribute name="optional" value="true"/> |
||||
<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 excluding="**" kind="src" output="target/classes" path="src/main/resources"> |
||||
<attributes> |
||||
<attribute name="maven.pomderived" value="true"/> |
||||
</attributes> |
||||
</classpathentry> |
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> |
||||
<attributes> |
||||
<attribute name="maven.pomderived" value="true"/> |
||||
</attributes> |
||||
</classpathentry> |
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
||||
<classpathentry kind="output" path="target/classes"/> |
||||
</classpath> |
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<projectDescription> |
||||
<name>Project-HomeFlix</name> |
||||
<comment></comment> |
||||
<projects> |
||||
</projects> |
||||
<buildSpec> |
||||
<buildCommand> |
||||
<name>org.eclipse.jdt.core.javabuilder</name> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
<buildCommand> |
||||
<name>org.eclipse.m2e.core.maven2Builder</name> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
</buildSpec> |
||||
<natures> |
||||
<nature>org.eclipse.jdt.core.javanature</nature> |
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature> |
||||
</natures> |
||||
</projectDescription> |
@ -1,5 +0,0 @@
|
||||
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 |
@ -1,5 +0,0 @@
|
||||
eclipse.preferences.version=1 |
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=9 |
||||
org.eclipse.jdt.core.compiler.compliance=9 |
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning |
||||
org.eclipse.jdt.core.compiler.source=9 |
@ -1,4 +0,0 @@
|
||||
activeProfiles= |
||||
eclipse.preferences.version=1 |
||||
resolveWorkspaceProjects=true |
||||
version=1 |
@ -1,24 +1,18 @@
|
||||
 |
||||
[](https://github.com/Seil0/Project-HomeFlix/releases) |
||||
[](https://git.mosad.xyz/Seil0/Project-HomeFlix/releases) |
||||
[](https://www.gnu.org/licenses/gpl-3.0) |
||||
|
||||
# Project-HomeFlix |
||||
Project-HomeFlix is a Kellerkinder Project, that alowes you to sort all your local saved movies in clean UI. Project-HomeFlix is free and open-source software and uses other open-source projects to provied a nice user experience. |
||||
|
||||
## Installation |
||||
Simply download the Project-HomeFlix.jar from [releases](https://github.com/Seil0/Project-HomeFlix/releases), make sure you have the latest version of java 8 oracle jre/jdk installed, open the .jar file. If you need additional information pleas visit our [wiki](https://github.com/Seil0/Project-HomeFlix/wiki). |
||||
Simply download the Project-HomeFlix.jar from [releases](https://git.mosad.xyz/Seil0/Project-HomeFlix/releases), make sure you have the latest version of java 8 oracle jre/jdk installed, open the .jar file. If you need additional information pleas visit our [wiki](https://git.mosad.xyz/Seil0/Project-HomeFlix/wiki). |
||||
|
||||
## Development information |
||||
The dev branch is **only merged** into master when a **new release** is released, so **master contains the latest released version**. Please commit all changes to [dev](https://github.com/Seil0/Project-HomeFlix/tree/dev). |
||||
The dev branch is **only merged** into master when a **new release** is released, so **master contains the latest released version**. Please commit all changes to [dev](https://git.mosad.xyz/Seil0/Project-HomeFlix/src/branch/dev). |
||||
|
||||
Librarys used in this Project: |
||||
JFoenix: https://github.com/jfoenixadmin/JFoenix |
||||
minimal-json: https://github.com/ralfstx/minimal-json |
||||
sqlite-jdbc: https://github.com/xerial/sqlite-jdbc |
||||
apache commons io : https://commons.apache.org/proper/commons-io/ |
||||
[Libraries used in this Project](https://git.mosad.xyz/Seil0/Project-HomeFlix/wiki/Documentation#used-libraries-and-apis) |
||||
|
||||
## screenshots |
||||
 |
||||
## Screenshots |
||||
 |
||||
|
||||
Project-HomeFlix © 2016-2018 Kellerkinder ([Seil0](https://github.com/Seil0), [Windoofs](https://github.com/Windoofs)) |
||||
www.kellerkinder.xyz |
||||
Project-HomeFlix © 2016-2019 mosad www.mosad.xyz, Project by [@Seil0](https://git.mosad.xyz/Seil0) and [@localhorst](https://git.mosad.xyz/localhorst) |
||||
|
@ -1,103 +1,141 @@
|
||||
<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>org.kellerkinder</groupId> |
||||
<artifactId>Project-HomeFlix</artifactId> |
||||
<version>0.6.0</version> |
||||
<packaging>jar</packaging> |
||||
|
||||
<name>Project-HomeFlix</name> |
||||
<url>http://www.kellerkinder.xyz</url> |
||||
|
||||
<properties> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
</properties> |
||||
|
||||
<dependencies> |
||||
|
||||
<dependency> |
||||
<groupId>junit</groupId> |
||||
<artifactId>junit</artifactId> |
||||
<version>4.11</version> |
||||
<scope>test</scope> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>commons-io</groupId> |
||||
<artifactId>commons-io</artifactId> |
||||
<version>2.6</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.jfoenix</groupId> |
||||
<artifactId>jfoenix</artifactId> |
||||
<version>9.0.2</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.eclipsesource.minimal-json</groupId> |
||||
<artifactId>minimal-json</artifactId> |
||||
<version>0.9.5</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.xerial</groupId> |
||||
<artifactId>sqlite-jdbc</artifactId> |
||||
<version>3.21.0.1</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.apache.logging.log4j</groupId> |
||||
<artifactId>log4j-api</artifactId> |
||||
<version>2.10.0</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.apache.logging.log4j</groupId> |
||||
<artifactId>log4j-core</artifactId> |
||||
<version>2.10.0</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<build> |
||||
<plugins> |
||||
|
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-compiler-plugin</artifactId> |
||||
<version>3.7.0</version> |
||||
<configuration> |
||||
<source>9</source> |
||||
<target>9</target> |
||||
<showWarnings>true</showWarnings> |
||||
<showDeprecation>true</showDeprecation> |
||||
</configuration> |
||||
</plugin> |
||||
|
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-shade-plugin</artifactId> |
||||
<version>3.1.0</version> |
||||
<executions> |
||||
<execution> |
||||
<phase>package</phase> |
||||
<goals> |
||||
<goal>shade</goal> |
||||
</goals> |
||||
<configuration> |
||||
<shadedArtifactAttached>true</shadedArtifactAttached> |
||||
<transformers> |
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
||||
<mainClass>kellerkinder.HomeFlix.application.Main</mainClass> |
||||
</transformer> |
||||
</transformers> |
||||
</configuration> |
||||
</execution> |
||||
</executions> |
||||
</plugin> |
||||
|
||||
</plugins> |
||||
</build> |
||||
|
||||
<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>org.kellerkinder</groupId> |
||||
<artifactId>Project-HomeFlix</artifactId> |
||||
<version>0.7.0</version> |
||||
<packaging>jar</packaging> |
||||
|
||||
<name>Project-HomeFlix</name> |
||||
<url>http://www.mosad.xyz</url> |
||||
|
||||
<properties> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
</properties> |
||||
|
||||
<dependencies> |
||||
|
||||
<dependency> |
||||
<groupId>junit</groupId> |
||||
<artifactId>junit</artifactId> |
||||
<version>4.12</version> |
||||
<scope>test</scope> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.openjfx</groupId> |
||||
<artifactId>javafx-controls</artifactId> |
||||
<version>12.0.1</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.openjfx</groupId> |
||||
<artifactId>javafx-fxml</artifactId> |
||||
<version>12.0.1</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.openjfx</groupId> |
||||
<artifactId>javafx-media</artifactId> |
||||
<version>12.0.1</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>commons-io</groupId> |
||||
<artifactId>commons-io</artifactId> |
||||
<version>2.6</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.jfoenix</groupId> |
||||
<artifactId>jfoenix</artifactId> |
||||
<version>9.0.9</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.eclipsesource.minimal-json</groupId> |
||||
<artifactId>minimal-json</artifactId> |
||||
<version>0.9.5</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.xerial</groupId> |
||||
<artifactId>sqlite-jdbc</artifactId> |
||||
<version>3.27.2.1</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.apache.logging.log4j</groupId> |
||||
<artifactId>log4j-api</artifactId> |
||||
<version>2.11.2</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.apache.logging.log4j</groupId> |
||||
<artifactId>log4j-core</artifactId> |
||||
<version>2.11.2</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<build> |
||||
<plugins> |
||||
|
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-compiler-plugin</artifactId> |
||||
<version>3.8.0</version> |
||||
<configuration> |
||||
<source>11</source> |
||||
<target>11</target> |
||||
<!--<release>11</release> --> |
||||
<showWarnings>true</showWarnings> |
||||
<showDeprecation>true</showDeprecation> |
||||
</configuration> |
||||
</plugin> |
||||
|
||||
<plugin> |
||||
<groupId>org.codehaus.mojo</groupId> |
||||
<artifactId>exec-maven-plugin</artifactId> |
||||
<version>1.6.0</version> |
||||
<executions> |
||||
<execution> |
||||
<goals> |
||||
<goal>java</goal> |
||||
</goals> |
||||
</execution> |
||||
</executions> |
||||
<configuration> |
||||
<mainClass>kellerkinder.HomeFlix.application.Main</mainClass> |
||||
</configuration> |
||||
</plugin> |
||||
|
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-shade-plugin</artifactId> |
||||
<version>3.2.1</version> |
||||
<configuration> |
||||
<finalName>Project-HomeFlix</finalName> |
||||
<shadedArtifactAttached>true</shadedArtifactAttached> |
||||
<transformers> |
||||
<transformer |
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
||||
<mainClass>kellerkinder.HomeFlix.application.JavaFX11Main</mainClass> |
||||
</transformer> |
||||
</transformers> |
||||
</configuration> |
||||
<executions> |
||||
<execution> |
||||
<phase>package</phase> |
||||
<goals> |
||||
<goal>shade</goal> |
||||
</goals> |
||||
</execution> |
||||
</executions> |
||||
</plugin> |
||||
|
||||
</plugins> |
||||
</build> |
||||
|
||||
</project> |
||||
|
@ -1,86 +0,0 @@
|
||||
/** |
||||
* cemu_UI |
||||
* |
||||
* Copyright 2017 <@Seil0> |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
||||
* MA 02110-1301, USA. |
||||
*/ |
||||
|
||||
package com.cemu_UI.uiElements; |
||||
|
||||
import com.jfoenix.controls.JFXButton; |
||||
import com.jfoenix.controls.JFXDialog; |
||||
import com.jfoenix.controls.JFXDialogLayout; |
||||
|
||||
import javafx.event.ActionEvent; |
||||
import javafx.event.EventHandler; |
||||
import javafx.scene.layout.AnchorPane; |
||||
import javafx.scene.layout.Pane; |
||||
import javafx.scene.layout.StackPane; |
||||
import javafx.scene.text.Text; |
||||
|
||||
public class JFXInfoDialog { |
||||
|
||||
private String headingText; |
||||
private String bodyText; |
||||
private String dialogBtnStyle; |
||||
private int dialogWidth; |
||||
private int dialogHeight; |
||||
private Pane pane; |
||||
|
||||
/** |
||||
* Creates a new JFoenix Dialog to show some information |
||||
* @param headingText Heading Text, just the heading |
||||
* @param bodyText body Text, all other text belongs here |
||||
* @param dialogBtnStyle Style of the okay button |
||||
* @param dialogWidth dialog width |
||||
* @param dialogHeight dialog height |
||||
* @param pane pane to which the dialog belongs |
||||
*/ |
||||
public JFXInfoDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth, int dialogHeight, Pane pane) { |
||||
this.headingText = headingText; |
||||
this.bodyText = bodyText; |
||||
this.dialogBtnStyle = dialogBtnStyle; |
||||
this.dialogWidth = dialogWidth; |
||||
this.dialogHeight = dialogHeight; |
||||
this.pane = pane; |
||||
} |
||||
|
||||
public void show() { |
||||
JFXDialogLayout content = new JFXDialogLayout(); |
||||
content.setHeading(new Text(headingText)); |
||||
content.setBody(new Text(bodyText)); |
||||
content.setPrefSize(dialogWidth, dialogHeight); |
||||
StackPane stackPane = new StackPane(); |
||||
stackPane.autosize(); |
||||
JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true); |
||||
JFXButton button = new JFXButton("Okay"); |
||||
button.setOnAction(new EventHandler<ActionEvent>() { |
||||
@Override |
||||
public void handle(ActionEvent event) { |
||||
dialog.close(); |
||||
} |
||||
}); |
||||
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED); |
||||
button.setPrefHeight(32); |
||||
button.setStyle(dialogBtnStyle); |
||||
content.setActions(button); |
||||
pane.getChildren().add(stackPane); |
||||
AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2); |
||||
AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2); |
||||
dialog.show(); |
||||
} |
||||
} |
@ -1,142 +0,0 @@
|
||||
/** |
||||
* cemu_UI |
||||
* |
||||
* Copyright 2017 <@Seil0> |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
||||
* MA 02110-1301, USA. |
||||
*/ |
||||
|
||||
|
||||
package com.cemu_UI.uiElements; |
||||
|
||||
import java.util.ResourceBundle; |
||||
|
||||
import com.jfoenix.controls.JFXButton; |
||||
import com.jfoenix.controls.JFXDialog; |
||||
import com.jfoenix.controls.JFXDialogLayout; |
||||
|
||||
import javafx.event.ActionEvent; |
||||
import javafx.event.EventHandler; |
||||
import javafx.scene.layout.AnchorPane; |
||||
import javafx.scene.layout.Pane; |
||||
import javafx.scene.layout.StackPane; |
||||
import javafx.scene.text.Text; |
||||
|
||||
public class JFXOkayCancelDialog { |
||||
|
||||
private String headingText; |
||||
private String bodyText; |
||||
private String dialogBtnStyle; |
||||
private String okayText; |
||||
private String cancelText; |
||||
private int dialogWidth; |
||||
private int dialogHeight; |
||||
private EventHandler<ActionEvent> okayAction; |
||||
private EventHandler<ActionEvent> cancelAction; |
||||
private Pane pane; |
||||
|
||||
/** |
||||
* Creates a new JFoenix Dialog to show some information with okay and cancel option |
||||
* @param headingText Heading Text, just the heading |
||||
* @param bodyText body Text, all other text belongs here |
||||
* @param dialogBtnStyle Style of the okay button |
||||
* @param dialogWidth dialog width |
||||
* @param dialogHeight dialog height |
||||
* @param okayAction action which is performed if the okay button is clicked |
||||
* @param cancelAction action which is performed if the cancel button is clicked |
||||
* @param pane pane to which the dialog belongs |
||||
*/ |
||||
public JFXOkayCancelDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth, |
||||
int dialogHeight, EventHandler<ActionEvent> okayAction, EventHandler<ActionEvent> cancelAction, Pane pane, |
||||
ResourceBundle bundle) { |
||||
this.headingText = headingText; |
||||
this.bodyText = bodyText; |
||||
this.dialogBtnStyle = dialogBtnStyle; |
||||
this.dialogWidth = dialogWidth; |
||||
this.dialogHeight = dialogHeight; |
||||
this.okayAction = okayAction; |
||||
this.cancelAction = cancelAction; |
||||
this.pane = pane; |
||||
okayText = bundle.getString("okayBtnText"); |
||||
cancelText = bundle.getString("cancelBtnText"); |
||||
} |
||||
|
||||
public void show() { |
||||
|
||||
JFXDialogLayout content = new JFXDialogLayout(); |
||||
content.setHeading(new Text(headingText)); |
||||
content.setBody(new Text(bodyText)); |
||||
StackPane stackPane = new StackPane(); |
||||
stackPane.autosize(); |
||||
JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true); |
||||
JFXButton okayBtn = new JFXButton(okayText); |
||||
okayBtn.addEventHandler(ActionEvent.ACTION, (e)-> { |
||||
dialog.close(); |
||||
}); |
||||
okayBtn.addEventHandler(ActionEvent.ACTION, okayAction); |
||||
okayBtn.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED); |
||||
okayBtn.setPrefHeight(32); |
||||
okayBtn.setStyle(dialogBtnStyle); |
||||
JFXButton cancelBtn = new JFXButton(cancelText); |
||||
cancelBtn.addEventHandler(ActionEvent.ACTION, (e)-> { |
||||
dialog.close(); |
||||
}); |
||||
cancelBtn.addEventHandler(ActionEvent.ACTION, cancelAction); |
||||
cancelBtn.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED); |
||||
cancelBtn.setPrefHeight(32); |
||||
cancelBtn.setStyle(dialogBtnStyle); |
||||
content.setActions(cancelBtn, okayBtn); |
||||
content.setPrefSize(dialogWidth, dialogHeight); |
||||
pane.getChildren().add(stackPane); |
||||
AnchorPane.setTopAnchor(stackPane, (pane.getHeight()-content.getPrefHeight())/2); |
||||
AnchorPane.setLeftAnchor(stackPane, (pane.getWidth()-content.getPrefWidth())/2); |
||||
dialog.show(); |
||||
} |
||||
|
||||
public String getOkayText() { |
||||
return okayText; |
||||
} |
||||
|
||||
public void setOkayText(String okayText) { |
||||
this.okayText = okayText; |
||||
} |
||||
|
||||
public String getCancelText() { |
||||
return cancelText; |
||||
} |
||||
|
||||
public void setCancelText(String cancelText) { |
||||
this.cancelText = cancelText; |
||||
} |
||||
|
||||
public EventHandler<ActionEvent> getOkayAction() { |
||||
return okayAction; |
||||
} |
||||
|
||||
public void setOkayAction(EventHandler<ActionEvent> okayAction) { |
||||
this.okayAction = okayAction; |
||||
} |
||||
|
||||
public EventHandler<ActionEvent> getCancelAction() { |
||||
return cancelAction; |
||||
} |
||||
|
||||
public void setCancelAction(EventHandler<ActionEvent> cancelAction) { |
||||
this.cancelAction = cancelAction; |
||||
} |
||||
|
||||
} |
||||
|
@ -1,98 +0,0 @@
|
||||
/** |
||||
* cemu_UI |
||||
* |
||||
* Copyright 2017 <@Seil0> |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
||||
* MA 02110-1301, USA. |
||||
*/ |
||||
|
||||
package com.cemu_UI.uiElements; |
||||
|
||||
import com.jfoenix.controls.JFXButton; |
||||
import com.jfoenix.controls.JFXDialog; |
||||
import com.jfoenix.controls.JFXDialogLayout; |
||||
import com.jfoenix.controls.JFXTextArea; |
||||
|
||||
import javafx.event.ActionEvent; |
||||
import javafx.event.EventHandler; |
||||
import javafx.scene.layout.AnchorPane; |
||||
import javafx.scene.layout.Pane; |
||||
import javafx.scene.layout.StackPane; |
||||
import javafx.scene.text.Text; |
||||
|
||||
public class JFXTextAreaInfoDialog { |
||||
|
||||
private String headingText; |
||||
private String bodyText; |
||||
private String dialogBtnStyle; |
||||
private int dialogWidth; |
||||
private int dialogHeight; |
||||
private JFXTextArea textArea; |
||||
private Pane pane; |
||||
|
||||
/** |
||||
* Creates a new JFoenix Dialog to show some information |
||||
* @param headingText Heading Text, just the heading |
||||
* @param bodyText body Text, all other text belongs here |
||||
* @param dialogBtnStyle Style of the okay button |
||||
* @param dialogWidth dialog width |
||||
* @param dialogHeight dialog height |
||||
* @param pane pane to which the dialog belongs |
||||
*/ |
||||
public JFXTextAreaInfoDialog(String headingText, String bodyText, String dialogBtnStyle, int dialogWidth, int dialogHeight, Pane pane) { |
||||
this.headingText = headingText; |
||||
this.bodyText = bodyText; |
||||
this.dialogBtnStyle = dialogBtnStyle; |
||||
this.dialogWidth = dialogWidth; |
||||
this.dialogHeight = dialogHeight; |
||||
this.pane = pane; |
||||
} |
||||
|
||||
public void show() { |
||||
textArea = new JFXTextArea(bodyText); |
||||
|
||||
JFXDialogLayout content = new JFXDialogLayout(); |
||||
content.setHeading(new Text(headingText)); |
||||
content.setBody(textArea); |
||||
content.setPrefSize(dialogWidth, dialogHeight); |
||||
StackPane stackPane = new StackPane(); |
||||
stackPane.autosize(); |
||||
JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true); |
||||
JFXButton button = new JFXButton("Okay"); |
||||
button.setOnAction(new EventHandler<ActionEvent>() { |
||||
@Override |
||||
public void handle(ActionEvent event) { |
||||
dialog.close(); |
||||
} |
||||
}); |
||||
button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED); |
||||
button.setPrefHeight(32); |
||||
button.setStyle(dialogBtnStyle); |
||||
content.setActions(button); |
||||
pane.getChildren().add(stackPane); |
||||
AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2); |
||||
AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2); |
||||
dialog.show(); |
||||
} |
||||
|
||||
public JFXTextArea getTextArea() { |
||||
return textArea; |
||||
} |
||||
|
||||
public void setTextArea(JFXTextArea textArea) { |
||||
this.textArea = textArea; |
||||
} |
||||
} |
@ -0,0 +1,226 @@
|
||||
/** |
||||
* Project-HomeFlix |
||||
* |
||||
* Copyright 2016-2019 <@Seil0> |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation; either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
||||
* MA 02110-1301, USA. |
||||
* |
||||
*/ |
||||
|
||||
package kellerkinder.HomeFlix.application; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.io.File; |
||||
import java.io.IOException; |
||||
|
||||
import org.apache.logging.log4j.LogManager; |
||||
import org.apache.logging.log4j.Logger; |
||||
|
||||
import com.jfoenix.controls.JFXButton; |
||||
|
||||
import javafx.animation.FadeTransition; |
||||
import javafx.fxml.FXML; |
||||
import javafx.scene.control.Label; |
||||
import javafx.scene.image.Image; |
||||
import javafx.scene.image.ImageView; |
||||
import javafx.scene.layout.AnchorPane; |
||||
import javafx.scene.text.Text; |
||||
import javafx.util.Duration; |
||||
import kellerkinder.HomeFlix.controller.DBController; |
||||
import kellerkinder.HomeFlix.controller.XMLController; |
||||
import kellerkinder.HomeFlix.player.Player; |
||||
|
||||
public class FilmDetailView { |
||||
|
||||
@FXML private AnchorPane filmDVPane; |
||||
|
||||
@FXML private Label lblTitle; |
||||
@FXML private Label lblYear; |
||||
@FXML private Label lblScore; |
||||
|
||||
@FXML private Label lblCrew; |
||||
@FXML private Label lblDirectors; |
||||
@FXML private Label lblDirectorsInfo; |
||||
@FXML private Label lblWriters; |
||||
@FXML private Label lblWritersInfo; |
||||
@FXML private Label lblActors; |
||||
@FXML private Label lblActorsInfo; |
||||
|
||||
@FXML private Label lblInfo; |
||||
@FXML private Label lblRuntimeInfo; |
||||
@FXML private Label lblRuntime; |
||||
@FXML private Label lblLanguageInfo; |
||||
@FXML private Label lblLanguage; |
||||
@FXML private Label lblRevenueInfo; |
||||
@FXML private Label lblRevenue; |
||||
@FXML private Label lblRatingInfo; |
||||
@FXML private Label lblRating; |
||||
|
||||
@FXML private JFXButton btnWishlist; |
||||
@FXML private JFXButton btnFavourite; |
||||
@FXML private JFXButton btnHide; |
||||
@FXML private JFXButton btnPlay; |
||||
@FXML private JFXButton btnDirectory; |
||||
|
||||
@FXML private ImageView wishlistIcon; |
||||
@FXML private ImageView favoriteIcon; |
||||
@FXML private ImageView imgPoster; |
||||
|
||||
@FXML private Text textPlot; |
||||
|
||||
private DBController dbController; |
||||
private static final Logger LOGGER = LogManager.getLogger(FilmDetailView.class.getName()); |
||||
private String currentStreamURL; |
||||
|
||||
public void initialize() { |
||||
dbController = DBController.getInstance(); |
||||
filmDVPane.setStyle("-fx-background-color: rgba(89,89,89,0.9);"); |
||||
} |
||||
|
||||
@FXML |
||||
private void btnWishlistAction() { |
||||
|
||||
} |
||||
|
||||
@FXML |
||||
private void btnFavouriteAction() { |
||||
dbController.toggleFavoriteState(currentStreamURL); |
||||
|
||||
// update the favorite icon
|
||||
if(dbController.getFavoriteState(currentStreamURL) == 1) { |
||||
favoriteIcon.setImage(new Image("icons/baseline_favorite_black_48dp.png")); |
||||
} else { |
||||
favoriteIcon.setImage(new Image("icons/baseline_favorite_border_black_48dp.png")); |
||||
} |
||||
} |
||||
|
||||
@FXML |
||||
private void btnHideAction() { |
||||
hidePane(); |
||||
} |
||||
|
||||
@FXML |
||||
private void btnPlayAction() { |
||||
playFilm(); |
||||
} |
||||
|
||||
@FXML |
||||
private void btnDirectoryAction() { |
||||
File dest = new File(currentStreamURL).getParentFile(); |
||||
|
||||
if (!System.getProperty("os.name").contains("Linux")) { |
||||
try { |
||||
Desktop.getDesktop().open(dest); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* set the cached data of a stream to the FilmDetailView |
||||
* @param streamURL URL of the stream |
||||
*/ |
||||
public void setFilm(String streamURL) { |
||||
currentStreamURL = streamURL; |
||||
String[] cacheInfo = dbController.readCache(streamURL); // get the cache data from the database
|
||||
|
||||
// add the cache data to the GUI
|
||||
lblTitle.setText(cacheInfo[0]); |
||||
lblYear.setText("(" + cacheInfo[1] + ")"); |
||||
lblScore.setText(XMLController.getLocalBundle().getString("score") + ": " + cacheInfo[15] + "%"); |
||||
|
||||
textPlot.setText(cacheInfo[11]); |
||||
|
||||
lblDirectors.setText(cacheInfo[8]); |
||||
lblWriters.setText(cacheInfo[9]); |
||||
lblActors.setText(cacheInfo[10]); |
||||
|
||||
lblRuntime.setText(cacheInfo[6]); |
||||
lblLanguage.setText(cacheInfo[12]); |
||||
lblRevenue.setText(cacheInfo[18]); |
||||
lblRating.setText(cacheInfo[2]); |
||||
|
||||
try { |
||||
if (new File(cacheInfo[20]).isFile()) { |
||||
imgPoster.setImage(new Image(new File(cacheInfo[20]).toURI().toString())); |
||||
} else { |
||||
imgPoster.setImage(new Image(cacheInfo[20])); |
||||
} |
||||
} catch (Exception e) { |
||||
imgPoster.setImage(new Image("icons/Homeflix_Poster.png")); |
||||
LOGGER.error("No Poster found, useing default."); |
||||
} |
||||
|
||||
// set the favorite correct icon
|
||||
if(dbController.getFavoriteState(streamURL) == 1) { |
||||
favoriteIcon.setImage(new Image("icons/baseline_favorite_black_48dp.png")); |
||||
} else { |
||||
favoriteIcon.setImage(new Image("icons/baseline_favorite_border_black_48dp.png")); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* update the text of all static GUI elements of FilmDeatilView |
||||
*/ |
||||
public void updateGUILocal() { |
||||
lblCrew.setText(XMLController.getLocalBundle().getString("crew")); |
||||
lblDirectorsInfo.setText(XMLController.getLocalBundle().getString("directors")); |
||||
lblWritersInfo.setText(XMLController.getLocalBundle().getString("writers")); |
||||
lblActorsInfo.setText(XMLController.getLocalBundle().getString("actors")); |
||||
|
||||
lblInfo.setText(XMLController.getLocalBundle().getString("info")); |
||||
lblRuntimeInfo.setText(XMLController.getLocalBundle().getString("runtime")); |
||||
lblLanguageInfo.setText(XMLController.getLocalBundle().getString("language")); |
||||
lblRevenueInfo.setText(XMLController.getLocalBundle().getString("boxOffice")); |
||||
lblRatingInfo.setText(XMLController.getLocalBundle().getString("rated")); |
||||
} |
||||
|
||||
/** |
||||
* show the FilmDVpane |
||||
*/ |
||||
public void showPane() { |
||||
filmDVPane.setVisible(true); |
||||
FadeTransition fadeIn = new FadeTransition(Duration.millis(300), filmDVPane); |
||||
fadeIn.setFromValue(0.3); |
||||
fadeIn.setToValue(1.0); |
||||
fadeIn.play(); |
||||
} |
||||
|
||||
/** |
||||
* hide the FilmDVpane |
||||
*/ |
||||
private void hidePane() { |
||||
FadeTransition fadeOut = new FadeTransition(Duration.millis(200), filmDVPane); |
||||
fadeOut.setFromValue(1.0); |
||||
fadeOut.setToValue(0.3); |
||||
fadeOut.play(); |
||||
|
||||
filmDVPane.setVisible(false); |
||||
|
||||
MainWindowController.getInstance().disableBlur(); // disable blur
|
||||
} |
||||
|
||||
private void playFilm() { |
||||
if(new File(currentStreamURL).isDirectory()) { |
||||
return; |
||||
} |
||||
|
||||
new Player(currentStreamURL); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
package kellerkinder.HomeFlix.application; |
||||
|
||||
public class JavaFX11Main { |
||||
|
||||
public static void main(String[] args) { |
||||
Main.main(args); |
||||
} |
||||
} |