Compare commits
4 Commits
0.2.2
...
0e81b6ca24
Author | SHA1 | Date | |
---|---|---|---|
0e81b6ca24 | |||
0e43c28c67 | |||
2265014db3 | |||
100da38493 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
out/
|
||||
conf.ini
|
||||
log/log4j/log.out/
|
||||
reports/
|
||||
|
13
.idea/libraries/org_apache_pdfbox_pdfbox_1_8_9.xml
generated
Normal file
13
.idea/libraries/org_apache_pdfbox_pdfbox_1_8_9.xml
generated
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="org.apache.pdfbox:pdfbox:1.8.9" type="repository">
|
||||
<properties maven-id="org.apache.pdfbox:pdfbox:1.8.9" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/pdfbox/pdfbox/1.8.9/pdfbox-1.8.9.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/pdfbox/fontbox/1.8.9/fontbox-1.8.9.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/pdfbox/jempbox/1.8.9/jempbox-1.8.9.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -10,5 +10,6 @@
|
||||
<orderEntry type="library" name="lib" level="project" />
|
||||
<orderEntry type="library" name="org.ini4j:ini4j:0.5.4" level="project" />
|
||||
<orderEntry type="library" name="log4j:log4j:1.2.17" level="project" />
|
||||
<orderEntry type="library" name="org.apache.pdfbox:pdfbox:1.8.9" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -13,6 +13,9 @@ port = 5432
|
||||
user =
|
||||
pw =
|
||||
|
||||
[report]
|
||||
path = ./reports/
|
||||
|
||||
[hilfe]
|
||||
gitrepo = https://git.dergeorg.at/dergeorg/tourplaner
|
||||
doxygendoc = https://git.dergeorg.at/dergeorg/tourplaner
|
||||
|
@ -34,3 +34,9 @@ logtournotselectedmsg = Bitte wählen Sie zuerst eine Tour aus, bevor sie einen
|
||||
keintextimfeld = Bitte tragen Sie einen Text in das Feld ein!
|
||||
nurzahlen = Bitte geben Sie nur Zahlen an!
|
||||
nurpositivezahlen = Bitte geben Sie nur positive Zahlen an!
|
||||
pause = Pause
|
||||
pausemsg = Dauer der Pause
|
||||
hightmeter = Höhenmeter
|
||||
hightmetermsg = Höhenmeter des Abschnitts
|
||||
bemerkung = Bemerkung
|
||||
bemerkungheader = Bitte geben Sie die Bemerkungen zu diesem Log eintrag ein, kann auch leer bleiben.
|
BIN
lib/iText-4.2.0-com.itextpdf.jar
Normal file
BIN
lib/iText-4.2.0-com.itextpdf.jar
Normal file
Binary file not shown.
@ -1,12 +1,179 @@
|
||||
2021-03-18 22:41:23 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:48:51 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:53:17 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:57:20 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:57:28 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:58:33 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:58:34 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 23:05:00 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 23:11:45 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 23:14:55 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-19 11:56:22 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-19 22:35:19 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-04-15 00:36:26 ERROR FileNotFoundException:33 - D:\FH_OFFLINE\tourplaner\conf.ini (Das System kann die angegebene Datei nicht finden)
|
||||
2021-04-15 00:36:26 ERROR NullPointerException:33 -
|
||||
2021-04-15 00:37:18 ERROR FileNotFoundException:33 - D:\FH_OFFLINE\tourplaner\conf.ini (Das System kann die angegebene Datei nicht finden)
|
||||
2021-04-15 00:37:18 ERROR NullPointerException:33 -
|
||||
2021-04-15 00:38:24 ERROR PSQLException:33 - Der Verbindungsversuch schlug fehl.
|
||||
2021-04-15 00:38:31 ERROR SQLException:33 - No suitable driver found for jdbc:postgresql://http://postgres.dergeorg.at:5432/tourplaner
|
||||
2021-04-15 00:38:38 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 00:38:38 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 00:38:38 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 00:38:38 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 00:38:38 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 00:38:38 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 00:38:38 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 00:38:38 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 00:40:43 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 00:40:43 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 00:40:43 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 00:40:43 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 00:40:43 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 00:40:43 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 00:40:43 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 00:40:43 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 00:44:11 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 00:44:11 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 00:44:11 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 00:44:11 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 00:44:11 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 00:44:11 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 00:44:11 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 00:44:11 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 16:30:08 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 16:30:08 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 16:30:08 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 16:30:08 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 16:30:08 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 16:30:08 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 16:30:08 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 16:30:08 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 16:33:57 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 16:33:57 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 16:33:57 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 16:33:57 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 16:33:57 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 16:33:57 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 16:33:57 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 16:33:57 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 16:38:55 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 16:38:55 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 16:38:55 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 16:38:55 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 16:38:55 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 16:38:55 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 16:38:55 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 16:38:55 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 16:50:23 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 16:50:23 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 16:50:23 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 16:50:23 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 16:50:23 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 16:50:23 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 16:50:23 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 16:50:23 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 16:51:01 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 16:51:01 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 16:51:01 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 16:51:01 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 16:51:01 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 16:51:01 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 16:51:01 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 16:51:01 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:08:17 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:08:17 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:08:17 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:08:17 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:08:17 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:08:17 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:08:17 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:08:17 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:08:21 ERROR FileNotFoundException:33 - .\reports\Tour 1.pdf (Das System kann den angegebenen Pfad nicht finden)
|
||||
2021-04-15 17:21:48 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:21:48 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:21:48 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:21:48 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:21:48 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:21:48 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:21:48 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:21:48 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:21:57 ERROR FileNotFoundException:33 - .\reports\Tour 1.pdf (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird)
|
||||
2021-04-15 17:31:40 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:31:40 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:31:40 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:31:40 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:31:40 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:31:40 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:31:40 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:31:40 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:32:30 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:32:30 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:32:30 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:32:30 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:32:30 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:32:30 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:32:30 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:32:30 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:37:57 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:37:57 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:37:57 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:37:58 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:37:58 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:37:58 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:37:58 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:37:58 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:38:41 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:38:41 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:38:41 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:38:41 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:38:41 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:38:41 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:38:41 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:38:41 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:40:30 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:40:30 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:40:30 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:40:30 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:40:30 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:40:30 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:40:30 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:40:30 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:48:48 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:48:48 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:48:48 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:48:48 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:48:48 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:48:48 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:48:48 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:48:48 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 17:49:14 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 17:49:14 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 17:49:14 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 17:49:14 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 17:49:14 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 17:49:14 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 17:49:14 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 17:49:14 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 18:00:58 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 18:00:58 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 18:00:58 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 18:00:58 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 18:00:58 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 18:00:59 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 18:00:59 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 18:00:59 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 18:09:56 ERROR FileNotFoundException:33 - .\reports\Tour 1.pdf (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird)
|
||||
2021-04-15 18:10:01 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 18:10:01 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 18:10:01 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 18:10:01 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 18:10:01 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 18:10:01 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 18:10:01 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 18:10:01 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 18:10:06 ERROR FileNotFoundException:33 - .\reports\Tour 1.pdf (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird)
|
||||
2021-04-15 18:12:47 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 18:12:47 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 18:12:47 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 18:12:47 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 18:12:47 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 18:12:47 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 18:12:47 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 18:12:47 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
2021-04-15 18:13:38 ERROR FileNotFoundException:33 - .\reports\Tour 1.pdf (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird)
|
||||
2021-04-15 19:20:34 INFO PostgresHelper:15 - Tour Table created
|
||||
2021-04-15 19:20:34 ERROR PSQLException:33 - ERROR: relation "tour" already exists
|
||||
2021-04-15 19:20:34 INFO PostgresHelper:15 - Tour Table unique created
|
||||
2021-04-15 19:20:34 ERROR PSQLException:33 - ERROR: relation "tour_tourname_uindex" already exists
|
||||
2021-04-15 19:20:34 INFO PostgresHelper:15 - Tour Table primary created
|
||||
2021-04-15 19:20:34 ERROR PSQLException:33 - ERROR: multiple primary keys for table "tour" are not allowed
|
||||
2021-04-15 19:20:34 INFO PostgresHelper:15 - Log Table created
|
||||
2021-04-15 19:20:34 ERROR PSQLException:33 - ERROR: relation "log" already exists
|
||||
|
@ -23,7 +23,7 @@ public class Main extends Application {
|
||||
Parent root = FXMLLoader.load(Main.class.getResource("tourplaner.fxml"));
|
||||
primaryStage.setTitle(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "apptitle"));
|
||||
primaryStage.getIcons().add(new Image("file:"+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "logo")));
|
||||
primaryStage.setScene(new Scene(root, 600, 600));
|
||||
primaryStage.setScene(new Scene(root, 1500, 1000));
|
||||
primaryStage.show();
|
||||
}
|
||||
}
|
||||
|
2
src/tourplaner/business/Reporter.java
Normal file
2
src/tourplaner/business/Reporter.java
Normal file
@ -0,0 +1,2 @@
|
||||
package tourplaner.business;public class Reporter {
|
||||
}
|
@ -6,15 +6,60 @@ import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
public class Log {
|
||||
private String id, dauer;
|
||||
private String id, bemerkung;
|
||||
private LocalDate datum;
|
||||
private double strecke;
|
||||
private double strecke, avgspeed, hightmeter, pause, dauer, gegangen;
|
||||
|
||||
public Log(String id, String dauer, LocalDate datum, double strecke) {
|
||||
public Log(String id, double dauer, LocalDate datum, double strecke, String bemerkung, double hightmeter, double pause) {
|
||||
this.id = id;
|
||||
this.dauer = dauer;
|
||||
this.datum = datum;
|
||||
this.strecke = strecke;
|
||||
this.bemerkung = bemerkung;
|
||||
this.hightmeter = hightmeter;
|
||||
this.pause = pause;
|
||||
this.gegangen = this.dauer - this.pause;
|
||||
this.avgspeed = this.strecke / (this.gegangen);
|
||||
}
|
||||
|
||||
public String getBemerkung() {
|
||||
return bemerkung;
|
||||
}
|
||||
|
||||
public void setBemerkung(String bemerkung) {
|
||||
this.bemerkung = bemerkung;
|
||||
}
|
||||
|
||||
public double getAvgspeed() {
|
||||
return avgspeed;
|
||||
}
|
||||
|
||||
public void setAvgspeed(double avgspeed) {
|
||||
this.avgspeed = avgspeed;
|
||||
}
|
||||
|
||||
public double getHightmeter() {
|
||||
return hightmeter;
|
||||
}
|
||||
|
||||
public void setHightmeter(double hightmeter) {
|
||||
this.hightmeter = hightmeter;
|
||||
}
|
||||
|
||||
public double getPause() {
|
||||
return pause;
|
||||
}
|
||||
|
||||
public void setPause(double pause) {
|
||||
this.pause = pause;
|
||||
}
|
||||
|
||||
public double getGegangen() {
|
||||
return gegangen;
|
||||
}
|
||||
|
||||
public void setGegangen(double gegangen) {
|
||||
this.gegangen = gegangen;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
@ -25,11 +70,11 @@ public class Log {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDauer() {
|
||||
public double getDauer() {
|
||||
return dauer;
|
||||
}
|
||||
|
||||
public void setDauer(String dauer) {
|
||||
public void setDauer(double dauer) {
|
||||
this.dauer = dauer;
|
||||
}
|
||||
|
||||
|
@ -32,26 +32,13 @@
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-->
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ListView?>
|
||||
<?import javafx.scene.control.Menu?>
|
||||
<?import javafx.scene.control.MenuBar?>
|
||||
<?import javafx.scene.control.MenuItem?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.control.Tab?>
|
||||
<?import javafx.scene.control.TabPane?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.paint.Color?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.paint.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="tourplaner.ui.TourplanerController">
|
||||
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="tourplaner.ui.TourplanerController">
|
||||
<children>
|
||||
<MenuBar VBox.vgrow="NEVER">
|
||||
<menus>
|
||||
@ -67,6 +54,7 @@
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Optionen">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" onAction="#tourReport" text="Tour Report erstellen" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#nimpButton" text="Keine Funktion" />
|
||||
</items>
|
||||
</Menu>
|
||||
@ -86,6 +74,7 @@
|
||||
<Button fx:id="tourAdd" layoutX="58.0" mnemonicParsing="false" onAction="#addTour" text="+" />
|
||||
<Label layoutX="14.0" layoutY="4.0" text="Tours" />
|
||||
<Button fx:id="tourDel" layoutX="89.0" mnemonicParsing="false" onAction="#delTour" text="-" />
|
||||
<Button layoutX="117.0" mnemonicParsing="false" onAction="#editTourBtn" text="Edit" />
|
||||
</children></AnchorPane>
|
||||
<TextField fx:id="sucheInput" promptText="Suche..." />
|
||||
<Button fx:id="sucheButton" mnemonicParsing="false" onAction="#suche" text="Suchen" />
|
||||
@ -94,7 +83,7 @@
|
||||
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
<SplitPane dividerPositions="0.21492204899777284" focusTraversable="true" prefHeight="522.0" prefWidth="900.0" VBox.vgrow="ALWAYS">
|
||||
<SplitPane dividerPositions="0.060133630289532294" focusTraversable="true" prefHeight="522.0" prefWidth="300.0" VBox.vgrow="ALWAYS">
|
||||
<items>
|
||||
<AnchorPane prefWidth="239.0">
|
||||
<children>
|
||||
@ -131,7 +120,7 @@
|
||||
<content>
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<TableView fx:id="beschreibungTableView" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<TableView fx:id="beschreibungTableView" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="nameCol" maxWidth="1.7976931348623157E308" minWidth="70.0" prefWidth="-1.0" text="Tourname" />
|
||||
<TableColumn fx:id="dauerCol" maxWidth="1.7976931348623157E308" minWidth="40.0" prefWidth="-1.0" text="Dauer" />
|
||||
@ -154,9 +143,9 @@
|
||||
<children>
|
||||
<VBox prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<AnchorPane prefWidth="676.0">
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<HBox id="HBox" alignment="CENTER_LEFT" prefWidth="702.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<HBox id="HBox" alignment="CENTER_LEFT" layoutY="2.0" prefWidth="702.0" spacing="5.0" AnchorPane.bottomAnchor="-2.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="2.0">
|
||||
<children>
|
||||
<Label text="Logs:">
|
||||
<HBox.margin>
|
||||
@ -170,9 +159,10 @@
|
||||
</Button>
|
||||
<Button fx:id="logDel" mnemonicParsing="false" onAction="#delLog" prefWidth="21.0" text="-" textAlignment="CENTER">
|
||||
<HBox.margin>
|
||||
<Insets right="10.0" />
|
||||
<Insets />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onAction="#editLogBtn" text="Edit" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
|
||||
@ -180,13 +170,18 @@
|
||||
</HBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefWidth="200.0">
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<TableView fx:id="logTableView" onMouseClicked="#logItemSelected" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="logDatumCol" prefWidth="238.0" text="Datum" />
|
||||
<TableColumn fx:id="logDauerCol" prefWidth="223.0" text="Dauer" />
|
||||
<TableColumn fx:id="logDatumCol" prefWidth="49.0" text="Datum" />
|
||||
<TableColumn fx:id="logDauerCol" prefWidth="126.0" text="Dauer" />
|
||||
<TableColumn fx:id="logStreckeCol" prefWidth="240.0" text="Entfernung" />
|
||||
<TableColumn fx:id="logAvgCol" prefWidth="75.0" text="AVG Geschwindigkeit" />
|
||||
<TableColumn fx:id="logHightCol" prefWidth="75.0" text="Höhenmeter" />
|
||||
<TableColumn fx:id="logPauseCol" prefWidth="75.0" text="Davon Pause" />
|
||||
<TableColumn fx:id="logGegangenCol" prefWidth="75.0" text="Davon Unterwegs" />
|
||||
<TableColumn fx:id="logBemerkungCol" prefWidth="75.0" text="Bemerkung" />
|
||||
</columns>
|
||||
<columnResizePolicy>
|
||||
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
|
||||
|
@ -1,5 +1,6 @@
|
||||
package tourplaner.ui;
|
||||
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.Label;
|
||||
@ -7,6 +8,7 @@ import javafx.scene.control.TextArea;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.WindowEvent;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
@ -107,24 +109,41 @@ public class AlertHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Texteingabe
|
||||
* Texteingabe die nicht leer sein darf
|
||||
* @param title Title des Dialogs
|
||||
* @param header Header des Dialogs
|
||||
* @param msg Nachricht des Dialogs
|
||||
* @return Null bei keiner eingabe
|
||||
*/
|
||||
public static String inputText(String title, String header, String msg) {
|
||||
String returnStr = "";
|
||||
while (returnStr.isEmpty()) {
|
||||
Optional<String> result = inputHelper(title, header, msg);
|
||||
public static String inputText(String title, String header, String msg, String content){
|
||||
return inputTextNotNull(title, header, msg, content, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Texteingabe
|
||||
* @param title Title des Dialogs
|
||||
* @param header Header des Dialogs
|
||||
* @param msg Nachricht des Dialogs
|
||||
* @param notNull true wenn der input nicht leer sein darf
|
||||
* @return Null bei keiner eingabe
|
||||
*/
|
||||
public static String inputTextNotNull(String title, String header, String msg, String content, boolean notNull) {
|
||||
String returnStr = null;
|
||||
while (returnStr == null) {
|
||||
Optional<String> result = inputHelper(title, header, msg, content);
|
||||
|
||||
AtomicReference<String> returnText = new AtomicReference<>("");
|
||||
if(result.isPresent()) {
|
||||
result.ifPresent(returnText::set);
|
||||
returnStr = returnText.get();
|
||||
if (returnStr.isEmpty()) {
|
||||
if (returnStr.isEmpty() && notNull) {
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("tournametitle"),
|
||||
ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("keintextimfeld"));
|
||||
}
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return returnStr;
|
||||
}
|
||||
@ -136,11 +155,12 @@ public class AlertHelper {
|
||||
* @param msg Nachricht des Dialogs
|
||||
* @return Result des Inputs
|
||||
*/
|
||||
private static Optional<String> inputHelper(String title, String header, String msg){
|
||||
TextInputDialog dialog = new TextInputDialog();
|
||||
private static Optional<String> inputHelper(String title, String header, String msg, String content){
|
||||
TextInputDialog dialog = new TextInputDialog(content);
|
||||
dialog.setTitle(title);
|
||||
dialog.setHeaderText(header);
|
||||
dialog.setContentText(msg);
|
||||
|
||||
Stage stage = (Stage) dialog.getDialogPane().getScene().getWindow();
|
||||
stage.getIcons().add(
|
||||
new Image("file:"+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "logo")));
|
||||
@ -149,48 +169,53 @@ public class AlertHelper {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Positive Nummer eingabe. Wenn Convertierung zu int nicht klappt -> -1
|
||||
* @param title Title des Dialogs
|
||||
* @param header Header des Dialogs
|
||||
* @param msg Nachricht des Dialogs
|
||||
* @return -1 bei error sonst ein Int
|
||||
* @return -1.0 bei error sonst ein double
|
||||
*/
|
||||
public static int inputNumber(String title, String header, String msg) {
|
||||
int returnInt = -2;
|
||||
while (returnInt <= 0 ) {
|
||||
Optional<String> result = inputHelper(title, header, msg);
|
||||
AtomicReference<Integer> returnText = new AtomicReference<Integer>(-1);
|
||||
public static double inputNumber(String title, String header, String msg, String content) {
|
||||
double returnDouble = -2.0;
|
||||
while (returnDouble < -1.0) {
|
||||
Optional<String> result = inputHelper(title, header, msg, content);
|
||||
AtomicReference<Double> returnText = new AtomicReference<Double>(-1.0);
|
||||
result.ifPresent(s -> {
|
||||
try {
|
||||
int resultInt = Integer.parseInt(result.get());
|
||||
returnText.set(resultInt);
|
||||
if (resultInt < 0){
|
||||
double resultDouble = Double.parseDouble(result.get());
|
||||
// int resultInt = Integer.parseInt(result.get());
|
||||
returnText.set(resultDouble);
|
||||
if (resultDouble < 0){
|
||||
AlertHelper.warn(title, ConfigHelper.getLangIniString("achtung"), ConfigHelper.getLangIniString("nurpositivezahlen"));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
AlertHelper.warn(title, ConfigHelper.getLangIniString("achtung"), ConfigHelper.getLangIniString("nurzahlen"));
|
||||
returnText.set(-1);
|
||||
returnText.set(-2.0);
|
||||
}
|
||||
|
||||
});
|
||||
returnInt = returnText.get();
|
||||
returnDouble = returnText.get();
|
||||
}
|
||||
|
||||
return returnInt;
|
||||
return returnDouble;
|
||||
}
|
||||
|
||||
/**
|
||||
* Date Picker Dialog, sobald ein Datum ausgewählt wurde, wird es automatisch bestätigt und der dialog geschlossen
|
||||
* @param title Name des Dialogs
|
||||
* @param content Aktuelles datum
|
||||
* @return Gewähltes datum
|
||||
*/
|
||||
public static LocalDate datePicker(String title){
|
||||
final DatePicker datePicker = new DatePicker(LocalDate.now());
|
||||
public static LocalDate datePicker(LocalDate content){
|
||||
final DatePicker datePicker = new DatePicker(content);
|
||||
final Stage stage = new Stage();
|
||||
stage.getIcons().add(
|
||||
new Image("file:"+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "logo")));
|
||||
AtomicReference<LocalDate> selectedDate = new AtomicReference<>();
|
||||
stage.setOnCloseRequest(ev -> {
|
||||
stage.close();
|
||||
});
|
||||
|
||||
datePicker.setOnAction(event -> {
|
||||
LocalDate date = datePicker.getValue();
|
||||
System.out.println("Selected date: " + date);
|
||||
|
@ -38,8 +38,23 @@ public class TourplanerController implements Initializable {
|
||||
public TextField titleTextView, sucheInput;
|
||||
//Log -> rechts unten
|
||||
public TableView<Log> logTableView;
|
||||
public TableColumn<Log, String> logDauerCol, logStreckeCol, logDatumCol;
|
||||
public TableColumn<Log, String> logDauerCol, logStreckeCol, logDatumCol, logAvgCol, logHightCol, logPauseCol, logGegangenCol, logBemerkungCol;
|
||||
|
||||
@FXML
|
||||
private void tourReport(){
|
||||
this.viewModel.tourReport();
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
private void editTourBtn(){
|
||||
this.viewModel.editTour();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void editLogBtn(){
|
||||
this.viewModel.editLog();
|
||||
}
|
||||
/**
|
||||
* Öffnet github im standart browser
|
||||
*
|
||||
@ -92,6 +107,12 @@ public class TourplanerController implements Initializable {
|
||||
logDauerCol.setCellValueFactory(new PropertyValueFactory<Log, String>("dauer"));
|
||||
logStreckeCol.setCellValueFactory(new PropertyValueFactory<Log, String>("strecke"));
|
||||
logDatumCol.setCellValueFactory(new PropertyValueFactory<Log, String>("datum"));
|
||||
logAvgCol.setCellValueFactory(new PropertyValueFactory<Log, String>("avgspeed"));
|
||||
logHightCol.setCellValueFactory(new PropertyValueFactory<Log, String>("hightmeter"));
|
||||
logPauseCol.setCellValueFactory(new PropertyValueFactory<Log, String>("pause"));
|
||||
logGegangenCol.setCellValueFactory(new PropertyValueFactory<Log, String>("gegangen"));
|
||||
logBemerkungCol.setCellValueFactory(new PropertyValueFactory<Log, String>("bemerkung"));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,8 @@ package tourplaner.viewmodels;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import org.apache.pdfbox.exceptions.COSVisitorException;
|
||||
import tourplaner.business.Reporter;
|
||||
import tourplaner.ui.AlertHelper;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
import tourplaner.business.LogHelper;
|
||||
@ -15,6 +16,7 @@ import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class ViewModel {
|
||||
@ -22,23 +24,275 @@ public class ViewModel {
|
||||
private final ObservableList<Tour> tourData = FXCollections.observableArrayList(new Tour("Test 1", "120", "json dings", 22.3, "Wien", "Graz"),new Tour("Test 2", "210", "json dings", 42.3, "Da", "Dort"));
|
||||
private final ObservableList<String> tourNamen = FXCollections.observableArrayList("Test 1", "Test 2");
|
||||
private Tour selectedTour;
|
||||
private String neueTourName, neueTourStart, neueTourZiel;
|
||||
private String neueTourName, neueTourStart, neueTourZiel, neueBemerkung;
|
||||
//Log
|
||||
private final ObservableList<Log> logData = FXCollections.observableArrayList();
|
||||
private Log selectedLog;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Fügt einen Log eintrag zu einer Tour hinzu.
|
||||
* Ist keine Tour ausgewählt, dann kommt eine Warnung an den User!
|
||||
* Bearbeitet eine bereits bestehende Tour
|
||||
* prüft ob eine tour ausgewählt ist
|
||||
*/
|
||||
@FXML
|
||||
public void addLog(){
|
||||
public void editTour(){
|
||||
if (this.selectedTour == null){
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("keinetourselected"),
|
||||
ConfigHelper.getLangIniString("logtournotselectedmsg"));
|
||||
}else {
|
||||
AtomicInteger index = new AtomicInteger(-1);
|
||||
AtomicInteger aktIndex = new AtomicInteger(-1);
|
||||
this.tourData.forEach(s -> {
|
||||
index.getAndIncrement();
|
||||
if (s.getName().equals(this.selectedTour.getName())) {
|
||||
aktIndex.set(index.intValue());
|
||||
}
|
||||
});
|
||||
if(aktIndex.intValue() != -1){
|
||||
|
||||
if(tourNameInputDuplicatCheck(this.selectedTour.getName(), false)) {
|
||||
if (tourStartInput(this.selectedTour.getStart())) {
|
||||
if (tourZielInput(this.selectedTour.getZiel())) {
|
||||
|
||||
this.tourData.removeIf(tour -> tour.getName().equals(this.selectedTour.getName()));
|
||||
this.tourNamen.removeIf(tour -> tour.equals(this.selectedTour.getName()));
|
||||
this.tourData.add(new Tour(this.neueTourName, "TBD", "TBD", 0, this.neueTourStart, this.neueTourZiel));
|
||||
this.tourNamen.add(this.neueTourName);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.neueTourName = null;
|
||||
this.neueTourStart = null;
|
||||
this.neueTourZiel = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Input mit duplications check des Namens und ohne content im input feld
|
||||
*/
|
||||
private void tourNameInput(){
|
||||
tourNameInputDuplicatCheck("", true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Input des Tour Namen wird so lange durchgeführt, bis er korrekt ist. Das heißt:
|
||||
* er darf nicht schon vorhanden sein und er darf nicht Null sein
|
||||
* @param checkDuplicate Prüft ob name bereits vorhanden ist
|
||||
* @param content inhalt des Input fields
|
||||
* @return false beim schließen des input dialogs
|
||||
*/
|
||||
private boolean tourNameInputDuplicatCheck(String content, boolean checkDuplicate){
|
||||
while(this.neueTourName == null) {
|
||||
this.neueTourName = AlertHelper.inputText(ConfigHelper.getLangIniString("tournametitle"),
|
||||
ConfigHelper.getLangIniString("tournameheader"),
|
||||
ConfigHelper.getLangIniString("tournamemsg"), content);
|
||||
System.out.println(this.neueTourName);
|
||||
if(this.neueTourName.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
if (getTour(this.neueTourName) != null && checkDuplicate) {
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("namevergebenheader"),
|
||||
ConfigHelper.getLangIniString("namevergebenmsg1")
|
||||
+ this.neueTourName +
|
||||
ConfigHelper.getLangIniString("namevergebenmsg2"));
|
||||
this.neueTourName = null;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input der Startpunkt der Tour
|
||||
* Wird erst beendet wenn die eingabe erfolgreich war
|
||||
* @param content inhalt des Input fields
|
||||
* @return false beim schließen des input dialogs
|
||||
*/
|
||||
private boolean tourStartInput(String content){
|
||||
while(this.neueTourStart == null){
|
||||
this.neueTourStart = AlertHelper.inputText(ConfigHelper.getLangIniString("startpunkttitle"),
|
||||
ConfigHelper.getLangIniString("startpunktheader"),
|
||||
ConfigHelper.getLangIniString("startpunktmsg"), content);
|
||||
if(this.neueTourStart.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input des Zielpunktes der Tour
|
||||
* Wird erst beendet wenn die eingabe erfolgreich war
|
||||
* @param content inhalt des Input fields
|
||||
* @return false beim schließen des input dialogs
|
||||
*/
|
||||
private boolean tourZielInput(String content){
|
||||
while(this.neueTourZiel == null){
|
||||
this.neueTourZiel = AlertHelper.inputText(ConfigHelper.getLangIniString("zielpunkttitle"),
|
||||
ConfigHelper.getLangIniString("zielpunktheader"),
|
||||
ConfigHelper.getLangIniString("zielpunktmsg"), content);
|
||||
if(this.neueTourZiel.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fügt eine neue Tour hinzu
|
||||
*/
|
||||
public void addTour(){
|
||||
tourNameInput();
|
||||
tourStartInput("");
|
||||
tourZielInput("");
|
||||
if (getTour(this.neueTourName) == null) {
|
||||
tourData.add(new Tour(this.neueTourName, "TBD", "TBD", 0, this.neueTourStart, this.neueTourZiel));
|
||||
tourNamen.add(this.neueTourName);
|
||||
}
|
||||
this.neueTourStart = null;
|
||||
this.neueTourZiel = null;
|
||||
this.neueTourName = null;
|
||||
}
|
||||
|
||||
private boolean keineTourSelected(){
|
||||
if (this.selectedTour == null){
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("keinetourselected"),
|
||||
ConfigHelper.getLangIniString("logtournotselectedmsg"));
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bearbeitet einen gewählten Log eintrag
|
||||
*/
|
||||
public void editLog(){
|
||||
AtomicReference<Tour> tourAkt = new AtomicReference<>();
|
||||
AtomicReference<Log> logAkt = new AtomicReference<>();
|
||||
this.tourData.forEach(tourd -> {
|
||||
if(tourd.getName().equals(this.selectedTour.getName())) {
|
||||
tourd.getLogs().forEach(log -> {
|
||||
if(this.selectedLog.getId().equals(log.getId())){
|
||||
logAkt.set(log);
|
||||
tourAkt.set(tourd);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
double dauer = dauerInput(this.selectedLog.getDauer());
|
||||
double strecke = -1;
|
||||
double pause = -1.0;
|
||||
double hightmeter = -1.0;
|
||||
boolean bemerkung = false;
|
||||
LocalDate datum = null;
|
||||
if (dauer >= 0) {
|
||||
strecke = streckeInput(this.selectedLog.getStrecke() + "");
|
||||
if (strecke >= 0) {
|
||||
pause = pauseInput("");
|
||||
if(pause >= 0.0) {
|
||||
hightmeter = hightmeterInput("");
|
||||
if (hightmeter >= 0.0) {
|
||||
bemerkung = bemerkungInput("");
|
||||
if (bemerkung) {
|
||||
datum = dateInput(this.selectedLog.getDatum());
|
||||
if (datum != null) {
|
||||
Log newLog = new Log(this.selectedLog.getId(), dauer, datum, strecke, this.neueBemerkung, hightmeter, pause);
|
||||
this.logData.removeIf(ld -> ld.getId().equals(this.selectedLog.getId()));
|
||||
this.logData.add(newLog);
|
||||
tourAkt.get().delLog(this.selectedLog.getId());
|
||||
tourAkt.get().addLog(newLog);
|
||||
this.tourData.removeIf(td -> td.getName().equals(this.selectedTour.getName()));
|
||||
this.tourData.add(tourAkt.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.neueBemerkung = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Eingabe der Strecke bis diese Korrekt ist
|
||||
* @return Korrekte eingegebene Strecke
|
||||
*/
|
||||
private double streckeInput(String content){
|
||||
return AlertHelper.inputNumber(ConfigHelper.getLangIniString("strecke"),
|
||||
ConfigHelper.getLangIniString("streckemsg"),
|
||||
ConfigHelper.getLangIniString("strecke") +
|
||||
ConfigHelper.getLangIniString("doppelpunkt"), content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Eingabe der Dauer bis sie korrekt ist
|
||||
* @param content Wenn der Content -1.0 ist, wird er nicht in das input feld eingeschleust, sonst schon
|
||||
* @return Die eingegebene Dauer
|
||||
*/
|
||||
private double dauerInput(double content){
|
||||
String realcontent = "";
|
||||
if (content != -1){
|
||||
realcontent = content + "";
|
||||
}
|
||||
return AlertHelper.inputNumber(ConfigHelper.getLangIniString("dauer"),
|
||||
ConfigHelper.getLangIniString("dauermsg"),
|
||||
ConfigHelper.getLangIniString("dauer") +
|
||||
ConfigHelper.getLangIniString("doppelpunkt"), realcontent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Datum eingabe bis diese Korrekt ist
|
||||
* @return Das eingegebene korekte Datum
|
||||
*/
|
||||
private LocalDate dateInput(LocalDate date){
|
||||
LocalDate neuesDatum = null;
|
||||
neuesDatum = AlertHelper.datePicker(date);
|
||||
System.out.println(neuesDatum);
|
||||
return neuesDatum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bemerkung input, darf auch leer bleiben
|
||||
* @param content Startwert im Input feld
|
||||
* @return True bei erfolg, wenn es abgebrochen wird ist es false
|
||||
*/
|
||||
private boolean bemerkungInput(String content){
|
||||
this.neueBemerkung = AlertHelper.inputTextNotNull(ConfigHelper.getLangIniString("bemerkung"),
|
||||
ConfigHelper.getLangIniString("bemerkungheader"),
|
||||
ConfigHelper.getLangIniString("bemerkung")+
|
||||
ConfigHelper.getLangIniString("doppelpunkt"), content, false);
|
||||
return !(this.neueBemerkung == null);
|
||||
}
|
||||
|
||||
private double hightmeterInput(String content) {
|
||||
return AlertHelper.inputNumber(ConfigHelper.getLangIniString("hightmeter"),
|
||||
ConfigHelper.getLangIniString("hightmetermsg"),
|
||||
ConfigHelper.getLangIniString("hightmeter") +
|
||||
ConfigHelper.getLangIniString("doppelpunkt"), content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pause eingabe bis diese Korrekt ist
|
||||
* @param content Default value für das Input Feld
|
||||
* @return -1 bei error
|
||||
*/
|
||||
private double pauseInput(String content){
|
||||
return AlertHelper.inputNumber(ConfigHelper.getLangIniString("pause"),
|
||||
ConfigHelper.getLangIniString("pausemsg"),
|
||||
ConfigHelper.getLangIniString("pause") +
|
||||
ConfigHelper.getLangIniString("doppelpunkt"), content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fügt einen Log eintrag zu einer Tour hinzu.
|
||||
* Ist keine Tour ausgewählt, dann kommt eine Warnung an den User!
|
||||
*/
|
||||
public void addLog(){
|
||||
if (!keineTourSelected()){
|
||||
this.tourData.forEach(s -> {
|
||||
if (s.getName().equals(this.selectedTour.getName())) {
|
||||
AtomicReference<String> newId = new AtomicReference<>();
|
||||
@ -48,63 +302,38 @@ public class ViewModel {
|
||||
newId.set(UUID.randomUUID().toString());
|
||||
}
|
||||
});
|
||||
LocalDate neuesDatum = null;
|
||||
while (neuesDatum == null) {
|
||||
neuesDatum = AlertHelper.datePicker(ConfigHelper.getLangIniString("datum"));
|
||||
}
|
||||
double neueDauer = AlertHelper.inputNumber(ConfigHelper.getLangIniString("dauer"),
|
||||
ConfigHelper.getLangIniString("dauermsg"),
|
||||
ConfigHelper.getLangIniString("dauer") +
|
||||
ConfigHelper.getLangIniString("doppelpunkt"));
|
||||
double neueStrecke = AlertHelper.inputNumber(ConfigHelper.getLangIniString("strecke"),
|
||||
ConfigHelper.getLangIniString("streckemsg"),
|
||||
ConfigHelper.getLangIniString("strecke") +
|
||||
ConfigHelper.getLangIniString("doppelpunkt"));
|
||||
|
||||
Log newLog = new Log(newId.get(), neueDauer + "", neuesDatum, neueStrecke);
|
||||
double dauer = dauerInput(-1.0);
|
||||
double strecke, pause, hightmeter;
|
||||
boolean bemerkung = false;
|
||||
LocalDate date = null;
|
||||
if(dauer >= 0) {
|
||||
strecke = streckeInput("");
|
||||
if (strecke >= 0.0) {
|
||||
pause = pauseInput("");
|
||||
if(pause >= 0.0) {
|
||||
hightmeter = hightmeterInput("");
|
||||
if (hightmeter >= 0.0) {
|
||||
bemerkung = bemerkungInput("");
|
||||
if (bemerkung){
|
||||
date = dateInput(LocalDate.now());
|
||||
if (date != null) {
|
||||
Log newLog = new Log(newId.get(), dauer, date, strecke, this.neueBemerkung, hightmeter, pause);
|
||||
this.logData.add(newLog);
|
||||
s.addLog(newLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.neueBemerkung = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fügt eine neue Tour hinzu
|
||||
*/
|
||||
public void addTour(){
|
||||
while(this.neueTourName == null) {
|
||||
this.neueTourName = AlertHelper.inputText(ConfigHelper.getLangIniString("tournametitle"),
|
||||
ConfigHelper.getLangIniString("tournameheader"),
|
||||
ConfigHelper.getLangIniString("tournamemsg"));
|
||||
if (getTour(this.neueTourName) != null) {
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("namevergebenheader"),
|
||||
ConfigHelper.getLangIniString("namevergebenmsg1")
|
||||
+ this.neueTourName +
|
||||
ConfigHelper.getLangIniString("namevergebenmsg2"));
|
||||
this.neueTourName = null;
|
||||
}
|
||||
}
|
||||
while(this.neueTourStart == null){
|
||||
this.neueTourStart = AlertHelper.inputText(ConfigHelper.getLangIniString("startpunkttitle"),
|
||||
ConfigHelper.getLangIniString("startpunktheader"),
|
||||
ConfigHelper.getLangIniString("startpunktmsg"));
|
||||
}
|
||||
while(this.neueTourZiel == null){
|
||||
this.neueTourZiel = AlertHelper.inputText(ConfigHelper.getLangIniString("zielpunkttitle"),
|
||||
ConfigHelper.getLangIniString("zielpunktheader"),
|
||||
ConfigHelper.getLangIniString("zielpunktmsg"));
|
||||
}
|
||||
if (getTour(this.neueTourName) == null) {
|
||||
tourData.add(new Tour(this.neueTourName, "TBD", "TBD", 0, this.neueTourStart, this.neueTourZiel));
|
||||
tourNamen.add(this.neueTourName);
|
||||
}
|
||||
this.neueTourStart = null;
|
||||
this.neueTourZiel = null;
|
||||
this.neueTourName = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Entfernt ein Log anhand des selectierten Logs
|
||||
@ -329,4 +558,24 @@ public class ViewModel {
|
||||
ConfigHelper.getLangIniString("fktnichtimplementiert"),
|
||||
ConfigHelper.getLangIniString("vergessenodernochnichtsoweit"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Startet den Tour Report
|
||||
*/
|
||||
public void tourReport() {
|
||||
if (this.selectedTour == null){
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("keinetourselected"),
|
||||
ConfigHelper.getLangIniString("logtournotselectedmsg"));
|
||||
}else {
|
||||
try {
|
||||
Reporter.createTourReport(this.selectedTour.getName());
|
||||
} catch (IOException e) {
|
||||
LogHelper.error(e.getMessage(), e.getClass().getName());
|
||||
} catch (COSVisitorException e) {
|
||||
LogHelper.error(e.getMessage(), e.getClass().getName());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user