Skip to content

Commit 0863fb2

Browse files
committed
Initial project commit
0 parents  commit 0863fb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1924
-0
lines changed

pom.xml

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>pl.codinglab.treetablecomponent</groupId>
8+
<artifactId>treetablecomponent</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
<maven.compiler.source>1.8</maven.compiler.source>
14+
<maven.compiler.target>1.8</maven.compiler.target>
15+
</properties>
16+
17+
18+
<build>
19+
20+
<resources>
21+
<resource>
22+
<directory>src/main/java</directory>
23+
<includes>
24+
<include>**/*.fxml</include>
25+
</includes>
26+
</resource>
27+
<resource>
28+
<directory>src/main/resources</directory>
29+
</resource>
30+
</resources>
31+
32+
<plugins>
33+
<plugin>
34+
<groupId>com.zenjava</groupId>
35+
<artifactId>javafx-maven-plugin</artifactId>
36+
<version>8.1.2</version>
37+
<configuration>
38+
<mainClass>com.codinglab.App</mainClass>
39+
</configuration>
40+
</plugin>
41+
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-surefire-plugin</artifactId>
45+
<!-- Minimal supported version is 2.4 -->
46+
<version>2.19.1</version>
47+
<dependencies>
48+
<dependency>
49+
<groupId>org.junit.platform</groupId>
50+
<artifactId>junit-platform-surefire-provider</artifactId>
51+
<version>1.0.0-RC2</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.junit.jupiter</groupId>
55+
<artifactId>junit-jupiter-engine</artifactId>
56+
<version>5.0.0-RC2</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.junit.vintage</groupId>
60+
<artifactId>junit-vintage-engine</artifactId>
61+
<version>4.12.0-RC2</version>
62+
</dependency>
63+
</dependencies>
64+
</plugin>
65+
</plugins>
66+
67+
</build>
68+
69+
<dependencies>
70+
<dependency>
71+
<groupId>de.saxsys</groupId>
72+
<artifactId>mvvmfx</artifactId>
73+
<version>1.7.0</version>
74+
</dependency>
75+
<dependency>
76+
<groupId>de.saxsys</groupId>
77+
<artifactId>mvvmfx-cdi</artifactId>
78+
<version>1.7.0</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>javax.enterprise</groupId>
82+
<artifactId>cdi-api</artifactId>
83+
<version>2.0</version>
84+
</dependency>
85+
<dependency>
86+
<groupId>org.jboss.weld.se</groupId>
87+
<artifactId>weld-se-core</artifactId>
88+
<version>3.0.0.Final</version>
89+
</dependency>
90+
<dependency>
91+
<groupId>org.jboss</groupId>
92+
<artifactId>jandex</artifactId>
93+
<version>2.0.3.Final</version>
94+
</dependency>
95+
<dependency>
96+
<groupId>com.cathive.fx</groupId>
97+
<artifactId>fx-guice</artifactId>
98+
<version>8.0.0</version>
99+
</dependency>
100+
<dependency>
101+
<groupId>de.saxsys</groupId>
102+
<artifactId>mvvmfx-easydi</artifactId>
103+
<version>1.7.0</version>
104+
</dependency>
105+
<dependency>
106+
<groupId>de.saxsys</groupId>
107+
<artifactId>mvvmfx-archetype</artifactId>
108+
<version>1.7.0</version>
109+
</dependency>
110+
<dependency>
111+
<groupId>de.saxsys</groupId>
112+
<artifactId>mvvmfx-utils</artifactId>
113+
<version>1.7.0</version>
114+
</dependency>
115+
<dependency>
116+
<groupId>ch.qos.logback</groupId>
117+
<artifactId>logback-classic</artifactId>
118+
<version>1.1.2</version>
119+
</dependency>
120+
<dependency>
121+
<groupId>org.controlsfx</groupId>
122+
<artifactId>controlsfx</artifactId>
123+
<version>8.40.12</version>
124+
</dependency>
125+
<dependency>
126+
<groupId>de.jensd</groupId>
127+
<artifactId>fontawesomefx</artifactId>
128+
<version>8.0.9</version>
129+
</dependency>
130+
<dependency>
131+
<groupId>org.javafxdata</groupId>
132+
<artifactId>datafx-core</artifactId>
133+
<version>8.0b5</version>
134+
</dependency>
135+
<dependency>
136+
<groupId>org.javafxdata</groupId>
137+
<artifactId>datafx-datareader</artifactId>
138+
<version>8.0b5</version>
139+
</dependency>
140+
<dependency>
141+
<groupId>de.saxsys</groupId>
142+
<artifactId>mvvmfx-testing-utils</artifactId>
143+
<scope>test</scope>
144+
<version>1.7.0</version>
145+
</dependency>
146+
<dependency>
147+
<groupId>de.saxsys</groupId>
148+
<artifactId>mvvmfx-validation</artifactId>
149+
<version>1.7.0</version>
150+
</dependency>
151+
152+
<dependency>
153+
<groupId>org.slf4j</groupId>
154+
<artifactId>slf4j-api</artifactId>
155+
<version>1.7.12</version>
156+
</dependency>
157+
<dependency>
158+
<groupId>org.slf4j</groupId>
159+
<artifactId>slf4j-simple</artifactId>
160+
<version>1.7.12</version>
161+
</dependency>
162+
163+
<dependency>
164+
<groupId>net.jodah</groupId>
165+
<artifactId>typetools</artifactId>
166+
<version>0.4.1</version>
167+
</dependency>
168+
169+
<dependency>
170+
<groupId>junit</groupId>
171+
<artifactId>junit</artifactId>
172+
<version>4.12</version>
173+
</dependency>
174+
175+
<dependency>
176+
<groupId>org.assertj</groupId>
177+
<artifactId>assertj-core</artifactId>
178+
<version>3.8.0</version>
179+
<scope>test</scope>
180+
</dependency>
181+
<dependency>
182+
<groupId>commons-io</groupId>
183+
<artifactId>commons-io</artifactId>
184+
<version>2.6</version>
185+
</dependency>
186+
</dependencies>
187+
188+
</project>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package pl.codinglab.treetable;
2+
3+
import de.saxsys.mvvmfx.FluentViewLoader;
4+
import de.saxsys.mvvmfx.MvvmFX;
5+
import de.saxsys.mvvmfx.ViewTuple;
6+
import de.saxsys.mvvmfx.cdi.MvvmfxCdiApplication;
7+
import pl.codinglab.treetable.view.main.MainView;
8+
import pl.codinglab.treetable.view.main.MainViewModel;
9+
import javafx.scene.Scene;
10+
import javafx.stage.Stage;
11+
import org.slf4j.Logger;
12+
import org.slf4j.LoggerFactory;
13+
14+
import javax.inject.Inject;
15+
import java.util.Locale;
16+
import java.util.ResourceBundle;
17+
18+
public class App extends MvvmfxCdiApplication {
19+
20+
private static final Logger LOG = LoggerFactory.getLogger(App.class);
21+
22+
@Inject
23+
private ResourceBundle resourceBundle;
24+
25+
@Override
26+
public void startMvvmfx(Stage stage) throws Exception {
27+
LOG.info("Starting the Application");
28+
MvvmFX.setGlobalResourceBundle(resourceBundle);
29+
stage.setTitle(resourceBundle.getString("window.title"));
30+
ViewTuple<MainView, MainViewModel> main = FluentViewLoader.fxmlView(MainView.class).load();
31+
Scene scene = new Scene(main.getView());
32+
scene.getStylesheets().add("css/styles.css");
33+
stage.setScene(scene);
34+
stage.show();
35+
}
36+
37+
public static void main(String[] args) {
38+
Locale.setDefault(Locale.GERMAN);
39+
launch(args);
40+
}
41+
42+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package pl.codinglab.treetable.config;
2+
3+
import javax.enterprise.inject.Produces;
4+
import javax.inject.Singleton;
5+
import java.util.ResourceBundle;
6+
7+
@Singleton
8+
public class ResourceProvider {
9+
10+
@Produces
11+
private ResourceBundle defaultResourceBundle = ResourceBundle.getBundle("default");
12+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package pl.codinglab.treetable.model;
2+
3+
import java.util.List;
4+
import java.util.Map;
5+
6+
/**
7+
* Model for "Book Publishing Report".
8+
*/
9+
public class BookPublishingReport {
10+
11+
private List<Provider> providers;
12+
private Map<Provider, ReportData> reportDataProProvider;
13+
private EntireData entireData;
14+
15+
public BookPublishingReport(BookPublishingReportBuilder builder) {
16+
this.providers = builder.controlBlocks;
17+
this.reportDataProProvider = builder.reportDataProControlBlock;
18+
this.entireData = builder.entireData;
19+
}
20+
21+
public static class BookPublishingReportBuilder {
22+
private List<Provider> controlBlocks;
23+
private Map<Provider, ReportData> reportDataProControlBlock;
24+
private EntireData entireData;
25+
26+
public BookPublishingReportBuilder controlBlocks(List<Provider> controlBlocks) {
27+
this.controlBlocks = controlBlocks;
28+
return this;
29+
}
30+
31+
public BookPublishingReportBuilder reportDataProControlBlock(Map<Provider, ReportData> reportDataProControlBlock) {
32+
this.reportDataProControlBlock = reportDataProControlBlock;
33+
return this;
34+
}
35+
36+
public BookPublishingReportBuilder entireData(EntireData entireData) {
37+
this.entireData = entireData;
38+
return this;
39+
}
40+
41+
public BookPublishingReport build() {
42+
return new BookPublishingReport(this);
43+
}
44+
}
45+
46+
public List<Provider> getProviders() {
47+
return providers;
48+
}
49+
50+
public Map<Provider, ReportData> getReportDataProProvider() {
51+
return reportDataProProvider;
52+
}
53+
54+
public EntireData getEntireData() {
55+
return entireData;
56+
}
57+
}

0 commit comments

Comments
 (0)