-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '86a4cf4d39abd3cf8ea94a4b62af1b60cc32672e' into stable
- Loading branch information
Showing
258 changed files
with
12,028 additions
and
8,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,106 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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"> | ||
<parent> | ||
<artifactId>mvvmfx-examples</artifactId> | ||
<groupId>de.saxsys</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
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"> | ||
<parent> | ||
<artifactId>mvvmfx-examples</artifactId> | ||
<groupId>de.saxsys</groupId> | ||
<version>1.1.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>mvvmfx-library-example</artifactId> | ||
<artifactId>mvvmfx-library-example</artifactId> | ||
|
||
<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> | ||
<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>de.saxsys</groupId> | ||
<artifactId>mvvmfx</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>eu.lestard</groupId> | ||
<artifactId>easy-di</artifactId> | ||
<version>0.1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.jensd</groupId> | ||
<artifactId>fontawesomefx</artifactId> | ||
<version>8.0.10</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.guigarage</groupId> | ||
<artifactId>flatter</artifactId> | ||
<version>0.7</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>eu.lestard</groupId> | ||
<artifactId>advanced-bindings</artifactId> | ||
<version>0.2.0</version> | ||
</dependency> | ||
<dependencies> | ||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmfx</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>eu.lestard</groupId> | ||
<artifactId>easy-di</artifactId> | ||
<version>0.2.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.jensd</groupId> | ||
<artifactId>fontawesomefx</artifactId> | ||
<version>8.0.13</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.guigarage</groupId> | ||
<artifactId>flatter</artifactId> | ||
<version>0.7</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>eu.lestard</groupId> | ||
<artifactId>advanced-bindings</artifactId> | ||
</dependency> | ||
|
||
<!-- Backend --> | ||
<dependency> | ||
<groupId>com.theoryinpractise</groupId> | ||
<artifactId>halbuilder-json</artifactId> | ||
<version>4.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.theoryinpractise</groupId> | ||
<artifactId>halbuilder-jaxrs</artifactId> | ||
<version>1.1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.resteasy</groupId> | ||
<artifactId>resteasy-client</artifactId> | ||
<version>3.0.9.Final</version> | ||
</dependency> | ||
<!-- Backend --> | ||
<dependency> | ||
<groupId>com.theoryinpractise</groupId> | ||
<artifactId>halbuilder-json</artifactId> | ||
<version>4.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.theoryinpractise</groupId> | ||
<artifactId>halbuilder-jaxrs</artifactId> | ||
<version>1.1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.resteasy</groupId> | ||
<artifactId>resteasy-client</artifactId> | ||
<version>3.0.9.Final</version> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>1.1.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>1.1.2</version> | ||
</dependency> | ||
|
||
|
||
<!-- Testing --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- Testing --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>eu.lestard</groupId> | ||
<artifactId>assertj-javafx</artifactId> | ||
<version>0.2.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>eu.lestard</groupId> | ||
<artifactId>assertj-javafx</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.loadui</groupId> | ||
<artifactId>testFx</artifactId> | ||
<version>3.1.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
|
||
</project> |
93 changes: 53 additions & 40 deletions
93
examples/mvvmfx-books-example/src/main/java/de/saxsys/mvvmfx/examples/books/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,53 @@ | ||
package de.saxsys.mvvmfx.examples.books; | ||
|
||
import com.guigarage.flatterfx.FlatterFX; | ||
import com.guigarage.flatterfx.FlatterInputType; | ||
import de.saxsys.mvvmfx.FluentViewLoader; | ||
import de.saxsys.mvvmfx.MvvmFX; | ||
import de.saxsys.mvvmfx.examples.books.backend.LibraryService; | ||
import de.saxsys.mvvmfx.examples.books.backend.LibraryServiceImpl; | ||
import eu.lestard.easydi.EasyDI; | ||
import javafx.application.Application; | ||
import javafx.scene.Scene; | ||
import javafx.scene.paint.Color; | ||
import javafx.stage.Stage; | ||
|
||
public class App extends Application { | ||
|
||
public static void main(String[] args) { | ||
launch(args); | ||
} | ||
|
||
@Override | ||
public void start(Stage primaryStage) throws Exception { | ||
EasyDI context = new EasyDI(); | ||
context.bindInterface(LibraryService.class, LibraryServiceImpl.class); | ||
MvvmFX.setCustomDependencyInjector(context::getInstance); | ||
|
||
primaryStage.setTitle("Library JavaFX"); | ||
primaryStage.setMinWidth(1200); | ||
primaryStage.setMaxWidth(1200); | ||
primaryStage.setMinHeight(700); | ||
|
||
Scene scene = new Scene(FluentViewLoader.fxmlView(MainView.class).load().getView(), 1200, 700); | ||
|
||
scene.setFill(Color.TRANSPARENT); | ||
primaryStage.setScene(scene); | ||
primaryStage.show(); | ||
FlatterFX.style(FlatterInputType.DEFAULT); | ||
} | ||
} | ||
|
||
package de.saxsys.mvvmfx.examples.books; | ||
|
||
import javafx.application.Application; | ||
import javafx.scene.Scene; | ||
import javafx.scene.paint.Color; | ||
import javafx.stage.Stage; | ||
|
||
import com.guigarage.flatterfx.FlatterFX; | ||
import com.guigarage.flatterfx.FlatterInputType; | ||
|
||
import de.saxsys.mvvmfx.FluentViewLoader; | ||
import de.saxsys.mvvmfx.MvvmFX; | ||
import de.saxsys.mvvmfx.examples.books.backend.LibraryService; | ||
import de.saxsys.mvvmfx.examples.books.backend.LibraryServiceImpl; | ||
import de.saxsys.mvvmfx.examples.books.backend.LibraryServiceMockImpl; | ||
import eu.lestard.easydi.EasyDI; | ||
|
||
public class App extends Application { | ||
|
||
private static final boolean ENABLE_MOCK_SERVICE = true; | ||
|
||
private EasyDI context = new EasyDI(); | ||
|
||
|
||
public static void main(String[] args) { | ||
launch(args); | ||
} | ||
|
||
@Override | ||
public void start(Stage primaryStage) throws Exception { | ||
if (ENABLE_MOCK_SERVICE) { | ||
context.bindInterface(LibraryService.class, LibraryServiceMockImpl.class); | ||
LibraryServiceMockImpl libraryServiceMock = context.getInstance(LibraryServiceMockImpl.class); | ||
libraryServiceMock.addSomeBooks(); | ||
} else { | ||
context.bindInterface(LibraryService.class, LibraryServiceImpl.class); | ||
} | ||
|
||
|
||
MvvmFX.setCustomDependencyInjector(type -> context.getInstance(type)); | ||
|
||
primaryStage.setTitle("Library JavaFX"); | ||
primaryStage.setMinWidth(1200); | ||
primaryStage.setMaxWidth(1200); | ||
primaryStage.setMinHeight(700); | ||
|
||
Scene scene = new Scene(FluentViewLoader.fxmlView(MainView.class).load().getView()); | ||
scene.setFill(Color.TRANSPARENT); | ||
primaryStage.setScene(scene); | ||
primaryStage.show(); | ||
FlatterFX.style(FlatterInputType.DEFAULT); | ||
} | ||
} |
Oops, something went wrong.