Compare commits
	
		
			24 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f4e9b16792 | |||
| c261652ce6 | |||
| a0224b9870 | |||
| ae93f365d5 | |||
| 93cb83e33e | |||
| 9fe6f34ba3 | |||
| 3f60d618ff | |||
| 39c4244668 | |||
| 34aa390f2c | |||
| 0e81b6ca24 | |||
| 6cd6798609 | |||
| be2bb0c6fa | |||
| 0e43c28c67 | |||
| 2265014db3 | |||
| 100da38493 | |||
| 0b8f8f996d | |||
| 5d860eed3c | |||
| c31728a92b | |||
| e5c9e8dbf0 | |||
| a2164dc303 | |||
| 1ff4a2cd6c | |||
| c5d51edf57 | |||
| 526c47a643 | |||
| 2360566063 | 
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					out/
 | 
				
			||||||
 | 
					conf.ini
 | 
				
			||||||
 | 
					log/
 | 
				
			||||||
 | 
					reports/
 | 
				
			||||||
 | 
					.idea/dataSources*
 | 
				
			||||||
							
								
								
									
										8
									
								
								.idea/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.idea/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					# Default ignored files
 | 
				
			||||||
 | 
					/shelf/
 | 
				
			||||||
 | 
					/workspace.xml
 | 
				
			||||||
 | 
					# Datasource local storage ignored files
 | 
				
			||||||
 | 
					/../../../../:\FH_OFFLINE\Tourplaner\.idea/dataSources/
 | 
				
			||||||
 | 
					/dataSources.local.xml
 | 
				
			||||||
 | 
					# Editor-based HTTP Client requests
 | 
				
			||||||
 | 
					/httpRequests/
 | 
				
			||||||
							
								
								
									
										10
									
								
								.idea/libraries/com_google_code_gson_gson_2_8_6.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.idea/libraries/com_google_code_gson_gson_2_8_6.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					<component name="libraryTable">
 | 
				
			||||||
 | 
					  <library name="com.google.code.gson:gson:2.8.6" type="repository">
 | 
				
			||||||
 | 
					    <properties maven-id="com.google.code.gson:gson:2.8.6" />
 | 
				
			||||||
 | 
					    <CLASSES>
 | 
				
			||||||
 | 
					      <root url="jar://$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar!/" />
 | 
				
			||||||
 | 
					    </CLASSES>
 | 
				
			||||||
 | 
					    <JAVADOC />
 | 
				
			||||||
 | 
					    <SOURCES />
 | 
				
			||||||
 | 
					  </library>
 | 
				
			||||||
 | 
					</component>
 | 
				
			||||||
							
								
								
									
										9
									
								
								.idea/libraries/iText_4_2_0_com_itextpdf.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.idea/libraries/iText_4_2_0_com_itextpdf.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					<component name="libraryTable">
 | 
				
			||||||
 | 
					  <library name="iText-4.2.0-com.itextpdf">
 | 
				
			||||||
 | 
					    <CLASSES>
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/iText-4.2.0-com.itextpdf.jar!/" />
 | 
				
			||||||
 | 
					    </CLASSES>
 | 
				
			||||||
 | 
					    <JAVADOC />
 | 
				
			||||||
 | 
					    <SOURCES />
 | 
				
			||||||
 | 
					  </library>
 | 
				
			||||||
 | 
					</component>
 | 
				
			||||||
							
								
								
									
										11
									
								
								.idea/libraries/javadoc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								.idea/libraries/javadoc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					<component name="libraryTable">
 | 
				
			||||||
 | 
					  <library name="javadoc">
 | 
				
			||||||
 | 
					    <CLASSES>
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/javadoc/type-search-index.zip!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/javadoc/member-search-index.zip!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/javadoc/package-search-index.zip!/" />
 | 
				
			||||||
 | 
					    </CLASSES>
 | 
				
			||||||
 | 
					    <JAVADOC />
 | 
				
			||||||
 | 
					    <SOURCES />
 | 
				
			||||||
 | 
					  </library>
 | 
				
			||||||
 | 
					</component>
 | 
				
			||||||
							
								
								
									
										17
									
								
								.idea/libraries/lib.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.idea/libraries/lib.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					<component name="libraryTable">
 | 
				
			||||||
 | 
					  <library name="lib">
 | 
				
			||||||
 | 
					    <CLASSES>
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx.fxml.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx.swing.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx-swt.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx.controls.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx.graphics.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx.web.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx.media.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/src.zip!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$PROJECT_DIR$/lib/javafx-sdk-11.0.2/lib/javafx.base.jar!/" />
 | 
				
			||||||
 | 
					    </CLASSES>
 | 
				
			||||||
 | 
					    <JAVADOC />
 | 
				
			||||||
 | 
					    <SOURCES />
 | 
				
			||||||
 | 
					  </library>
 | 
				
			||||||
 | 
					</component>
 | 
				
			||||||
							
								
								
									
										10
									
								
								.idea/libraries/log4j_log4j_1_2_17.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.idea/libraries/log4j_log4j_1_2_17.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					<component name="libraryTable">
 | 
				
			||||||
 | 
					  <library name="log4j:log4j:1.2.17" type="repository">
 | 
				
			||||||
 | 
					    <properties maven-id="log4j:log4j:1.2.17" />
 | 
				
			||||||
 | 
					    <CLASSES>
 | 
				
			||||||
 | 
					      <root url="jar://$MAVEN_REPOSITORY$/log4j/log4j/1.2.17/log4j-1.2.17.jar!/" />
 | 
				
			||||||
 | 
					    </CLASSES>
 | 
				
			||||||
 | 
					    <JAVADOC />
 | 
				
			||||||
 | 
					    <SOURCES />
 | 
				
			||||||
 | 
					  </library>
 | 
				
			||||||
 | 
					</component>
 | 
				
			||||||
							
								
								
									
										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
									
								
								.idea/libraries/org_ini4j_ini4j_0_5_4.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.idea/libraries/org_ini4j_ini4j_0_5_4.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					<component name="libraryTable">
 | 
				
			||||||
 | 
					  <library name="org.ini4j:ini4j:0.5.4" type="repository">
 | 
				
			||||||
 | 
					    <properties maven-id="org.ini4j:ini4j:0.5.4" />
 | 
				
			||||||
 | 
					    <CLASSES>
 | 
				
			||||||
 | 
					      <root url="jar://$MAVEN_REPOSITORY$/org/ini4j/ini4j/0.5.4/ini4j-0.5.4.jar!/" />
 | 
				
			||||||
 | 
					    </CLASSES>
 | 
				
			||||||
 | 
					    <JAVADOC />
 | 
				
			||||||
 | 
					    <SOURCES />
 | 
				
			||||||
 | 
					  </library>
 | 
				
			||||||
 | 
					</component>
 | 
				
			||||||
							
								
								
									
										11
									
								
								.idea/libraries/org_postgresql_postgresql_42_2_19.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								.idea/libraries/org_postgresql_postgresql_42_2_19.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					<component name="libraryTable">
 | 
				
			||||||
 | 
					  <library name="org.postgresql:postgresql:42.2.19" type="repository">
 | 
				
			||||||
 | 
					    <properties maven-id="org.postgresql:postgresql:42.2.19" />
 | 
				
			||||||
 | 
					    <CLASSES>
 | 
				
			||||||
 | 
					      <root url="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/42.2.19/postgresql-42.2.19.jar!/" />
 | 
				
			||||||
 | 
					      <root url="jar://$MAVEN_REPOSITORY$/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.jar!/" />
 | 
				
			||||||
 | 
					    </CLASSES>
 | 
				
			||||||
 | 
					    <JAVADOC />
 | 
				
			||||||
 | 
					    <SOURCES />
 | 
				
			||||||
 | 
					  </library>
 | 
				
			||||||
 | 
					</component>
 | 
				
			||||||
							
								
								
									
										6
									
								
								.idea/misc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.idea/misc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<project version="4">
 | 
				
			||||||
 | 
					  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
 | 
				
			||||||
 | 
					    <output url="file://$PROJECT_DIR$/out" />
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										8
									
								
								.idea/modules.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.idea/modules.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<project version="4">
 | 
				
			||||||
 | 
					  <component name="ProjectModuleManager">
 | 
				
			||||||
 | 
					    <modules>
 | 
				
			||||||
 | 
					      <module fileurl="file://$PROJECT_DIR$/tourplaner.iml" filepath="$PROJECT_DIR$/tourplaner.iml" />
 | 
				
			||||||
 | 
					    </modules>
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										7
									
								
								.idea/sqldialects.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								.idea/sqldialects.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<project version="4">
 | 
				
			||||||
 | 
					  <component name="SqlDialectMappings">
 | 
				
			||||||
 | 
					    <file url="file://$PROJECT_DIR$/src/tourplaner/data/PostgresHelper.java" dialect="GenericSQL" />
 | 
				
			||||||
 | 
					    <file url="PROJECT" dialect="PostgreSQL" />
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										124
									
								
								.idea/uiDesigner.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								.idea/uiDesigner.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,124 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<project version="4">
 | 
				
			||||||
 | 
					  <component name="Palette2">
 | 
				
			||||||
 | 
					    <group name="Swing">
 | 
				
			||||||
 | 
					      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
 | 
				
			||||||
 | 
					        <initial-values>
 | 
				
			||||||
 | 
					          <property name="text" value="Button" />
 | 
				
			||||||
 | 
					        </initial-values>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
 | 
				
			||||||
 | 
					        <initial-values>
 | 
				
			||||||
 | 
					          <property name="text" value="RadioButton" />
 | 
				
			||||||
 | 
					        </initial-values>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
 | 
				
			||||||
 | 
					        <initial-values>
 | 
				
			||||||
 | 
					          <property name="text" value="CheckBox" />
 | 
				
			||||||
 | 
					        </initial-values>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
 | 
				
			||||||
 | 
					        <initial-values>
 | 
				
			||||||
 | 
					          <property name="text" value="Label" />
 | 
				
			||||||
 | 
					        </initial-values>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="-1" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="-1" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="-1" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="50" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="50" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="50" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="50" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="50" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="150" height="50" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="200" height="200" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
 | 
				
			||||||
 | 
					          <preferred-size width="200" height="200" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
 | 
				
			||||||
 | 
					          <preferred-size width="-1" height="20" />
 | 
				
			||||||
 | 
					        </default-constraints>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
 | 
				
			||||||
 | 
					        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					    </group>
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										7
									
								
								.idea/vcs.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								.idea/vcs.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<project version="4">
 | 
				
			||||||
 | 
					  <component name="VcsDirectoryMappings">
 | 
				
			||||||
 | 
					    <mapping directory="" vcs="Git" />
 | 
				
			||||||
 | 
					    <mapping directory="$PROJECT_DIR$" vcs="Git" />
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					# Tourplaner
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Config
 | 
				
			||||||
 | 
					* DB informationen müssen in das config.ini.sample unter [db] eingetragen werden
 | 
				
			||||||
 | 
					* Datei muss in config.ini umbenannt werden
 | 
				
			||||||
 | 
					* [langde] beinhaltet alle Deutschen Texte der Gui
 | 
				
			||||||
 | 
					* [start] beinhaltet den Title und infos die beim start verabeitet werden
 | 
				
			||||||
 | 
					* [hilfe] beinhaltet die Links zu den Hilfeseiten
 | 
				
			||||||
@@ -1,24 +1,18 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<module type="JAVA_MODULE" version="4">
 | 
					<module type="JAVA_MODULE" version="4">
 | 
				
			||||||
  <component name="FacetManager">
 | 
					 | 
				
			||||||
    <facet type="Spring" name="Spring">
 | 
					 | 
				
			||||||
      <configuration>
 | 
					 | 
				
			||||||
        <fileset id="fileset" name="ConfigHelper" removed="false">
 | 
					 | 
				
			||||||
          <file>file://$MODULE_DIR$/src/tourplaner/business/ConfigHelper.java</file>
 | 
					 | 
				
			||||||
        </fileset>
 | 
					 | 
				
			||||||
      </configuration>
 | 
					 | 
				
			||||||
    </facet>
 | 
					 | 
				
			||||||
  </component>
 | 
					 | 
				
			||||||
  <component name="NewModuleRootManager" inherit-compiler-output="true">
 | 
					  <component name="NewModuleRootManager" inherit-compiler-output="true">
 | 
				
			||||||
    <exclude-output />
 | 
					    <exclude-output />
 | 
				
			||||||
    <content url="file://$MODULE_DIR$">
 | 
					    <content url="file://$MODULE_DIR$">
 | 
				
			||||||
      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
 | 
					      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
 | 
				
			||||||
    </content>
 | 
					    </content>
 | 
				
			||||||
    <orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" />
 | 
					    <orderEntry type="inheritedJdk" />
 | 
				
			||||||
    <orderEntry type="sourceFolder" forTests="false" />
 | 
					    <orderEntry type="sourceFolder" forTests="false" />
 | 
				
			||||||
    <orderEntry type="library" name="lib" level="project" />
 | 
					    <orderEntry type="library" name="lib" level="project" />
 | 
				
			||||||
    <orderEntry type="library" name="junit:junit:4.13.2" level="project" />
 | 
					 | 
				
			||||||
    <orderEntry type="library" name="org.slf4j:slf4j-log4j12:1.7.12" level="project" />
 | 
					 | 
				
			||||||
    <orderEntry type="library" name="org.ini4j:ini4j:0.5.4" 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.postgresql:postgresql:42.2.19" level="project" />
 | 
				
			||||||
 | 
					    <orderEntry type="library" name="iText-4.2.0-com.itextpdf" level="project" />
 | 
				
			||||||
 | 
					    <orderEntry type="library" name="org.json:json:20180130" level="project" />
 | 
				
			||||||
 | 
					    <orderEntry type="library" name="com.google.code.gson:gson:2.8.6" level="project" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</module>
 | 
					</module>
 | 
				
			||||||
							
								
								
									
										20
									
								
								TourplanerTabellen.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								TourplanerTabellen.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					// Tour Tabelle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					create table tour
 | 
				
			||||||
 | 
					(
 | 
				
			||||||
 | 
						tourname varchar not null,
 | 
				
			||||||
 | 
						dauer decimal,
 | 
				
			||||||
 | 
						mapjson varchar,
 | 
				
			||||||
 | 
						start varchar,
 | 
				
			||||||
 | 
						ziel varchar,
 | 
				
			||||||
 | 
						strecke decimal
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					create unique index tour_tourname_uindex
 | 
				
			||||||
 | 
						on tour (tourname);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					alter table tour add constraint tour_pk primary key (tourname);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#// Log Table
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					create table log(tourname varchar constraint log_tour_tourname_fk references tour,id varchar,bemerkung varchar,datum date,strecke decimal,avg decimal,hightmeter decimal,pause decimal,gegangen decimal,dauer decimal);
 | 
				
			||||||
							
								
								
									
										29
									
								
								conf.ini.sample
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								conf.ini.sample
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					[start]
 | 
				
			||||||
 | 
					message = Tour Planer App gestartet
 | 
				
			||||||
 | 
					apptitle = Tour Planer
 | 
				
			||||||
 | 
					logo = logo.png
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[lang]
 | 
				
			||||||
 | 
					lang = langde
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[db]
 | 
				
			||||||
 | 
					dbname = tourplaner
 | 
				
			||||||
 | 
					url =
 | 
				
			||||||
 | 
					port = 5432
 | 
				
			||||||
 | 
					user =
 | 
				
			||||||
 | 
					pw =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[report]
 | 
				
			||||||
 | 
					path = ./reports/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[hilfe]
 | 
				
			||||||
 | 
					gitrepo = https://git.dergeorg.at/dergeorg/tourplaner
 | 
				
			||||||
 | 
					doxygendoc = https://git.dergeorg.at/dergeorg/tourplaner
 | 
				
			||||||
 | 
					javadoc = https://git.dergeorg.at/dergeorg/tourplaner
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[map]
 | 
				
			||||||
 | 
					key =
 | 
				
			||||||
 | 
					size = 1500,400
 | 
				
			||||||
 | 
					sizePdf = 600,400
 | 
				
			||||||
 | 
					path = D:\\TourplanerImages\\
 | 
				
			||||||
 | 
					file_pre = file:///
 | 
				
			||||||
@@ -5,14 +5,14 @@
 | 
				
			|||||||
<simplesect>
 | 
					<simplesect>
 | 
				
			||||||
    <title>Classes    </title>
 | 
					    <title>Classes    </title>
 | 
				
			||||||
        <itemizedlist>
 | 
					        <itemizedlist>
 | 
				
			||||||
            <listitem><para>class <link linkend="_classtourplaner_1_1model_1_1_tour">tourplaner.model.Tour</link></para>
 | 
					            <listitem><para>class <link linkend="_classtourplaner_1_1model_1_1_tour">tourplaner.object.Tour</link></para>
 | 
				
			||||||
</listitem>
 | 
					</listitem>
 | 
				
			||||||
        </itemizedlist>
 | 
					        </itemizedlist>
 | 
				
			||||||
</simplesect>
 | 
					</simplesect>
 | 
				
			||||||
<simplesect>
 | 
					<simplesect>
 | 
				
			||||||
    <title>Packages    </title>
 | 
					    <title>Packages    </title>
 | 
				
			||||||
        <itemizedlist>
 | 
					        <itemizedlist>
 | 
				
			||||||
            <listitem><para>package <link linkend="_namespacetourplaner_1_1model">tourplaner.model</link></para>
 | 
					            <listitem><para>package <link linkend="_namespacetourplaner_1_1model">tourplaner.object</link></para>
 | 
				
			||||||
</listitem>
 | 
					</listitem>
 | 
				
			||||||
        </itemizedlist>
 | 
					        </itemizedlist>
 | 
				
			||||||
</simplesect>
 | 
					</simplesect>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
 | 
					<?xml version='1.0' encoding='UTF-8' standalone='no'?>
 | 
				
			||||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_annotated" xml:lang="en-US">
 | 
					<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_annotated" xml:lang="en-US">
 | 
				
			||||||
<title>Class List</title>
 | 
					<title>Class List</title>
 | 
				
			||||||
Here are the classes, structs, unions and interfaces with brief descriptions:<link linkend="_classtourplaner_1_1data_1_1_db_connect">tourplaner.data.DbConnect</link><link linkend="_classtourplaner_1_1business_1_1_log_helper">tourplaner.business.LogHelper</link><link linkend="_classtourplaner_1_1_main">tourplaner.Main</link><link linkend="_classtourplaner_1_1ui_1_1_presenter_main">tourplaner.ui.PresenterMain</link><link linkend="_classtourplaner_1_1model_1_1_tour">tourplaner.model.Tour</link><link linkend="_classtourplaner_1_1business_1_1_tour_planer">tourplaner.business.TourPlaner</link></section>
 | 
					Here are the classes, structs, unions and interfaces with brief descriptions:<link linkend="_classtourplaner_1_1data_1_1_db_connect">tourplaner.data.DbConnect</link><link linkend="_classtourplaner_1_1business_1_1_log_helper">tourplaner.business.LogHelper</link><link linkend="_classtourplaner_1_1_main">tourplaner.Main</link><link linkend="_classtourplaner_1_1ui_1_1_presenter_main">tourplaner.ui.PresenterMain</link><link linkend="_classtourplaner_1_1model_1_1_tour">tourplaner.object.Tour</link><link linkend="_classtourplaner_1_1business_1_1_tour_planer">tourplaner.business.TourPlaner</link></section>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
 | 
					<?xml version='1.0' encoding='UTF-8' standalone='no'?>
 | 
				
			||||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_classtourplaner_1_1model_1_1_tour" xml:lang="en-US">
 | 
					<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_classtourplaner_1_1model_1_1_tour" xml:lang="en-US">
 | 
				
			||||||
<title>tourplaner.model.Tour Class Reference</title>
 | 
					<title>tourplaner.object.Tour Class Reference</title>
 | 
				
			||||||
<indexterm><primary>tourplaner.model.Tour</primary></indexterm>
 | 
					<indexterm><primary>tourplaner.object.Tour</primary></indexterm>
 | 
				
			||||||
<section>
 | 
					<section>
 | 
				
			||||||
<title>Detailed Description</title>
 | 
					<title>Detailed Description</title>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
 | 
					<?xml version='1.0' encoding='UTF-8' standalone='no'?>
 | 
				
			||||||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_namespacetourplaner_1_1model" xml:lang="en-US">
 | 
					<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_namespacetourplaner_1_1model" xml:lang="en-US">
 | 
				
			||||||
<title>Package tourplaner.model</title>
 | 
					<title>Package tourplaner.object</title>
 | 
				
			||||||
<indexterm><primary>tourplaner.model</primary></indexterm>
 | 
					<indexterm><primary>tourplaner.object</primary></indexterm>
 | 
				
			||||||
<simplesect>
 | 
					<simplesect>
 | 
				
			||||||
    <title>Classes    </title>
 | 
					    <title>Classes    </title>
 | 
				
			||||||
        <itemizedlist>
 | 
					        <itemizedlist>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -93,12 +93,12 @@ $(document).ready(function(){initNavTree('_tour_8java.html',''); initResizable()
 | 
				
			|||||||
<table class="memberdecls">
 | 
					<table class="memberdecls">
 | 
				
			||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
 | 
					<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
 | 
				
			||||||
Classes</h2></td></tr>
 | 
					Classes</h2></td></tr>
 | 
				
			||||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classtourplaner_1_1model_1_1_tour.html">tourplaner.model.Tour</a></td></tr>
 | 
					<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classtourplaner_1_1model_1_1_tour.html">tourplaner.object.Tour</a></td></tr>
 | 
				
			||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
 | 
					<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
 | 
				
			||||||
</table><table class="memberdecls">
 | 
					</table><table class="memberdecls">
 | 
				
			||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
 | 
					<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
 | 
				
			||||||
Packages</h2></td></tr>
 | 
					Packages</h2></td></tr>
 | 
				
			||||||
<tr class="memitem:namespacetourplaner_1_1model"><td class="memItemLeft" align="right" valign="top">package  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetourplaner_1_1model.html">tourplaner.model</a></td></tr>
 | 
					<tr class="memitem:namespacetourplaner_1_1model"><td class="memItemLeft" align="right" valign="top">package  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetourplaner_1_1model.html">tourplaner.object</a></td></tr>
 | 
				
			||||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
 | 
					<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
 | 
				
			||||||
</table>
 | 
					</table>
 | 
				
			||||||
</div><!-- contents -->
 | 
					</div><!-- contents -->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -103,7 +103,7 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
 | 
				
			|||||||
<dd><a class="el" href="classtourplaner_1_1ui_1_1_presenter_main.html">PresenterMain</a> (<a class="el" href="namespacetourplaner_1_1ui.html">tourplaner.ui</a>)</dd></dl>
 | 
					<dd><a class="el" href="classtourplaner_1_1ui_1_1_presenter_main.html">PresenterMain</a> (<a class="el" href="namespacetourplaner_1_1ui.html">tourplaner.ui</a>)</dd></dl>
 | 
				
			||||||
<dl class="classindex even">
 | 
					<dl class="classindex even">
 | 
				
			||||||
<dt class="alphachar"><a name="letter_T">T</a></dt>
 | 
					<dt class="alphachar"><a name="letter_T">T</a></dt>
 | 
				
			||||||
<dd><a class="el" href="classtourplaner_1_1model_1_1_tour.html">Tour</a> (<a class="el" href="namespacetourplaner_1_1model.html">tourplaner.model</a>)</dd><dd><a class="el" href="classtourplaner_1_1business_1_1_tour_planer.html">TourPlaner</a> (<a class="el" href="namespacetourplaner_1_1business.html">tourplaner.business</a>)</dd></dl>
 | 
					<dd><a class="el" href="classtourplaner_1_1model_1_1_tour.html">Tour</a> (<a class="el" href="namespacetourplaner_1_1model.html">tourplaner.object</a>)</dd><dd><a class="el" href="classtourplaner_1_1business_1_1_tour_planer.html">TourPlaner</a> (<a class="el" href="namespacetourplaner_1_1business.html">tourplaner.business</a>)</dd></dl>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
</div><!-- contents -->
 | 
					</div><!-- contents -->
 | 
				
			||||||
</div><!-- doc-content -->
 | 
					</div><!-- doc-content -->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -109,7 +109,7 @@ Static Public Member Functions</h2></td></tr>
 | 
				
			|||||||
  <td class="mlabels-left">
 | 
					  <td class="mlabels-left">
 | 
				
			||||||
      <table class="memname">
 | 
					      <table class="memname">
 | 
				
			||||||
        <tr>
 | 
					        <tr>
 | 
				
			||||||
          <td class="memname">static Logger tourplaner.business.LogHelper.getLogger </td>
 | 
					          <td class="memname">static Logger tourplaner.business.LogHelper.getLogger</td>
 | 
				
			||||||
          <td>(</td>
 | 
					          <td>(</td>
 | 
				
			||||||
          <td class="paramname"></td><td>)</td>
 | 
					          <td class="paramname"></td><td>)</td>
 | 
				
			||||||
          <td></td>
 | 
					          <td></td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -106,7 +106,7 @@ Public Member Functions</h2></td></tr>
 | 
				
			|||||||
<div class="memproto">
 | 
					<div class="memproto">
 | 
				
			||||||
      <table class="memname">
 | 
					      <table class="memname">
 | 
				
			||||||
        <tr>
 | 
					        <tr>
 | 
				
			||||||
          <td class="memname">tourplaner.business.TourPlaner.TourPlaner </td>
 | 
					          <td class="memname">tourplaner.business.TourPlaner.TourPlaner</td>
 | 
				
			||||||
          <td>(</td>
 | 
					          <td>(</td>
 | 
				
			||||||
          <td class="paramtype">Stage </td>
 | 
					          <td class="paramtype">Stage </td>
 | 
				
			||||||
          <td class="paramname"><em>primaryStage</em></td><td>)</td>
 | 
					          <td class="paramname"><em>primaryStage</em></td><td>)</td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@
 | 
				
			|||||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
 | 
					<meta http-equiv="X-UA-Compatible" content="IE=9"/>
 | 
				
			||||||
<meta name="generator" content="Doxygen 1.9.1"/>
 | 
					<meta name="generator" content="Doxygen 1.9.1"/>
 | 
				
			||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
 | 
					<meta name="viewport" content="width=device-width, initial-scale=1"/>
 | 
				
			||||||
<title>Tourplaner: tourplaner.model.Tour Class Reference</title>
 | 
					<title>Tourplaner: tourplaner.object.Tour Class Reference</title>
 | 
				
			||||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
 | 
					<link href="tabs.css" rel="stylesheet" type="text/css"/>
 | 
				
			||||||
<script type="text/javascript" src="jquery.js"></script>
 | 
					<script type="text/javascript" src="jquery.js"></script>
 | 
				
			||||||
<script type="text/javascript" src="dynsections.js"></script>
 | 
					<script type="text/javascript" src="dynsections.js"></script>
 | 
				
			||||||
@@ -84,7 +84,7 @@ $(document).ready(function(){initNavTree('classtourplaner_1_1model_1_1_tour.html
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<div class="header">
 | 
					<div class="header">
 | 
				
			||||||
  <div class="headertitle">
 | 
					  <div class="headertitle">
 | 
				
			||||||
<div class="title">tourplaner.model.Tour Class Reference</div>  </div>
 | 
					<div class="title">tourplaner.object.Tour Class Reference</div>  </div>
 | 
				
			||||||
</div><!--header-->
 | 
					</div><!--header-->
 | 
				
			||||||
<div class="contents">
 | 
					<div class="contents">
 | 
				
			||||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
 | 
					<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,7 +92,7 @@ $(document).ready(function(){initNavTree('hierarchy.html',''); initResizable();
 | 
				
			|||||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1data_1_1_db_connect.html" target="_self">tourplaner.data.DbConnect</a></td><td class="desc"></td></tr>
 | 
					<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1data_1_1_db_connect.html" target="_self">tourplaner.data.DbConnect</a></td><td class="desc"></td></tr>
 | 
				
			||||||
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1business_1_1_log_helper.html" target="_self">tourplaner.business.LogHelper</a></td><td class="desc"></td></tr>
 | 
					<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1business_1_1_log_helper.html" target="_self">tourplaner.business.LogHelper</a></td><td class="desc"></td></tr>
 | 
				
			||||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1ui_1_1_presenter_main.html" target="_self">tourplaner.ui.PresenterMain</a></td><td class="desc"></td></tr>
 | 
					<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1ui_1_1_presenter_main.html" target="_self">tourplaner.ui.PresenterMain</a></td><td class="desc"></td></tr>
 | 
				
			||||||
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1model_1_1_tour.html" target="_self">tourplaner.model.Tour</a></td><td class="desc"></td></tr>
 | 
					<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1model_1_1_tour.html" target="_self">tourplaner.object.Tour</a></td><td class="desc"></td></tr>
 | 
				
			||||||
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1business_1_1_tour_planer.html" target="_self">tourplaner.business.TourPlaner</a></td><td class="desc"></td></tr>
 | 
					<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1business_1_1_tour_planer.html" target="_self">tourplaner.business.TourPlaner</a></td><td class="desc"></td></tr>
 | 
				
			||||||
<tr id="row_5_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_5_" class="arrow" onclick="toggleFolder('5_')">▼</span><span class="icona"><span class="icon">C</span></span><b>Application</b></td><td class="desc"></td></tr>
 | 
					<tr id="row_5_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_5_" class="arrow" onclick="toggleFolder('5_')">▼</span><span class="icona"><span class="icon">C</span></span><b>Application</b></td><td class="desc"></td></tr>
 | 
				
			||||||
<tr id="row_5_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1_main.html" target="_self">tourplaner.Main</a></td><td class="desc"></td></tr>
 | 
					<tr id="row_5_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtourplaner_1_1_main.html" target="_self">tourplaner.Main</a></td><td class="desc"></td></tr>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@
 | 
				
			|||||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
 | 
					<meta http-equiv="X-UA-Compatible" content="IE=9"/>
 | 
				
			||||||
<meta name="generator" content="Doxygen 1.9.1"/>
 | 
					<meta name="generator" content="Doxygen 1.9.1"/>
 | 
				
			||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
 | 
					<meta name="viewport" content="width=device-width, initial-scale=1"/>
 | 
				
			||||||
<title>Tourplaner: Package tourplaner.model</title>
 | 
					<title>Tourplaner: Package tourplaner.object</title>
 | 
				
			||||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
 | 
					<link href="tabs.css" rel="stylesheet" type="text/css"/>
 | 
				
			||||||
<script type="text/javascript" src="jquery.js"></script>
 | 
					<script type="text/javascript" src="jquery.js"></script>
 | 
				
			||||||
<script type="text/javascript" src="dynsections.js"></script>
 | 
					<script type="text/javascript" src="dynsections.js"></script>
 | 
				
			||||||
@@ -86,7 +86,7 @@ $(document).ready(function(){initNavTree('namespacetourplaner_1_1model.html','')
 | 
				
			|||||||
  <div class="summary">
 | 
					  <div class="summary">
 | 
				
			||||||
<a href="#nested-classes">Classes</a>  </div>
 | 
					<a href="#nested-classes">Classes</a>  </div>
 | 
				
			||||||
  <div class="headertitle">
 | 
					  <div class="headertitle">
 | 
				
			||||||
<div class="title">Package tourplaner.model</div>  </div>
 | 
					<div class="title">Package tourplaner.object</div>  </div>
 | 
				
			||||||
</div><!--header-->
 | 
					</div><!--header-->
 | 
				
			||||||
<div class="contents">
 | 
					<div class="contents">
 | 
				
			||||||
<table class="memberdecls">
 | 
					<table class="memberdecls">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
\hypertarget{classtourplaner_1_1model_1_1_tour}{}\doxysection{tourplaner.\+model.\+Tour Class Reference}
 | 
					\hypertarget{classtourplaner_1_1model_1_1_tour}{}\doxysection{tourplaner.\+model.\+Tour Class Reference}
 | 
				
			||||||
\label{classtourplaner_1_1model_1_1_tour}\index{tourplaner.model.Tour@{tourplaner.model.Tour}}
 | 
					\label{classtourplaner_1_1model_1_1_tour}\index{tourplaner.object.Tour@{tourplaner.object.Tour}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
\doxysubsection{Detailed Description}
 | 
					\doxysubsection{Detailed Description}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
\hypertarget{namespacetourplaner_1_1model}{}\doxysection{Package tourplaner.\+model}
 | 
					\hypertarget{namespacetourplaner_1_1model}{}\doxysection{Package tourplaner.\+model}
 | 
				
			||||||
\label{namespacetourplaner_1_1model}\index{tourplaner.model@{tourplaner.model}}
 | 
					\label{namespacetourplaner_1_1model}\index{tourplaner.object@{tourplaner.object}}
 | 
				
			||||||
\doxysubsection*{Classes}
 | 
					\doxysubsection*{Classes}
 | 
				
			||||||
\begin{DoxyCompactItemize}
 | 
					\begin{DoxyCompactItemize}
 | 
				
			||||||
\item 
 | 
					\item 
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
.TH "tourplaner.model" 3 "Thu Feb 25 2021" "Version 0.0.2" "Tourplaner" \" -*- nroff -*-
 | 
					.TH "tourplaner.object" 3 "Thu Feb 25 2021" "Version 0.0.2" "Tourplaner" \" -*- nroff -*-
 | 
				
			||||||
.ad l
 | 
					.ad l
 | 
				
			||||||
.nh
 | 
					.nh
 | 
				
			||||||
.SH NAME
 | 
					.SH NAME
 | 
				
			||||||
tourplaner.model
 | 
					tourplaner.object
 | 
				
			||||||
.SH SYNOPSIS
 | 
					.SH SYNOPSIS
 | 
				
			||||||
.br
 | 
					.br
 | 
				
			||||||
.PP
 | 
					.PP
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
.TH "tourplaner.model.Tour" 3 "Thu Feb 25 2021" "Version 0.0.2" "Tourplaner" \" -*- nroff -*-
 | 
					.TH "tourplaner.object.Tour" 3 "Thu Feb 25 2021" "Version 0.0.2" "Tourplaner" \" -*- nroff -*-
 | 
				
			||||||
.ad l
 | 
					.ad l
 | 
				
			||||||
.nh
 | 
					.nh
 | 
				
			||||||
.SH NAME
 | 
					.SH NAME
 | 
				
			||||||
tourplaner.model.Tour
 | 
					tourplaner.object.Tour
 | 
				
			||||||
.SH SYNOPSIS
 | 
					.SH SYNOPSIS
 | 
				
			||||||
.br
 | 
					.br
 | 
				
			||||||
.PP
 | 
					.PP
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -127,7 +127,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
</th>
 | 
					</th>
 | 
				
			||||||
</tr>
 | 
					</tr>
 | 
				
			||||||
<tr id="i4" class="altColor">
 | 
					<tr id="i4" class="altColor">
 | 
				
			||||||
<td class="colFirst"><a href="tourplaner/model/Tour.html" title="class in tourplaner.model">Tour</a></td>
 | 
					<td class="colFirst"><a href="tourplaner/model/Tour.html" title="class in tourplaner.object">Tour</a></td>
 | 
				
			||||||
<th class="colLast" scope="row">
 | 
					<th class="colLast" scope="row">
 | 
				
			||||||
<div class="block">Model einer Tour</div>
 | 
					<div class="block">Model einer Tour</div>
 | 
				
			||||||
</th>
 | 
					</th>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,7 @@
 | 
				
			|||||||
<li><a href="tourplaner/business/LogHelper.html" title="class in tourplaner.business">LogHelper</a></li>
 | 
					<li><a href="tourplaner/business/LogHelper.html" title="class in tourplaner.business">LogHelper</a></li>
 | 
				
			||||||
<li><a href="tourplaner/Main.html" title="class in tourplaner">Main</a></li>
 | 
					<li><a href="tourplaner/Main.html" title="class in tourplaner">Main</a></li>
 | 
				
			||||||
<li><a href="tourplaner/ui/PresenterMain.html" title="class in tourplaner.ui">PresenterMain</a></li>
 | 
					<li><a href="tourplaner/ui/PresenterMain.html" title="class in tourplaner.ui">PresenterMain</a></li>
 | 
				
			||||||
<li><a href="tourplaner/model/Tour.html" title="class in tourplaner.model">Tour</a></li>
 | 
					<li><a href="tourplaner/model/Tour.html" title="class in tourplaner.object">Tour</a></li>
 | 
				
			||||||
<li><a href="tourplaner/business/TourPlaner.html" title="class in tourplaner.business">TourPlaner</a></li>
 | 
					<li><a href="tourplaner/business/TourPlaner.html" title="class in tourplaner.business">TourPlaner</a></li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
</main>
 | 
					</main>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -118,7 +118,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<td class="colLast"> </td>
 | 
					<td class="colLast"> </td>
 | 
				
			||||||
</tr>
 | 
					</tr>
 | 
				
			||||||
<tr class="rowColor">
 | 
					<tr class="rowColor">
 | 
				
			||||||
<th class="colFirst" scope="row"><a href="tourplaner/model/package-summary.html">tourplaner.model</a></th>
 | 
					<th class="colFirst" scope="row"><a href="tourplaner/model/package-summary.html">tourplaner.object</a></th>
 | 
				
			||||||
<td class="colLast"> </td>
 | 
					<td class="colLast"> </td>
 | 
				
			||||||
</tr>
 | 
					</tr>
 | 
				
			||||||
<tr class="altColor">
 | 
					<tr class="altColor">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
tourplaner
 | 
					tourplaner
 | 
				
			||||||
tourplaner.business
 | 
					tourplaner.business
 | 
				
			||||||
tourplaner.data
 | 
					tourplaner.data
 | 
				
			||||||
tourplaner.model
 | 
					tourplaner.object
 | 
				
			||||||
tourplaner.ui
 | 
					tourplaner.ui
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -97,11 +97,11 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
</a>
 | 
					</a>
 | 
				
			||||||
<h2 class="title">T</h2>
 | 
					<h2 class="title">T</h2>
 | 
				
			||||||
<dl>
 | 
					<dl>
 | 
				
			||||||
<dt><a href="../tourplaner/model/Tour.html" title="class in tourplaner.model"><span class="typeNameLink">Tour</span></a> - Class in <a href="../tourplaner/model/package-summary.html">tourplaner.model</a></dt>
 | 
					<dt><a href="../tourplaner/model/Tour.html" title="class in tourplaner.object"><span class="typeNameLink">Tour</span></a> - Class in <a href="../tourplaner/model/package-summary.html">tourplaner.object</a></dt>
 | 
				
			||||||
<dd>
 | 
					<dd>
 | 
				
			||||||
<div class="block">Model einer Tour</div>
 | 
					<div class="block">Model einer Tour</div>
 | 
				
			||||||
</dd>
 | 
					</dd>
 | 
				
			||||||
<dt><span class="memberNameLink"><a href="../tourplaner/model/Tour.html#%3Cinit%3E()">Tour()</a></span> - Constructor for class tourplaner.model.<a href="../tourplaner/model/Tour.html" title="class in tourplaner.model">Tour</a></dt>
 | 
					<dt><span class="memberNameLink"><a href="../tourplaner/model/Tour.html#%3Cinit%3E()">Tour()</a></span> - Constructor for class tourplaner.object.<a href="../tourplaner/model/Tour.html" title="class in tourplaner.object">Tour</a></dt>
 | 
				
			||||||
<dd> </dd>
 | 
					<dd> </dd>
 | 
				
			||||||
<dt><a href="../tourplaner/package-summary.html">tourplaner</a> - package tourplaner</dt>
 | 
					<dt><a href="../tourplaner/package-summary.html">tourplaner</a> - package tourplaner</dt>
 | 
				
			||||||
<dd> </dd>
 | 
					<dd> </dd>
 | 
				
			||||||
@@ -117,7 +117,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<dd> </dd>
 | 
					<dd> </dd>
 | 
				
			||||||
<dt><a href="../tourplaner/data/package-summary.html">tourplaner.data</a> - package tourplaner.data</dt>
 | 
					<dt><a href="../tourplaner/data/package-summary.html">tourplaner.data</a> - package tourplaner.data</dt>
 | 
				
			||||||
<dd> </dd>
 | 
					<dd> </dd>
 | 
				
			||||||
<dt><a href="../tourplaner/model/package-summary.html">tourplaner.model</a> - package tourplaner.model</dt>
 | 
					<dt><a href="../tourplaner/model/package-summary.html">tourplaner.object</a> - package tourplaner.object</dt>
 | 
				
			||||||
<dd> </dd>
 | 
					<dd> </dd>
 | 
				
			||||||
<dt><a href="../tourplaner/ui/package-summary.html">tourplaner.ui</a> - package tourplaner.ui</dt>
 | 
					<dt><a href="../tourplaner/ui/package-summary.html">tourplaner.ui</a> - package tourplaner.ui</dt>
 | 
				
			||||||
<dd> </dd>
 | 
					<dd> </dd>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -113,7 +113,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<td class="colLast"> </td>
 | 
					<td class="colLast"> </td>
 | 
				
			||||||
</tr>
 | 
					</tr>
 | 
				
			||||||
<tr class="rowColor" id="i3">
 | 
					<tr class="rowColor" id="i3">
 | 
				
			||||||
<th class="colFirst" scope="row"><a href="tourplaner/model/package-summary.html">tourplaner.model</a></th>
 | 
					<th class="colFirst" scope="row"><a href="tourplaner/model/package-summary.html">tourplaner.object</a></th>
 | 
				
			||||||
<td class="colLast"> </td>
 | 
					<td class="colLast"> </td>
 | 
				
			||||||
</tr>
 | 
					</tr>
 | 
				
			||||||
<tr class="altColor" id="i4">
 | 
					<tr class="altColor" id="i4">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -99,7 +99,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<li><a href="tourplaner/package-tree.html">tourplaner</a>, </li>
 | 
					<li><a href="tourplaner/package-tree.html">tourplaner</a>, </li>
 | 
				
			||||||
<li><a href="tourplaner/business/package-tree.html">tourplaner.business</a>, </li>
 | 
					<li><a href="tourplaner/business/package-tree.html">tourplaner.business</a>, </li>
 | 
				
			||||||
<li><a href="tourplaner/data/package-tree.html">tourplaner.data</a>, </li>
 | 
					<li><a href="tourplaner/data/package-tree.html">tourplaner.data</a>, </li>
 | 
				
			||||||
<li><a href="tourplaner/model/package-tree.html">tourplaner.model</a>, </li>
 | 
					<li><a href="tourplaner/model/package-tree.html">tourplaner.object</a>, </li>
 | 
				
			||||||
<li><a href="tourplaner/ui/package-tree.html">tourplaner.ui</a></li>
 | 
					<li><a href="tourplaner/ui/package-tree.html">tourplaner.ui</a></li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
@@ -117,7 +117,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<li class="circle">tourplaner.data.<a href="tourplaner/data/DbConnect.html" title="class in tourplaner.data"><span class="typeNameLink">DbConnect</span></a></li>
 | 
					<li class="circle">tourplaner.data.<a href="tourplaner/data/DbConnect.html" title="class in tourplaner.data"><span class="typeNameLink">DbConnect</span></a></li>
 | 
				
			||||||
<li class="circle">tourplaner.business.<a href="tourplaner/business/LogHelper.html" title="class in tourplaner.business"><span class="typeNameLink">LogHelper</span></a></li>
 | 
					<li class="circle">tourplaner.business.<a href="tourplaner/business/LogHelper.html" title="class in tourplaner.business"><span class="typeNameLink">LogHelper</span></a></li>
 | 
				
			||||||
<li class="circle">tourplaner.ui.<a href="tourplaner/ui/PresenterMain.html" title="class in tourplaner.ui"><span class="typeNameLink">PresenterMain</span></a></li>
 | 
					<li class="circle">tourplaner.ui.<a href="tourplaner/ui/PresenterMain.html" title="class in tourplaner.ui"><span class="typeNameLink">PresenterMain</span></a></li>
 | 
				
			||||||
<li class="circle">tourplaner.model.<a href="tourplaner/model/Tour.html" title="class in tourplaner.model"><span class="typeNameLink">Tour</span></a></li>
 | 
					<li class="circle">tourplaner.object.<a href="tourplaner/model/Tour.html" title="class in tourplaner.object"><span class="typeNameLink">Tour</span></a></li>
 | 
				
			||||||
<li class="circle">tourplaner.business.<a href="tourplaner/business/TourPlaner.html" title="class in tourplaner.business"><span class="typeNameLink">TourPlaner</span></a></li>
 | 
					<li class="circle">tourplaner.business.<a href="tourplaner/business/TourPlaner.html" title="class in tourplaner.business"><span class="typeNameLink">TourPlaner</span></a></li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
</li>
 | 
					</li>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -109,7 +109,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<!-- ======== START OF CLASS DATA ======== -->
 | 
					<!-- ======== START OF CLASS DATA ======== -->
 | 
				
			||||||
<main role="main">
 | 
					<main role="main">
 | 
				
			||||||
<div class="header">
 | 
					<div class="header">
 | 
				
			||||||
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">tourplaner.model</a></div>
 | 
					<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">tourplaner.object</a></div>
 | 
				
			||||||
<h2 title="Class Tour" class="title">Class Tour</h2>
 | 
					<h2 title="Class Tour" class="title">Class Tour</h2>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
<div class="contentContainer">
 | 
					<div class="contentContainer">
 | 
				
			||||||
@@ -117,7 +117,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<li>java.lang.Object</li>
 | 
					<li>java.lang.Object</li>
 | 
				
			||||||
<li>
 | 
					<li>
 | 
				
			||||||
<ul class="inheritance">
 | 
					<ul class="inheritance">
 | 
				
			||||||
<li>tourplaner.model.Tour</li>
 | 
					<li>tourplaner.object.Tour</li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
</li>
 | 
					</li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
<html lang="de">
 | 
					<html lang="de">
 | 
				
			||||||
<head>
 | 
					<head>
 | 
				
			||||||
<!-- Generated by javadoc (11.0.9) on Thu Feb 25 13:07:23 CET 2021 -->
 | 
					<!-- Generated by javadoc (11.0.9) on Thu Feb 25 13:07:23 CET 2021 -->
 | 
				
			||||||
<title>tourplaner.model</title>
 | 
					<title>tourplaner.object</title>
 | 
				
			||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | 
					<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | 
				
			||||||
<meta name="dc.created" content="2021-02-25">
 | 
					<meta name="dc.created" content="2021-02-25">
 | 
				
			||||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
 | 
					<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
 | 
				
			||||||
@@ -93,7 +93,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
</header>
 | 
					</header>
 | 
				
			||||||
<main role="main">
 | 
					<main role="main">
 | 
				
			||||||
<div class="header">
 | 
					<div class="header">
 | 
				
			||||||
<h1 title="Package" class="title">Package tourplaner.model</h1>
 | 
					<h1 title="Package" class="title">Package tourplaner.object</h1>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
<div class="contentContainer">
 | 
					<div class="contentContainer">
 | 
				
			||||||
<ul class="blockList">
 | 
					<ul class="blockList">
 | 
				
			||||||
@@ -106,7 +106,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
</tr>
 | 
					</tr>
 | 
				
			||||||
<tbody>
 | 
					<tbody>
 | 
				
			||||||
<tr class="altColor">
 | 
					<tr class="altColor">
 | 
				
			||||||
<th class="colFirst" scope="row"><a href="Tour.html" title="class in tourplaner.model">Tour</a></th>
 | 
					<th class="colFirst" scope="row"><a href="Tour.html" title="class in tourplaner.object">Tour</a></th>
 | 
				
			||||||
<td class="colLast">
 | 
					<td class="colLast">
 | 
				
			||||||
<div class="block">Model einer Tour</div>
 | 
					<div class="block">Model einer Tour</div>
 | 
				
			||||||
</td>
 | 
					</td>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
<html lang="de">
 | 
					<html lang="de">
 | 
				
			||||||
<head>
 | 
					<head>
 | 
				
			||||||
<!-- Generated by javadoc (11.0.9) on Thu Feb 25 13:07:23 CET 2021 -->
 | 
					<!-- Generated by javadoc (11.0.9) on Thu Feb 25 13:07:23 CET 2021 -->
 | 
				
			||||||
<title>tourplaner.model Class Hierarchy</title>
 | 
					<title>tourplaner.object Class Hierarchy</title>
 | 
				
			||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | 
					<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | 
				
			||||||
<meta name="dc.created" content="2021-02-25">
 | 
					<meta name="dc.created" content="2021-02-25">
 | 
				
			||||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
 | 
					<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
 | 
				
			||||||
@@ -93,7 +93,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
</header>
 | 
					</header>
 | 
				
			||||||
<main role="main">
 | 
					<main role="main">
 | 
				
			||||||
<div class="header">
 | 
					<div class="header">
 | 
				
			||||||
<h1 class="title">Hierarchy For Package tourplaner.model</h1>
 | 
					<h1 class="title">Hierarchy For Package tourplaner.object</h1>
 | 
				
			||||||
<span class="packageHierarchyLabel">Package Hierarchies:</span>
 | 
					<span class="packageHierarchyLabel">Package Hierarchies:</span>
 | 
				
			||||||
<ul class="horizontal">
 | 
					<ul class="horizontal">
 | 
				
			||||||
<li><a href="../../overview-tree.html">All Packages</a></li>
 | 
					<li><a href="../../overview-tree.html">All Packages</a></li>
 | 
				
			||||||
@@ -105,7 +105,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
 | 
				
			|||||||
<ul>
 | 
					<ul>
 | 
				
			||||||
<li class="circle">java.lang.Object
 | 
					<li class="circle">java.lang.Object
 | 
				
			||||||
<ul>
 | 
					<ul>
 | 
				
			||||||
<li class="circle">tourplaner.model.<a href="Tour.html" title="class in tourplaner.model"><span class="typeNameLink">Tour</span></a></li>
 | 
					<li class="circle">tourplaner.object.<a href="Tour.html" title="class in tourplaner.object"><span class="typeNameLink">Tour</span></a></li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
</li>
 | 
					</li>
 | 
				
			||||||
</ul>
 | 
					</ul>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										62
									
								
								langde.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								langde.ini
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
				
			|||||||
 | 
					[langde]
 | 
				
			||||||
 | 
					achtung = ACHTUNG
 | 
				
			||||||
 | 
					openbrowsererror = TourplanerController -> Browser:
 | 
				
			||||||
 | 
					browserexception = Browser Exception
 | 
				
			||||||
 | 
					browserexceptionmsg = Error beim öffnen des Browsers
 | 
				
			||||||
 | 
					suchfeldleer = Suchfeld ist leer!
 | 
				
			||||||
 | 
					suchtextzuerst = Bitte zuerst den Suchtext in das Suchfeld eingeben!
 | 
				
			||||||
 | 
					keinetourselected = Keine Tour ausgewählt!
 | 
				
			||||||
 | 
					tournametitle = Tourname
 | 
				
			||||||
 | 
					tournameheader = Bitte geben Sie den Namen der Tour an!
 | 
				
			||||||
 | 
					tournamemsg = Name:
 | 
				
			||||||
 | 
					namevergebenheader = Name bereits vergeben!
 | 
				
			||||||
 | 
					namevergebenmsg1 = Der Name '
 | 
				
			||||||
 | 
					namevergebenmsg2 = ' ist bereits vergeben, bitte verwenden Sie einen andern!
 | 
				
			||||||
 | 
					startpunkttitle = Tour Startpunkt
 | 
				
			||||||
 | 
					startpunktheader = Bitte geben Sie den Startpunkt der Tour an!
 | 
				
			||||||
 | 
					startpunktmsg = Startpunkt:
 | 
				
			||||||
 | 
					zielpunkttitle = Tour zielpunkt
 | 
				
			||||||
 | 
					zielpunktheader = Bitte geben Sie den Zielpunkt der Tour an!
 | 
				
			||||||
 | 
					zielpunktmsg = Zielpunkt:
 | 
				
			||||||
 | 
					deltournoselect = ViewModel -> DelTour
 | 
				
			||||||
 | 
					deltournoselectmsg = Bitte wählen Sie zuerst eine Tour aus, bevor Sie auf löschen klicken!
 | 
				
			||||||
 | 
					exceptionstackheader = Exception stacktrace:
 | 
				
			||||||
 | 
					keinelogsvorhanden = Fügen Sie erst ein Log hinzu um es anzuzeigen!
 | 
				
			||||||
 | 
					datum = Datum
 | 
				
			||||||
 | 
					dauer = Dauer
 | 
				
			||||||
 | 
					strecke = Strecke
 | 
				
			||||||
 | 
					streckemsg = Strecke des Logeintrages
 | 
				
			||||||
 | 
					dauermsg = Dauer des Logeintrages
 | 
				
			||||||
 | 
					doppelpunkt = :
 | 
				
			||||||
 | 
					fktnichtimplementiert = Diese Funktion ist noch nicht Implementiert
 | 
				
			||||||
 | 
					vergessenodernochnichtsoweit = Entweder hat DerGeorg darauf vergessen oder ist noch nicht so weit gekommen um das zu machen!
 | 
				
			||||||
 | 
					logtournotselectedmsg = Bitte wählen Sie zuerst eine Tour aus, bevor sie einen log Eintrag erstellen!
 | 
				
			||||||
 | 
					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.
 | 
				
			||||||
 | 
					tourreportvon = Tour Report von ->
 | 
				
			||||||
 | 
					tourplanervon = Tourplaner by DerGeorg
 | 
				
			||||||
 | 
					reportkeywords = Tourplaner, Tour, Report
 | 
				
			||||||
 | 
					tourplaner = Tourplaner"
 | 
				
			||||||
 | 
					tour = Tour
 | 
				
			||||||
 | 
					reportvon = Report erstellt von:
 | 
				
			||||||
 | 
					reportstart = Startpunkt der Tour:
 | 
				
			||||||
 | 
					reportziel = Zielpunkt der Tour:
 | 
				
			||||||
 | 
					reportdauercal = Berechnete Dauer der Tour:
 | 
				
			||||||
 | 
					reportstreckecal = Berechnete Strecke der Tour:
 | 
				
			||||||
 | 
					logs = Logs
 | 
				
			||||||
 | 
					countlog = Anzahl der Logeinträge:
 | 
				
			||||||
 | 
					logvom = Log vom:
 | 
				
			||||||
 | 
					logdauer = Dauer:
 | 
				
			||||||
 | 
					logpause = Davon Pause:
 | 
				
			||||||
 | 
					loggegangen = Davon gegangen:
 | 
				
			||||||
 | 
					logavg = Berechnete Durchschnittliche Geschwindigkeit:
 | 
				
			||||||
 | 
					logstrecke = Entfernung:
 | 
				
			||||||
 | 
					loghight = Höhenmeter:
 | 
				
			||||||
 | 
					logbemerkung = Bemerkung:
 | 
				
			||||||
							
								
								
									
										
											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,6 +0,0 @@
 | 
				
			|||||||
Tour planer Startet!
 | 
					 | 
				
			||||||
Tour planer Startet!
 | 
					 | 
				
			||||||
App started
 | 
					 | 
				
			||||||
2021-02-26 15:59:44 INFO  TourPlaner:15 - App started
 | 
					 | 
				
			||||||
2021-02-26 16:06:01 FATAL TourPlanerConfig:27 - C:\Users\georg\OneDrive\FH\Swe\Tourplaner\conf.ini (Das System kann die angegebene Datei nicht finden)
 | 
					 | 
				
			||||||
2021-02-26 16:08:31 INFO  TourPlaner:15 - Tour Planer App gestartet
 | 
					 | 
				
			||||||
@@ -1,16 +0,0 @@
 | 
				
			|||||||
# Root logger option
 | 
					 | 
				
			||||||
log4j.rootLogger=DEBUG, stdout, file
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Redirect log messages to console
 | 
					 | 
				
			||||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 | 
					 | 
				
			||||||
log4j.appender.stdout.Target=System.out
 | 
					 | 
				
			||||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 | 
					 | 
				
			||||||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Redirect log messages to a log file, support file rolling.
 | 
					 | 
				
			||||||
log4j.appender.file=org.apache.log4j.RollingFileAppender
 | 
					 | 
				
			||||||
log4j.appender.file.File=log/log4j/log.out
 | 
					 | 
				
			||||||
log4j.appender.file.MaxFileSize=5MB
 | 
					 | 
				
			||||||
log4j.appender.file.MaxBackupIndex=10
 | 
					 | 
				
			||||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
 | 
					 | 
				
			||||||
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
 | 
					 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,237 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<!--
 | 
					 | 
				
			||||||
  Copyright (c) 2015, 2019, Gluon and/or its affiliates.
 | 
					 | 
				
			||||||
  All rights reserved. Use is subject to license terms.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  This file is available and licensed under the following license:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  Redistribution and use in source and binary forms, with or without
 | 
					 | 
				
			||||||
  modification, are permitted provided that the following conditions
 | 
					 | 
				
			||||||
  are met:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - Redistributions of source code must retain the above copyright
 | 
					 | 
				
			||||||
    notice, this list of conditions and the following disclaimer.
 | 
					 | 
				
			||||||
  - Redistributions in binary form must reproduce the above copyright
 | 
					 | 
				
			||||||
    notice, this list of conditions and the following disclaimer in
 | 
					 | 
				
			||||||
    the documentation and/or other materials provided with the distribution.
 | 
					 | 
				
			||||||
  - Neither the name of Oracle Corporation nor the names of its
 | 
					 | 
				
			||||||
    contributors may be used to endorse or promote products derived
 | 
					 | 
				
			||||||
    from this software without specific prior written permission.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 | 
					 | 
				
			||||||
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 | 
					 | 
				
			||||||
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 | 
					 | 
				
			||||||
  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 | 
					 | 
				
			||||||
  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 | 
					 | 
				
			||||||
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 | 
					 | 
				
			||||||
  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 | 
					 | 
				
			||||||
  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 | 
					 | 
				
			||||||
  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
					 | 
				
			||||||
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 | 
					 | 
				
			||||||
  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.SeparatorMenuItem?>
 | 
					 | 
				
			||||||
<?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?>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1">
 | 
					 | 
				
			||||||
  <children>
 | 
					 | 
				
			||||||
    <MenuBar VBox.vgrow="NEVER">
 | 
					 | 
				
			||||||
      <menus>
 | 
					 | 
				
			||||||
        <Menu mnemonicParsing="false" text="File">
 | 
					 | 
				
			||||||
          <items>
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="New" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Open…" />
 | 
					 | 
				
			||||||
            <Menu mnemonicParsing="false" text="Open Recent" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Close" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Save" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Save As…" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Revert" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Preferences…" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Quit" />
 | 
					 | 
				
			||||||
          </items>
 | 
					 | 
				
			||||||
        </Menu>
 | 
					 | 
				
			||||||
        <Menu mnemonicParsing="false" text="Edit">
 | 
					 | 
				
			||||||
          <items>
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Undo" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Redo" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Cut" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Copy" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Paste" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Delete" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Select All" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Unselect All" />
 | 
					 | 
				
			||||||
          </items>
 | 
					 | 
				
			||||||
        </Menu>
 | 
					 | 
				
			||||||
            <Menu mnemonicParsing="false" text="Options">
 | 
					 | 
				
			||||||
               <items>
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Undo" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Redo" />
 | 
					 | 
				
			||||||
                  <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Cut" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Copy" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Paste" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Delete" />
 | 
					 | 
				
			||||||
                  <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Select All" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Unselect All" />
 | 
					 | 
				
			||||||
               </items>
 | 
					 | 
				
			||||||
            </Menu>
 | 
					 | 
				
			||||||
        <Menu mnemonicParsing="false" text="Help">
 | 
					 | 
				
			||||||
          <items>
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="About MyHelloApp" />
 | 
					 | 
				
			||||||
          </items>
 | 
					 | 
				
			||||||
        </Menu>
 | 
					 | 
				
			||||||
      </menus>
 | 
					 | 
				
			||||||
    </MenuBar>
 | 
					 | 
				
			||||||
      <HBox id="HBox" alignment="CENTER_LEFT" layoutX="10.0" layoutY="588.0" spacing="5.0">
 | 
					 | 
				
			||||||
         <children>
 | 
					 | 
				
			||||||
            <AnchorPane prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS">
 | 
					 | 
				
			||||||
               <children>
 | 
					 | 
				
			||||||
                  <Button layoutX="58.0" mnemonicParsing="false" text="+" />
 | 
					 | 
				
			||||||
                  <Label layoutX="14.0" layoutY="4.0" text="Tours" />
 | 
					 | 
				
			||||||
                  <Button layoutX="89.0" mnemonicParsing="false" text="-" />
 | 
					 | 
				
			||||||
               </children></AnchorPane>
 | 
					 | 
				
			||||||
            <TextField text="Suche...." />
 | 
					 | 
				
			||||||
            <Button mnemonicParsing="false" text="Suchen" />
 | 
					 | 
				
			||||||
         </children>
 | 
					 | 
				
			||||||
         <padding>
 | 
					 | 
				
			||||||
            <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">
 | 
					 | 
				
			||||||
      <items>
 | 
					 | 
				
			||||||
            <AnchorPane prefHeight="520.0" prefWidth="239.0">
 | 
					 | 
				
			||||||
               <children>
 | 
					 | 
				
			||||||
                  <ListView layoutX="-1.0" prefHeight="520.0" prefWidth="190.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                     <padding>
 | 
					 | 
				
			||||||
                        <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
 | 
					 | 
				
			||||||
                     </padding>
 | 
					 | 
				
			||||||
                  </ListView>
 | 
					 | 
				
			||||||
               </children>
 | 
					 | 
				
			||||||
            </AnchorPane>
 | 
					 | 
				
			||||||
            <SplitPane dividerPositions="0.5" orientation="VERTICAL" prefHeight="496.0" prefWidth="620.0">
 | 
					 | 
				
			||||||
               <items>
 | 
					 | 
				
			||||||
                  <VBox prefHeight="200.0" prefWidth="100.0">
 | 
					 | 
				
			||||||
                     <children>
 | 
					 | 
				
			||||||
                        <AnchorPane prefHeight="51.0" prefWidth="676.0">
 | 
					 | 
				
			||||||
                           <children>
 | 
					 | 
				
			||||||
                              <HBox id="HBox" alignment="CENTER_LEFT" prefHeight="7.0" prefWidth="44.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                 <children>
 | 
					 | 
				
			||||||
                                    <Label text="Title:">
 | 
					 | 
				
			||||||
                                       <HBox.margin>
 | 
					 | 
				
			||||||
                                          <Insets left="10.0" />
 | 
					 | 
				
			||||||
                                       </HBox.margin>
 | 
					 | 
				
			||||||
                                    </Label>
 | 
					 | 
				
			||||||
                                    <TextField />
 | 
					 | 
				
			||||||
                                 </children>
 | 
					 | 
				
			||||||
                              </HBox>
 | 
					 | 
				
			||||||
                           </children>
 | 
					 | 
				
			||||||
                        </AnchorPane>
 | 
					 | 
				
			||||||
                        <AnchorPane prefHeight="200.0" prefWidth="200.0">
 | 
					 | 
				
			||||||
                           <children>
 | 
					 | 
				
			||||||
                              <TabPane layoutX="1.0" layoutY="69.0" prefHeight="225.0" prefWidth="702.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="-67.0" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                 <tabs>
 | 
					 | 
				
			||||||
                                    <Tab text="Route" />
 | 
					 | 
				
			||||||
                                    <Tab text="Description">
 | 
					 | 
				
			||||||
                                       <content>
 | 
					 | 
				
			||||||
                                          <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
 | 
					 | 
				
			||||||
                                       </content>
 | 
					 | 
				
			||||||
                                    </Tab>
 | 
					 | 
				
			||||||
                                 </tabs>
 | 
					 | 
				
			||||||
                              </TabPane>
 | 
					 | 
				
			||||||
                           </children>
 | 
					 | 
				
			||||||
                        </AnchorPane>
 | 
					 | 
				
			||||||
                     </children>
 | 
					 | 
				
			||||||
                  </VBox>
 | 
					 | 
				
			||||||
                  <AnchorPane prefHeight="200.0" prefWidth="200.0">
 | 
					 | 
				
			||||||
                     <children>
 | 
					 | 
				
			||||||
                        <VBox prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                           <children>
 | 
					 | 
				
			||||||
                              <AnchorPane prefHeight="51.0" prefWidth="676.0">
 | 
					 | 
				
			||||||
                                 <children>
 | 
					 | 
				
			||||||
                                    <HBox id="HBox" alignment="CENTER_LEFT" prefHeight="38.0" prefWidth="702.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                       <children>
 | 
					 | 
				
			||||||
                                          <Label text="Logs:">
 | 
					 | 
				
			||||||
                                             <HBox.margin>
 | 
					 | 
				
			||||||
                                                <Insets left="10.0" />
 | 
					 | 
				
			||||||
                                             </HBox.margin>
 | 
					 | 
				
			||||||
                                          </Label>
 | 
					 | 
				
			||||||
                                          <Button mnemonicParsing="false" text="+" textAlignment="CENTER">
 | 
					 | 
				
			||||||
                                             <HBox.margin>
 | 
					 | 
				
			||||||
                                                <Insets />
 | 
					 | 
				
			||||||
                                             </HBox.margin>
 | 
					 | 
				
			||||||
                                          </Button>
 | 
					 | 
				
			||||||
                                          <Button mnemonicParsing="false" prefWidth="21.0" text="-" textAlignment="CENTER">
 | 
					 | 
				
			||||||
                                             <HBox.margin>
 | 
					 | 
				
			||||||
                                                <Insets right="10.0" />
 | 
					 | 
				
			||||||
                                             </HBox.margin>
 | 
					 | 
				
			||||||
                                          </Button>
 | 
					 | 
				
			||||||
                                       </children>
 | 
					 | 
				
			||||||
                                       <padding>
 | 
					 | 
				
			||||||
                                          <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
 | 
					 | 
				
			||||||
                                       </padding>
 | 
					 | 
				
			||||||
                                    </HBox>
 | 
					 | 
				
			||||||
                                 </children>
 | 
					 | 
				
			||||||
                              </AnchorPane>
 | 
					 | 
				
			||||||
                              <AnchorPane prefHeight="200.0" prefWidth="200.0">
 | 
					 | 
				
			||||||
                                 <children>
 | 
					 | 
				
			||||||
                                    <TableView prefHeight="209.0" prefWidth="702.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                      <columns>
 | 
					 | 
				
			||||||
                                        <TableColumn prefWidth="238.0" text="Date" />
 | 
					 | 
				
			||||||
                                        <TableColumn prefWidth="223.0" text="Duration" />
 | 
					 | 
				
			||||||
                                          <TableColumn prefWidth="240.0" text="Distance" />
 | 
					 | 
				
			||||||
                                      </columns>
 | 
					 | 
				
			||||||
                                    </TableView>
 | 
					 | 
				
			||||||
                                 </children>
 | 
					 | 
				
			||||||
                              </AnchorPane>
 | 
					 | 
				
			||||||
                           </children>
 | 
					 | 
				
			||||||
                        </VBox>
 | 
					 | 
				
			||||||
                     </children>
 | 
					 | 
				
			||||||
                  </AnchorPane>
 | 
					 | 
				
			||||||
               </items>
 | 
					 | 
				
			||||||
            </SplitPane>
 | 
					 | 
				
			||||||
      </items>
 | 
					 | 
				
			||||||
    </SplitPane>
 | 
					 | 
				
			||||||
    <HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER">
 | 
					 | 
				
			||||||
      <children>
 | 
					 | 
				
			||||||
        <Label maxHeight="1.7976931348623157E308" maxWidth="-1.0" text="Left status" HBox.hgrow="ALWAYS">
 | 
					 | 
				
			||||||
          <font>
 | 
					 | 
				
			||||||
            <Font size="11.0" fx:id="x3" />
 | 
					 | 
				
			||||||
          </font>
 | 
					 | 
				
			||||||
          <textFill>
 | 
					 | 
				
			||||||
            <Color red="0.625" green="0.625" blue="0.625" fx:id="x4" />
 | 
					 | 
				
			||||||
          </textFill>
 | 
					 | 
				
			||||||
        </Label>
 | 
					 | 
				
			||||||
        <AnchorPane prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS" />
 | 
					 | 
				
			||||||
        <Label font="$x3" maxWidth="-1.0" text="Right status" textFill="$x4" HBox.hgrow="NEVER" />
 | 
					 | 
				
			||||||
      </children>
 | 
					 | 
				
			||||||
      <padding>
 | 
					 | 
				
			||||||
        <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
 | 
					 | 
				
			||||||
      </padding>
 | 
					 | 
				
			||||||
    </HBox>
 | 
					 | 
				
			||||||
  </children>
 | 
					 | 
				
			||||||
</VBox>
 | 
					 | 
				
			||||||
@@ -1,19 +1,31 @@
 | 
				
			|||||||
package tourplaner;
 | 
					package tourplaner;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javafx.application.Application;
 | 
					import javafx.application.Application;
 | 
				
			||||||
 | 
					import javafx.fxml.FXMLLoader;
 | 
				
			||||||
 | 
					import javafx.scene.Parent;
 | 
				
			||||||
 | 
					import javafx.scene.Scene;
 | 
				
			||||||
 | 
					import javafx.scene.image.Image;
 | 
				
			||||||
import javafx.stage.Stage;
 | 
					import javafx.stage.Stage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import tourplaner.business.ConfigHelper;
 | 
				
			||||||
import tourplaner.business.TourPlaner;
 | 
					import tourplaner.business.TourPlaner;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class Main extends Application {
 | 
					public class Main extends Application {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void main(String[] args) throws Exception {
 | 
					    public static void main(String[] args){
 | 
				
			||||||
        launch(args);
 | 
					        launch(args);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void start(Stage primaryStage) throws Exception{
 | 
					    public void start(Stage primaryStage) throws IOException {
 | 
				
			||||||
        TourPlaner tourplaner = new TourPlaner(primaryStage);
 | 
					        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")));
 | 
				
			||||||
 | 
					        TourPlaner.init();
 | 
				
			||||||
 | 
					        primaryStage.setScene(new Scene(root, 1500, 1000));
 | 
				
			||||||
 | 
					        primaryStage.show();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,34 +5,110 @@ import org.ini4j.Wini;
 | 
				
			|||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
import java.io.IOException;
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Dient dem ein und auslesen von .ini Dateien
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
public class ConfigHelper {
 | 
					public class ConfigHelper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static String standartConfig = "conf.ini";
 | 
					    public static String standartConfig = "conf.ini"; // Config.ini befindet sich im Root Verzeichnis
 | 
				
			||||||
 | 
					    public static String standartLangDe = "langde.ini"; // langde.ini befindet sich im Root Verzeichnis
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
    public static int getIniInt(String filename, String sectionName, String optionName) throws IOException {
 | 
					     * Liest einen Int aus der Config aus
 | 
				
			||||||
        Wini ini = new Wini(new File(filename));
 | 
					     * @param filename Speicherort
 | 
				
			||||||
 | 
					     * @param sectionName Sections Name
 | 
				
			||||||
 | 
					     * @param optionName Options Name
 | 
				
			||||||
 | 
					     * @return Den angeforderten String
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static int getIniInt(String filename, String sectionName, String optionName){
 | 
				
			||||||
 | 
					        Wini ini = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            ini = new Wini(new File(filename));
 | 
				
			||||||
 | 
					        } catch (IOException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        assert ini != null;
 | 
				
			||||||
        return ini.get(sectionName, optionName, int.class);
 | 
					        return ini.get(sectionName, optionName, int.class);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static String getIniString(String filename, String sectionName, String optionName) throws IOException {
 | 
					    /**
 | 
				
			||||||
        Wini ini = new Wini(new File(filename));
 | 
					     * Liest einen String aus der Config aus
 | 
				
			||||||
 | 
					     * @param filename Speicherort
 | 
				
			||||||
 | 
					     * @param sectionName Sections Name
 | 
				
			||||||
 | 
					     * @param optionName Options Name
 | 
				
			||||||
 | 
					     * @return Den angeforderten String
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String getIniString(String filename, String sectionName, String optionName){
 | 
				
			||||||
 | 
					        Wini ini = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            ini = new Wini(new File(filename));
 | 
				
			||||||
 | 
					        } catch (IOException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        assert ini != null;
 | 
				
			||||||
        return ini.get(sectionName, optionName, String.class);
 | 
					        return ini.get(sectionName, optionName, String.class);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void setIniString(String filename, String sectionName, String optionName, String value) throws IOException {
 | 
					    /**
 | 
				
			||||||
        Wini ini = new Wini(new File(filename));
 | 
					     * Liest einen String aus der Lang datei aus
 | 
				
			||||||
        ini.put(sectionName, optionName, value);
 | 
					     * Die Sprache wird im config file umgestellt
 | 
				
			||||||
        ini.store();
 | 
					     * @param optionName Options Name
 | 
				
			||||||
 | 
					     * @return Den angeforderten String
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String getLangIniString(String optionName){
 | 
				
			||||||
 | 
					        return ConfigHelper.getIniString(ConfigHelper.getStandartLangde(), ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "lang", "lang"),optionName);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void setIniInt(String filename, String sectionName, String optionName, int value) throws IOException {
 | 
					    /**
 | 
				
			||||||
        Wini ini = new Wini(new File(filename));
 | 
					     * Setzt ein String in der Config
 | 
				
			||||||
        ini.put(sectionName, optionName, value);
 | 
					     * @param filename Speicherort
 | 
				
			||||||
        ini.store();
 | 
					     * @param sectionName Sections Name
 | 
				
			||||||
 | 
					     * @param optionName Options Name
 | 
				
			||||||
 | 
					     * @param value Wert der eingetragen werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void setIniString(String filename, String sectionName, String optionName, String value) {
 | 
				
			||||||
 | 
					        Wini ini = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            ini = new Wini(new File(filename));
 | 
				
			||||||
 | 
					            ini.put(sectionName, optionName, value);
 | 
				
			||||||
 | 
					            ini.store();
 | 
				
			||||||
 | 
					        } catch (IOException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Setzt ein int in der Config
 | 
				
			||||||
 | 
					     * @param filename Speicherort
 | 
				
			||||||
 | 
					     * @param sectionName Sections Name
 | 
				
			||||||
 | 
					     * @param optionName Options Name
 | 
				
			||||||
 | 
					     * @param value Wert der eingetragen werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void setIniInt(String filename, String sectionName, String optionName, int value){
 | 
				
			||||||
 | 
					        Wini ini = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            ini = new Wini(new File(filename));
 | 
				
			||||||
 | 
					            ini.put(sectionName, optionName, value);
 | 
				
			||||||
 | 
					            ini.store();
 | 
				
			||||||
 | 
					        } catch (IOException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Gibt den namen des standard Config file zurück
 | 
				
			||||||
 | 
					     * @return Name des standard config files
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    public static String getStandartConfig() {
 | 
					    public static String getStandartConfig() {
 | 
				
			||||||
        return standartConfig;
 | 
					        return standartConfig;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Gibt den namen des standard langde file zurück
 | 
				
			||||||
 | 
					     * @return Name des standard langde files
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String getStandartLangde() {
 | 
				
			||||||
 | 
					        return standartLangDe;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										89
									
								
								src/tourplaner/business/DirectionMap.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								src/tourplaner/business/DirectionMap.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,89 @@
 | 
				
			|||||||
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Zuständig für das besorgen der Map für die UI und PDF-Reports und für die Berechneten infos der Tour (Dauer, Strecke)
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class DirectionMap {
 | 
				
			||||||
 | 
					    private double dauer, strecke;
 | 
				
			||||||
 | 
					    private String start, end, tourname, file, filepdf;
 | 
				
			||||||
 | 
					    private Image map, mappdf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt die Map als image und alle Daten zur berechneten Route
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param start Startpunkt
 | 
				
			||||||
 | 
					     * @param ende Endpunkt
 | 
				
			||||||
 | 
					     * @param tourname Name der Aktuellen Tour
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim Image der Map
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public DirectionMap (String start, String ende, String tourname) throws IOException {
 | 
				
			||||||
 | 
					        this.map = getMap(start, ende, ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "size"));
 | 
				
			||||||
 | 
					        this.mappdf = getMap(start, ende, ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "sizePdf"));
 | 
				
			||||||
 | 
					        this.start = start;
 | 
				
			||||||
 | 
					        this.end = ende;
 | 
				
			||||||
 | 
					        this.tourname = tourname;
 | 
				
			||||||
 | 
					        this.file = ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "path") + this.tourname + ".jpg";
 | 
				
			||||||
 | 
					        this.filepdf = ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "path") + this.tourname + "_pdf.jpg";
 | 
				
			||||||
 | 
					        FileHelper.saveImage(this.map, "jpg", new File(this.file));
 | 
				
			||||||
 | 
					        FileHelper.saveImage(this.mappdf, "jpg", new File(this.filepdf));
 | 
				
			||||||
 | 
					        getDirections(start, ende);
 | 
				
			||||||
 | 
					        FileHelper.openDefault(file);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get berechnete Dauer in Minuten
 | 
				
			||||||
 | 
					     * @return Berechnete Dauer der Tour
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public double getDauer() {
 | 
				
			||||||
 | 
					        return dauer;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get berechnete Strecke
 | 
				
			||||||
 | 
					     * @return Berechnete Strecke der Tour
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public double getStrecke() {
 | 
				
			||||||
 | 
					        return strecke;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Downloadet die Map von Mapquest
 | 
				
			||||||
 | 
					     * @param start Startpunkt
 | 
				
			||||||
 | 
					     * @param ende Endpunkt
 | 
				
			||||||
 | 
					     * @return Image von der Map
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim Get der Map
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private Image getMap(String start, String ende, String size) throws IOException {
 | 
				
			||||||
 | 
					        return HttpHelper.httpGetImage("https://www.mapquestapi.com/staticmap/v5/map?start="+start+"&end="+ende+"&size="+size+"&key="+ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "key"));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Besorgt die Infos der Tour von Mapquest Directions
 | 
				
			||||||
 | 
					     * @param start Start der Tour
 | 
				
			||||||
 | 
					     * @param ende Ende der Tour
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim besorgen der infos über die Tour
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private void getDirections(String start, String ende) throws IOException {
 | 
				
			||||||
 | 
					        String json = HttpHelper.httpGetJsonString("https://www.mapquestapi.com/directions/v2/route?key="+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "key")+"&from="+start+"&to="+ende+"&outFormat=json&ambiguities=ignore&routeType=fastest&doReverseGeocode=false&enhancedNarrative=false&avoidTimedConditions=false");
 | 
				
			||||||
 | 
					        this.strecke = JsonHelper.getDoubleFromJson(json, "distance");
 | 
				
			||||||
 | 
					        this.dauer = formatetTimeToMinutes(JsonHelper.getStingFromJson(json, "formattedTime"));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Formatet time HH:MM:SS in Minuten umwandeln
 | 
				
			||||||
 | 
					     * @param formatetTime Formatet time HH:MM:SS
 | 
				
			||||||
 | 
					     * @return Zeit in Minuten
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private double formatetTimeToMinutes(String formatetTime){
 | 
				
			||||||
 | 
					        double minutes = 0;
 | 
				
			||||||
 | 
					        String[] result = formatetTime.split(":");
 | 
				
			||||||
 | 
					        minutes += Double.parseDouble(result[0]) * 60;
 | 
				
			||||||
 | 
					        minutes += Double.parseDouble(result[1]);
 | 
				
			||||||
 | 
					        minutes += Double.parseDouble(result[2]) / 60;
 | 
				
			||||||
 | 
					        return minutes;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										55
									
								
								src/tourplaner/business/Exporter.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								src/tourplaner/business/Exporter.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,55 @@
 | 
				
			|||||||
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import tourplaner.data.DbConnect;
 | 
				
			||||||
 | 
					import tourplaner.object.Log;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Ist für das importieren und Exportieren der Daten zuständig
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Exporter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private ArrayList<Tour> touren;
 | 
				
			||||||
 | 
					    private String path;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt den Exporter mit dem gegebenen Path
 | 
				
			||||||
 | 
					     * @param path Gegebener Path
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Exporter(String path) {
 | 
				
			||||||
 | 
					        this.path = path;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Führt den Export aus -> Holt daten, erstellt file
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim File erstellen
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void doExport() throws IOException {
 | 
				
			||||||
 | 
					        ArrayList<Tour> data = new DbConnect().getAllTouren();
 | 
				
			||||||
 | 
					        FileWriter fileWriter = new FileWriter(path + ".json");
 | 
				
			||||||
 | 
					        JsonHelper.getJsonFromObj(data, fileWriter);
 | 
				
			||||||
 | 
					        BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
 | 
				
			||||||
 | 
					        bufferedWriter.close();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Führt den Imput aus -> File holen, Daten in db erstellen
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim File öffnen
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void doImport() throws IOException {
 | 
				
			||||||
 | 
					        this.touren = JsonHelper.getTourenFromJson(new FileReader(this.path));
 | 
				
			||||||
 | 
					        DbConnect dbConnect = new DbConnect();
 | 
				
			||||||
 | 
					        dbConnect.delAllData();
 | 
				
			||||||
 | 
					        for (Tour tour:this.touren) {
 | 
				
			||||||
 | 
					            new DirectionMap(tour.getStart(), tour.getZiel(), tour.getName());
 | 
				
			||||||
 | 
					            dbConnect.addTour(tour);
 | 
				
			||||||
 | 
					            ArrayList<Log> logs = tour.getLogs();
 | 
				
			||||||
 | 
					            for (Log log:logs) {
 | 
				
			||||||
 | 
					                dbConnect.addLog(tour.getName(), log);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										62
									
								
								src/tourplaner/business/FileHelper.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								src/tourplaner/business/FileHelper.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
				
			|||||||
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.imageio.ImageIO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.awt.image.BufferedImage;
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class FileHelper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet ein File mit dem Standart Program
 | 
				
			||||||
 | 
					     * @param f File Path als string
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void openDefault(String f){
 | 
				
			||||||
 | 
					        // A reference to a text file
 | 
				
			||||||
 | 
					        File file = new File(f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            Desktop desktop = Desktop.getDesktop();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // Open a file using the default program for the file type. In the example
 | 
				
			||||||
 | 
					            // we will launch a default registered program to open a text file. For
 | 
				
			||||||
 | 
					            // example on Windows operating system this call might launch a notepad.exe
 | 
				
			||||||
 | 
					            // to open the file.
 | 
				
			||||||
 | 
					            desktop.open(file);
 | 
				
			||||||
 | 
					        } catch (IOException e) {
 | 
				
			||||||
 | 
					            e.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Speichert ein Image
 | 
				
			||||||
 | 
					     * @param img Das zu speichernde Bild
 | 
				
			||||||
 | 
					     * @param type Dateityp z.b. jpg
 | 
				
			||||||
 | 
					     * @param file Wo die datei zu speichern ist
 | 
				
			||||||
 | 
					     * @throws IOException
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void saveImage(Image img, String type, File file) throws IOException {
 | 
				
			||||||
 | 
					        ImageIO.write(ImgHelper.toBufferedImage(img), type, file);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt ein image von einem File
 | 
				
			||||||
 | 
					     * @param file File mit dem image
 | 
				
			||||||
 | 
					     * @return Das buffered image
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim öffnen des bildes
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static BufferedImage getImage(File file) throws IOException {
 | 
				
			||||||
 | 
					        return ImageIO.read(file);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Löscht ein File
 | 
				
			||||||
 | 
					     * @param file File das zu löschen ist
 | 
				
			||||||
 | 
					      * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean delFile(File file){
 | 
				
			||||||
 | 
					        return file.delete();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										53
									
								
								src/tourplaner/business/HttpHelper.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								src/tourplaner/business/HttpHelper.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,53 @@
 | 
				
			|||||||
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.imageio.ImageIO;
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					import java.net.HttpURLConnection;
 | 
				
			||||||
 | 
					import java.net.URL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Http Hilfsfunktionen
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class HttpHelper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt ein Image von gegebener URL
 | 
				
			||||||
 | 
					     * @param url Url als Sting
 | 
				
			||||||
 | 
					     * @return Image von der Url
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim Bild holen
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static Image httpGetImage(String url) throws IOException {
 | 
				
			||||||
 | 
					        URL urls = new URL(url);
 | 
				
			||||||
 | 
					        return ImageIO.read(urls);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Http GET Json string vom Url string
 | 
				
			||||||
 | 
					     * @param url Url als String
 | 
				
			||||||
 | 
					     * @return Json als String
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim Json holen
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String httpGetJsonString(String url) throws IOException {
 | 
				
			||||||
 | 
					        HttpURLConnection con = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            var myurl = new URL(url);
 | 
				
			||||||
 | 
					            con = (HttpURLConnection) myurl.openConnection();
 | 
				
			||||||
 | 
					            con.setRequestMethod("GET");
 | 
				
			||||||
 | 
					            StringBuilder content;
 | 
				
			||||||
 | 
					            try (BufferedReader in = new BufferedReader(
 | 
				
			||||||
 | 
					                    new InputStreamReader(con.getInputStream()))) {
 | 
				
			||||||
 | 
					                String line;
 | 
				
			||||||
 | 
					                content = new StringBuilder();
 | 
				
			||||||
 | 
					                while ((line = in.readLine()) != null) {
 | 
				
			||||||
 | 
					                    content.append(line);
 | 
				
			||||||
 | 
					                    content.append(System.lineSeparator());
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return content.toString();
 | 
				
			||||||
 | 
					        } finally {
 | 
				
			||||||
 | 
					            assert con != null;
 | 
				
			||||||
 | 
					            con.disconnect();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										35
									
								
								src/tourplaner/business/ImgHelper.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								src/tourplaner/business/ImgHelper.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.awt.image.BufferedImage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Image Hilfsfunktionen
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class ImgHelper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Converts a given Image into a BufferedImage
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param img The Image to be converted
 | 
				
			||||||
 | 
					     * @return The converted BufferedImage
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static BufferedImage toBufferedImage(Image img)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if (img instanceof BufferedImage)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return (BufferedImage) img;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Create a buffered image with transparency
 | 
				
			||||||
 | 
					        BufferedImage bimage = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Draw the image on to the buffered image
 | 
				
			||||||
 | 
					        Graphics2D bGr = bimage.createGraphics();
 | 
				
			||||||
 | 
					        bGr.drawImage(img, 0, 0, null);
 | 
				
			||||||
 | 
					        bGr.dispose();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Return the buffered image
 | 
				
			||||||
 | 
					        return bimage;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										72
									
								
								src/tourplaner/business/JsonHelper.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								src/tourplaner/business/JsonHelper.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,72 @@
 | 
				
			|||||||
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.google.gson.Gson;
 | 
				
			||||||
 | 
					import com.google.gson.JsonObject;
 | 
				
			||||||
 | 
					import com.google.gson.reflect.TypeToken;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.FileReader;
 | 
				
			||||||
 | 
					import java.io.FileWriter;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Hilfsklasse für Json (Gson)
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class JsonHelper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * String aus json extrahieren
 | 
				
			||||||
 | 
					     * @param json Json als String
 | 
				
			||||||
 | 
					     * @param gets Eintrag im Json unter "route"
 | 
				
			||||||
 | 
					     * @return Gesammelter String
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String getStingFromJson(String json, String gets){
 | 
				
			||||||
 | 
					        return getJObj(json).get("route").getAsJsonObject().get(gets).getAsString();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Double aus json extrahieren
 | 
				
			||||||
 | 
					     * @param json Json als String
 | 
				
			||||||
 | 
					     * @param gets Eintrag im Json unter "route"
 | 
				
			||||||
 | 
					     * @return Gesammelter Double Wert
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static double getDoubleFromJson(String json, String gets){
 | 
				
			||||||
 | 
					        return getJObj(json).get("route").getAsJsonObject().get(gets).getAsDouble();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erzeugt ein Json aus einem Object
 | 
				
			||||||
 | 
					     * @param obj Das Objekt
 | 
				
			||||||
 | 
					     * @return Json des Objektes
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String getJsonFromObj(Object obj){
 | 
				
			||||||
 | 
					        return new Gson().toJson(obj);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erzeugt ein Json aus einem Object
 | 
				
			||||||
 | 
					     * @param obj Das Objekt
 | 
				
			||||||
 | 
					     * @param writer File in das geschrieben werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void getJsonFromObj(Object obj , FileWriter writer){
 | 
				
			||||||
 | 
					        new Gson().toJson(obj, writer);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Wandelt ein Json file in ein Data Objekt um
 | 
				
			||||||
 | 
					     * @param reader File aus dem gelesen wird
 | 
				
			||||||
 | 
					     * @return Data objekt das gelesen wurde
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static ArrayList<Tour> getTourenFromJson(FileReader reader){
 | 
				
			||||||
 | 
					        return new Gson().fromJson(reader, new TypeToken<ArrayList<Tour>>() {}.getType());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Json String to JsonObject
 | 
				
			||||||
 | 
					     * @param json Json string
 | 
				
			||||||
 | 
					     * @return Neues JsonObject aus String
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private static JsonObject getJObj(String json){
 | 
				
			||||||
 | 
					       return new Gson().fromJson(json, JsonObject.class);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -7,7 +7,7 @@ import org.apache.log4j.*;
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
public class LogHelper{
 | 
					public class LogHelper{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Logging in file und Console
 | 
					     * Log info in file und Console
 | 
				
			||||||
     * @param msg Nachricht in dem Log
 | 
					     * @param msg Nachricht in dem Log
 | 
				
			||||||
     * @param name Name des Log Eintrags
 | 
					     * @param name Name des Log Eintrags
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
@@ -15,20 +15,48 @@ public class LogHelper{
 | 
				
			|||||||
        getLog(name).info(msg);
 | 
					        getLog(name).info(msg);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Log info in file und Console
 | 
				
			||||||
 | 
					     * @param msg Nachricht in dem Log
 | 
				
			||||||
 | 
					     * @param name Name des Log Eintrags
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    public static void warn(String msg, String name){
 | 
					    public static void warn(String msg, String name){
 | 
				
			||||||
        getLog(name).warn(msg);
 | 
					        getLog(name).warn(msg);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Log info in file und Console
 | 
				
			||||||
 | 
					     * @param msg Nachricht in dem Log
 | 
				
			||||||
 | 
					     * @param name Name des Log Eintrags
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    public static void error(String msg, String name){
 | 
					    public static void error(String msg, String name){
 | 
				
			||||||
        getLog(name).error(msg);
 | 
					        getLog(name).error(msg);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Log info in file und Console
 | 
				
			||||||
 | 
					     * @param e Exception
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void error(Exception e){
 | 
				
			||||||
 | 
					        getLog(e.getClass().getName()).error(e.getMessage());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Log info in file und Console
 | 
				
			||||||
 | 
					     * @param msg Nachricht in dem Log
 | 
				
			||||||
 | 
					     * @param name Name des Log Eintrags
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    public static void fatal(String msg, String name){
 | 
					    public static void fatal(String msg, String name){
 | 
				
			||||||
        getLog(name).fatal(msg);
 | 
					        getLog(name).fatal(msg);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Instanziert den Logger
 | 
				
			||||||
 | 
					     * @param name Name des Loggers
 | 
				
			||||||
 | 
					     * @return Den Logger
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    private static Logger getLog(String name){
 | 
					    private static Logger getLog(String name){
 | 
				
			||||||
        return Logger.getLogger(name); // Initialiesiert das Logging
 | 
					        return Logger.getLogger(name); // Instanziert den Logger
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										243
									
								
								src/tourplaner/business/Reporter.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										243
									
								
								src/tourplaner/business/Reporter.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,243 @@
 | 
				
			|||||||
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.itextpdf.text.*;
 | 
				
			||||||
 | 
					import com.itextpdf.text.Font;
 | 
				
			||||||
 | 
					import com.itextpdf.text.Image;
 | 
				
			||||||
 | 
					import tourplaner.data.DbConnect;
 | 
				
			||||||
 | 
					import tourplaner.object.Log;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.itextpdf.text.pdf.PdfPCell;
 | 
				
			||||||
 | 
					import com.itextpdf.text.pdf.PdfPTable;
 | 
				
			||||||
 | 
					import com.itextpdf.text.pdf.PdfWriter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.io.FileNotFoundException;
 | 
				
			||||||
 | 
					import java.io.FileOutputStream;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.Date;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * PDF Report generierung mit iText
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Erstellt Reports über einzelne Touren und fasst alle Touren zusammen
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * iText 4 ist gratis verfügbar, siehe:
 | 
				
			||||||
 | 
					 * https://github.com/ymasory/iText-4.2.0
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Reporter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static Font catFont = new Font(Font.TIMES_ROMAN, 18,
 | 
				
			||||||
 | 
					            Font.BOLD);
 | 
				
			||||||
 | 
					    private static Font redFont = new Font(Font.TIMES_ROMAN, 12,
 | 
				
			||||||
 | 
					            Font.NORMAL, Color.RED);
 | 
				
			||||||
 | 
					    private static Font subFont = new Font(Font.TIMES_ROMAN, 16,
 | 
				
			||||||
 | 
					            Font.BOLD);
 | 
				
			||||||
 | 
					    private static Font smallBold = new Font(Font.TIMES_ROMAN, 12,
 | 
				
			||||||
 | 
					            Font.BOLD);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt den Summary Report
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void sumReport(){
 | 
				
			||||||
 | 
					        ArrayList<Tour> tours = TourPlaner.getAllTours();
 | 
				
			||||||
 | 
					        String file = ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "report", "path") + "summary.pdf";
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            Document document = new Document();
 | 
				
			||||||
 | 
					            PdfWriter.getInstance(document, new FileOutputStream(file));
 | 
				
			||||||
 | 
					            document.open();
 | 
				
			||||||
 | 
					            addSumRepo(document, tours);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            document.close();
 | 
				
			||||||
 | 
					        } catch (DocumentException | FileNotFoundException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        FileHelper.openDefault(file);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Content des Sumary reports
 | 
				
			||||||
 | 
					     * @param document Document auf das geschrieben wird
 | 
				
			||||||
 | 
					     * @param touren Touren die berechnet werden
 | 
				
			||||||
 | 
					     * @throws DocumentException Fehler beim schreiben auf das Dokument
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private static void addSumRepo(Document document, ArrayList<Tour> touren) throws DocumentException {
 | 
				
			||||||
 | 
					        double dauer = 0;
 | 
				
			||||||
 | 
					        double strecke = 0;
 | 
				
			||||||
 | 
					        double calDauer = 0;
 | 
				
			||||||
 | 
					        double calStecke = 0;
 | 
				
			||||||
 | 
					        for (Tour tour:touren) {
 | 
				
			||||||
 | 
					            calStecke += tour.getStrecke();
 | 
				
			||||||
 | 
					            calDauer += Double.parseDouble(tour.getDauer());
 | 
				
			||||||
 | 
					            ArrayList<Log> logs = tour.getLogs();
 | 
				
			||||||
 | 
					            for (Log log:logs) {
 | 
				
			||||||
 | 
					                dauer += log.getDauer();
 | 
				
			||||||
 | 
					                strecke += log.getStrecke();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        Anchor anchor = new Anchor("Zusammengefasster Report", catFont);
 | 
				
			||||||
 | 
					        anchor.setName("Zusammengefasster Report");
 | 
				
			||||||
 | 
					        // Second parameter is the number of the chapter
 | 
				
			||||||
 | 
					        Chapter catPart = new Chapter(new Paragraph(anchor), 1);
 | 
				
			||||||
 | 
					        Paragraph subPara = new Paragraph("Daten", subFont);
 | 
				
			||||||
 | 
					        Section subCatPart = catPart.addSection(subPara);
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportvon") + System.getProperty("user.name") + ", " + new Date()));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph("Gesammte Zeit aller Logs: " + dauer));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph("gesammte Strecke aller Logs: " + strecke));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph("Berechnete Zeit aller Logs: " + calDauer));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph("Berechnete Strecke aller Touren: " + calStecke));
 | 
				
			||||||
 | 
					        document.add(catPart);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt einen Tour Report
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour die Gereportet werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void createTourReport(String tourname)   {
 | 
				
			||||||
 | 
					        Tour tour = TourPlaner.getTour(tourname);
 | 
				
			||||||
 | 
					        tour.setLog(TourPlaner.getLogs(tourname));
 | 
				
			||||||
 | 
					        String file = ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "report", "path") + tourname+".pdf";
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            Document document = new Document();
 | 
				
			||||||
 | 
					            PdfWriter.getInstance(document, new FileOutputStream(file));
 | 
				
			||||||
 | 
					            document.open();
 | 
				
			||||||
 | 
					            addMetaData(document, tour);
 | 
				
			||||||
 | 
					//            addTitlePage(document, tour);
 | 
				
			||||||
 | 
					            addContent(document, tour);
 | 
				
			||||||
 | 
					            document.close();
 | 
				
			||||||
 | 
					        } catch (DocumentException | FileNotFoundException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        FileHelper.openDefault(file);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // iText allows to add metadata to the PDF which can be viewed in your Adobe
 | 
				
			||||||
 | 
					    // Reader
 | 
				
			||||||
 | 
					    // under File -> Properties
 | 
				
			||||||
 | 
					    private static void addMetaData(Document document, Tour tour) {
 | 
				
			||||||
 | 
					        document.addTitle(ConfigHelper.getLangIniString("tourreportvon") + tour.getName());
 | 
				
			||||||
 | 
					        document.addSubject(ConfigHelper.getLangIniString("tourplanervon"));
 | 
				
			||||||
 | 
					        document.addKeywords(ConfigHelper.getLangIniString("reportkeywords"));
 | 
				
			||||||
 | 
					        document.addAuthor(ConfigHelper.getLangIniString("tourplaner"));
 | 
				
			||||||
 | 
					        document.addCreator(ConfigHelper.getLangIniString("tourplaner"));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt den inhalt des Reports
 | 
				
			||||||
 | 
					     * @param document Aktuelles Dokument
 | 
				
			||||||
 | 
					     * @param tour Aktuelle Tour
 | 
				
			||||||
 | 
					     * @throws DocumentException Fehler beim hinzufügen des Inhaltes
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private static void addContent(Document document, Tour tour) throws DocumentException {
 | 
				
			||||||
 | 
					        Anchor anchor = new Anchor(ConfigHelper.getLangIniString("tourreportvon") + tour.getName(), catFont);
 | 
				
			||||||
 | 
					        anchor.setName(ConfigHelper.getLangIniString("tourreportvon") + tour.getName());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Second parameter is the number of the chapter
 | 
				
			||||||
 | 
					        Chapter catPart = new Chapter(new Paragraph(anchor), 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Paragraph subPara = new Paragraph(ConfigHelper.getLangIniString("tour"), subFont);
 | 
				
			||||||
 | 
					        Section subCatPart = catPart.addSection(subPara);
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportvon") + System.getProperty("user.name") + ", " + new Date()));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportstart") + tour.getStart()));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportziel") + tour.getZiel()));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportdauercal") + tour.getDauer()));
 | 
				
			||||||
 | 
					        subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportstreckecal") + tour.getStrecke()));
 | 
				
			||||||
 | 
					        Paragraph emptyLine = new Paragraph();
 | 
				
			||||||
 | 
					        addEmptyLine(emptyLine, 5);
 | 
				
			||||||
 | 
					        subCatPart.add(emptyLine);
 | 
				
			||||||
 | 
					        // now add all this to the document
 | 
				
			||||||
 | 
					        document.add(catPart);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Image image1 = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            image1 = Image.getInstance(TourPlaner.getImagePdfPath(tour.getName()));
 | 
				
			||||||
 | 
					            image1.setAlignment(Element.ALIGN_CENTER);
 | 
				
			||||||
 | 
					            image1.scaleAbsolute(600, 400);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            document.add(image1);
 | 
				
			||||||
 | 
					        } catch (IOException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        ArrayList<Log> logs = tour.getLogs();
 | 
				
			||||||
 | 
					        // Second parameter is the number of the chapter
 | 
				
			||||||
 | 
					        anchor = new Anchor(ConfigHelper.getLangIniString("logs"), catFont);
 | 
				
			||||||
 | 
					        anchor.setName(ConfigHelper.getLangIniString("logs"));
 | 
				
			||||||
 | 
					        catPart = new Chapter(new Paragraph(anchor), 2);
 | 
				
			||||||
 | 
					        catPart.add(new Paragraph(ConfigHelper.getLangIniString("countlog") + logs.size()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for (Log log: logs) {
 | 
				
			||||||
 | 
					            subPara = new Paragraph(ConfigHelper.getLangIniString("logvom") + log.getDatum() , subFont);
 | 
				
			||||||
 | 
					            subCatPart = catPart.addSection(subPara);
 | 
				
			||||||
 | 
					            subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logdauer") + log.getDauer()));
 | 
				
			||||||
 | 
					            subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logpause") + log.getPause()));
 | 
				
			||||||
 | 
					            subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("loggegangen") + log.getGegangen()));
 | 
				
			||||||
 | 
					            subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logavg")+ log.getAvgspeed()));
 | 
				
			||||||
 | 
					            subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logstrecke") + log.getStrecke()));
 | 
				
			||||||
 | 
					            subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("loghight") + log.getHightmeter()));
 | 
				
			||||||
 | 
					            subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logbemerkung") + log.getBemerkung()));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // now add all this to the document
 | 
				
			||||||
 | 
					        document.add(catPart);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt eine leere zeile an den Paragraph an
 | 
				
			||||||
 | 
					     * @param paragraph Hier wird hinzugefügt
 | 
				
			||||||
 | 
					     * @param number Um wie viele Leere Zeilen hinzugefügt werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private static void addEmptyLine(Paragraph paragraph, int number) {
 | 
				
			||||||
 | 
					        for (int i = 0; i < number; i++) {
 | 
				
			||||||
 | 
					            paragraph.add(new Paragraph(" "));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					//    private static void createTable(Section subCatPart)
 | 
				
			||||||
 | 
					//            throws BadElementException {
 | 
				
			||||||
 | 
					//        PdfPTable table = new PdfPTable(5);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        // t.setBorderColor(BaseColor.GRAY);
 | 
				
			||||||
 | 
					//        // t.setPadding(4);
 | 
				
			||||||
 | 
					//        // t.setSpacing(4);
 | 
				
			||||||
 | 
					//        // t.setBorderWidth(1);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        PdfPCell c1 = new PdfPCell(new Phrase("NR"));
 | 
				
			||||||
 | 
					//        c1.setHorizontalAlignment(Element.ALIGN_CENTER);
 | 
				
			||||||
 | 
					//        table.addCell(c1);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        c1 = new PdfPCell(new Phrase("Datum"));
 | 
				
			||||||
 | 
					//        c1.setHorizontalAlignment(Element.ALIGN_CENTER);
 | 
				
			||||||
 | 
					//        table.addCell(c1);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        c1 = new PdfPCell(new Phrase("Entfernung"));
 | 
				
			||||||
 | 
					//        c1.setHorizontalAlignment(Element.ALIGN_CENTER);
 | 
				
			||||||
 | 
					//        table.addCell(c1);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        c1 = new PdfPCell(new Phrase("Höhenmeter"));
 | 
				
			||||||
 | 
					//        c1.setHorizontalAlignment(Element.ALIGN_CENTER);
 | 
				
			||||||
 | 
					//        table.addCell(c1);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        c1 = new PdfPCell(new Phrase("AVG Geschwindigkeit"));
 | 
				
			||||||
 | 
					//        c1.setHorizontalAlignment(Element.ALIGN_CENTER);
 | 
				
			||||||
 | 
					//        table.addCell(c1);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        table.setHeaderRows(1);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        table.addCell("1.0");
 | 
				
			||||||
 | 
					//        table.addCell("1.1");
 | 
				
			||||||
 | 
					//        table.addCell("1.2");
 | 
				
			||||||
 | 
					//        table.addCell("1.3");
 | 
				
			||||||
 | 
					//        table.addCell("1.4");
 | 
				
			||||||
 | 
					//        table.addCell("1.5");
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        table.addCell("2.0");
 | 
				
			||||||
 | 
					//        table.addCell("2.1");
 | 
				
			||||||
 | 
					//        table.addCell("2.2");
 | 
				
			||||||
 | 
					//        table.addCell("2.3");
 | 
				
			||||||
 | 
					//        table.addCell("2.4");
 | 
				
			||||||
 | 
					//        table.addCell("2.5");
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//        subCatPart.add(table);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,10 +1,15 @@
 | 
				
			|||||||
package tourplaner.business;
 | 
					package tourplaner.business;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javafx.stage.Stage;
 | 
					 | 
				
			||||||
import org.apache.log4j.Logger;
 | 
					import org.apache.log4j.Logger;
 | 
				
			||||||
import tourplaner.ui.PresenterMain;
 | 
					import tourplaner.data.DbConnect;
 | 
				
			||||||
 | 
					import tourplaner.object.Log;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.FileNotFoundException;
 | 
				
			||||||
import java.io.IOException;
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Haupt Logik des Tourplaners
 | 
					 * Haupt Logik des Tourplaners
 | 
				
			||||||
@@ -13,17 +18,161 @@ public class TourPlaner{
 | 
				
			|||||||
    private Logger logger;
 | 
					    private Logger logger;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Startet alle bennötigten Komponenten
 | 
					     * Erstellt alle DB Tabellen falls nötig
 | 
				
			||||||
     * @param primaryStage Stage für den Presenter
 | 
					 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public TourPlaner(Stage primaryStage){
 | 
					    public static void init(){
 | 
				
			||||||
        try {
 | 
					        new DbConnect().init();
 | 
				
			||||||
            String startText = ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "message");
 | 
					 | 
				
			||||||
            LogHelper.info(startText, "TourPlaner");
 | 
					 | 
				
			||||||
            PresenterMain presenterMain = new PresenterMain(primaryStage);  // Start Presenter/GUI
 | 
					 | 
				
			||||||
        } catch (IOException e) {
 | 
					 | 
				
			||||||
            LogHelper.fatal(e.getMessage(), "TourPlanerConfig");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt alle touren aus der DB 
 | 
				
			||||||
 | 
					     * @return Alle touren als ArrayList
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static ArrayList<Tour> getAllTours(){
 | 
				
			||||||
 | 
					        return new DbConnect().getAllTouren();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Bearbeitet eine Tour
 | 
				
			||||||
 | 
					     * @param oldname Alter Tourname
 | 
				
			||||||
 | 
					     * @param tour Neuer Tourname
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean editTour(String oldname, Tour tour) throws IOException {
 | 
				
			||||||
 | 
					        FileHelper.delFile(new File(getImagePath(oldname)));
 | 
				
			||||||
 | 
					        FileHelper.delFile(new File(getImagePdfPath(oldname)));
 | 
				
			||||||
 | 
					        DirectionMap directionMap = new DirectionMap(tour.getStart(), tour.getZiel(), tour.getName());
 | 
				
			||||||
 | 
					        tour.setDauer(directionMap.getDauer()+"");
 | 
				
			||||||
 | 
					        tour.setStrecke(directionMap.getStrecke());
 | 
				
			||||||
 | 
					        return new DbConnect().editTour(oldname, tour);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Löscht eine Tour
 | 
				
			||||||
 | 
					     * @param tourname Tourname
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean delTour(String tourname){
 | 
				
			||||||
 | 
					        FileHelper.delFile(new File(getImagePath(tourname)));
 | 
				
			||||||
 | 
					        FileHelper.delFile(new File(getImagePdfPath(tourname)));
 | 
				
			||||||
 | 
					        return new DbConnect().delTour(tourname);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt eine Tour hinzu
 | 
				
			||||||
 | 
					     * @param newTour Neue Tour
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean addTour(Tour newTour) throws IOException {
 | 
				
			||||||
 | 
					        DirectionMap directionMap = new DirectionMap(newTour.getStart(), newTour.getZiel(), newTour.getName());
 | 
				
			||||||
 | 
					        newTour.setDauer(directionMap.getDauer()+"");
 | 
				
			||||||
 | 
					        newTour.setStrecke(directionMap.getStrecke());
 | 
				
			||||||
 | 
					        return new DbConnect().addTour(newTour);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt das Gui Bild
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour
 | 
				
			||||||
 | 
					     * @return Das Bild
 | 
				
			||||||
 | 
					     * @throws IOException Error beim Bild holen
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static Image getImage(String tourname) throws IOException {
 | 
				
			||||||
 | 
					        return FileHelper.getImage(new File(getImagePath(tourname)));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     /**
 | 
				
			||||||
 | 
					     * Path zu dem Bild für die GUI
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour
 | 
				
			||||||
 | 
					     * @return Path zu dem Bild für die GUI
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String getImagePath(String tourname){
 | 
				
			||||||
 | 
					        return ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "path") + tourname + ".jpg";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Path zu dem Bild für die PDF
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour
 | 
				
			||||||
 | 
					     * @return Path zu dem Bild für die PDF
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String getImagePdfPath(String tourname){
 | 
				
			||||||
 | 
					        return ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "path") + tourname + "_pdf.jpg";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet ein Bild einer Tour
 | 
				
			||||||
 | 
					     * @param tourname Tourname
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void openImage(String tourname){
 | 
				
			||||||
 | 
					        FileHelper.openDefault(getImagePath(tourname));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt alle Logs einer Tour
 | 
				
			||||||
 | 
					     * @param tourname Tourname
 | 
				
			||||||
 | 
					     * @return Alle Logs der Tour
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static ArrayList<Log> getLogs(String tourname){
 | 
				
			||||||
 | 
					        return new DbConnect().getLogs(tourname);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Führt einen Rport aus
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour die gereportet wird
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void doReport(String tourname){
 | 
				
			||||||
 | 
					        Reporter.createTourReport(tourname);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt eine Tour
 | 
				
			||||||
 | 
					     * @param tourname Name der zu holenden Tour
 | 
				
			||||||
 | 
					     * @return Tour die geholt werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static Tour getTour(String tourname){
 | 
				
			||||||
 | 
					        return new DbConnect().getTour(tourname);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt ein Log hinzu
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour
 | 
				
			||||||
 | 
					     * @param log Neues Log
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean addLog(String tourname, Log log){
 | 
				
			||||||
 | 
					        if(Double.isInfinite(log.getAvgspeed())) log.setAvgspeed(-1.0);
 | 
				
			||||||
 | 
					        return new DbConnect().addLog(tourname, log);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Löscht ein Log
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour
 | 
				
			||||||
 | 
					     * @param id Id des Logs
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean delLog(String tourname, String id){
 | 
				
			||||||
 | 
					        return new DbConnect().delLog(tourname, id);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Editiert ein Log
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour
 | 
				
			||||||
 | 
					     * @param log Neues Log
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean editLog(String tourname, Log log){
 | 
				
			||||||
 | 
					        if(Double.isInfinite(log.getAvgspeed())) log.setAvgspeed(-1.0);
 | 
				
			||||||
 | 
					        return new DbConnect().editLog(tourname, log);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Exportiert die Daten
 | 
				
			||||||
 | 
					     * @param path Path zu den Daten
 | 
				
			||||||
 | 
					     * @throws IOException Fehler beim schreiben der Daten
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void exportData(String path) throws IOException {
 | 
				
			||||||
 | 
					            Exporter exporter = new Exporter(path);
 | 
				
			||||||
 | 
					            exporter.doExport();
 | 
				
			||||||
 | 
					            FileHelper.openDefault(path);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,235 @@
 | 
				
			|||||||
package tourplaner.data;
 | 
					package tourplaner.data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javafx.geometry.Pos;
 | 
				
			||||||
 | 
					import tourplaner.object.Log;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.sql.Connection;
 | 
				
			||||||
 | 
					import java.sql.Date;
 | 
				
			||||||
 | 
					import java.sql.ResultSet;
 | 
				
			||||||
 | 
					import java.sql.Statement;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Verwaltet die Datenbankverbindung zu dem Postgres Server
 | 
					 * Verwaltet die Datenbankverbindung zu dem Postgres Server
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public class DbConnect {
 | 
					public class DbConnect {
 | 
				
			||||||
 | 
					    private Connection c;
 | 
				
			||||||
 | 
					    private Statement stmt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt alle Beispieldaten und simuliert somit den
 | 
				
			||||||
 | 
					     * Verbindungsaufbau zu einer DB
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public DbConnect() {
 | 
				
			||||||
 | 
					        this.c = null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt alle Tabellen die für den Betrieb der Software bennötigt werden
 | 
				
			||||||
 | 
					     * @return True bei erfolg, sonst error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public boolean init() {
 | 
				
			||||||
 | 
					        ArrayList<Boolean> errors = new ArrayList<>();
 | 
				
			||||||
 | 
					        errors.add(PostgresHelper.executeUpdateMessage("create table tour ( tourname varchar not null, dauer decimal, mapjson varchar, start varchar, ziel varchar, strecke decimal);", "Tour Table created"));
 | 
				
			||||||
 | 
					        errors.add(PostgresHelper.executeUpdateMessage("create unique index tour_tourname_uindex on tour (tourname);", "Tour Table unique created"));
 | 
				
			||||||
 | 
					        errors.add(PostgresHelper.executeUpdateMessage("alter table tour add constraint tour_pk primary key (tourname);", "Tour Table primary created"));
 | 
				
			||||||
 | 
					        errors.add(PostgresHelper.executeUpdateMessage("create table log(tourname varchar constraint log_tour_tourname_fk references tour,id varchar,bemerkung varchar,datum date,strecke decimal,avg decimal,hightmeter decimal,pause decimal,gegangen decimal,dauer decimal);", "Log Table created"));
 | 
				
			||||||
 | 
					        return !errors.contains(false);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Bearbeitet eine Tour
 | 
				
			||||||
 | 
					     * @param oldname Alter Tour name
 | 
				
			||||||
 | 
					     * @param tour Neues Tour Object
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public boolean editTour(String oldname, Tour tour) {
 | 
				
			||||||
 | 
					        String tourname = tour.getName();
 | 
				
			||||||
 | 
					        ArrayList<Boolean> result = new ArrayList<>();
 | 
				
			||||||
 | 
					        ArrayList<Log> logs = getLogs(oldname);
 | 
				
			||||||
 | 
					        result.add(delLogs(oldname));
 | 
				
			||||||
 | 
					        result.add(PostgresHelper.executeUpdate("UPDATE public.tour SET tourname = '"+tour.getName()+"', dauer = 1, mapjson = '"+tour.getMapJson()+"', start = '"+tour.getStart()+"', ziel = '"+tour.getZiel()+"', strecke = "+tour.getStrecke()+" WHERE tourname ='" + oldname + "';"));
 | 
				
			||||||
 | 
					        logs.forEach(log -> {
 | 
				
			||||||
 | 
					            result.add(addLog(tourname, log));
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        return !result.contains(false);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private boolean delLogs(String tourname){
 | 
				
			||||||
 | 
					        return PostgresHelper.executeUpdate("DELETE FROM public.log WHERE tourname = '"+tourname+"'");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt eine Tour hinzu
 | 
				
			||||||
 | 
					     * @param tour Neue Tour
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public boolean addTour(Tour tour){
 | 
				
			||||||
 | 
					        return PostgresHelper.executeUpdate("INSERT INTO public.tour (tourname, dauer, mapjson, start, ziel, strecke) VALUES ('"+tour.getName()+"', "+tour.getDauer()+", '"+tour.getMapJson()+"', '"+tour.getStart()+"', '"+tour.getZiel()+"', "+tour.getStrecke()+")");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Löscht eine Tour anhand des Tournamens
 | 
				
			||||||
 | 
					     * @param tourname Tourname der zu löschen ist
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public boolean delTour(String tourname){
 | 
				
			||||||
 | 
					        ArrayList<Boolean> result = new ArrayList<>();
 | 
				
			||||||
 | 
					        result.add(delLogs(tourname));
 | 
				
			||||||
 | 
					        result.add(PostgresHelper.executeUpdate("DELETE FROM public.tour WHERE tourname = '"+tourname+"'"));
 | 
				
			||||||
 | 
					        return !result.contains(false);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public boolean delAllData(){
 | 
				
			||||||
 | 
					        ArrayList<Boolean> result = new ArrayList<>();
 | 
				
			||||||
 | 
					        result.add(delAllLog());
 | 
				
			||||||
 | 
					        result.add(delAllTour());
 | 
				
			||||||
 | 
					        return !result.contains(false);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private boolean delAllTour(){
 | 
				
			||||||
 | 
					        return PostgresHelper.executeUpdate("DELETE FROM public.tour");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private boolean delAllLog(){
 | 
				
			||||||
 | 
					        return  PostgresHelper.executeUpdate("DELETE FROM public.log");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ArrayList<Log> getLogs(String tourname){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.c = PostgresHelper.con();
 | 
				
			||||||
 | 
					        String id, bemerkung ;
 | 
				
			||||||
 | 
					        double dauer, strecke, pause, gegangen, avg, hightmeter;
 | 
				
			||||||
 | 
					        Date datum;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ArrayList<Log> logs = new ArrayList<>();
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            stmt = this.c.createStatement();
 | 
				
			||||||
 | 
					            ResultSet rs = stmt.executeQuery("SELECT * FROM public.log where tourname = '"+ tourname +"'");
 | 
				
			||||||
 | 
					            while (rs.next()) {
 | 
				
			||||||
 | 
					                id = rs.getString("id");
 | 
				
			||||||
 | 
					                bemerkung = rs.getString("bemerkung");
 | 
				
			||||||
 | 
					                datum = rs.getDate("datum");
 | 
				
			||||||
 | 
					                dauer = rs.getDouble("dauer");
 | 
				
			||||||
 | 
					//                avg = rs.getDouble("avg");
 | 
				
			||||||
 | 
					                hightmeter = rs.getDouble("hightmeter");
 | 
				
			||||||
 | 
					                pause = rs.getDouble("pause");
 | 
				
			||||||
 | 
					//                gegangen = rs.getDouble("gegangen");
 | 
				
			||||||
 | 
					                strecke = rs.getDouble("strecke");
 | 
				
			||||||
 | 
					                if (!tourname.isEmpty()) {
 | 
				
			||||||
 | 
					                    logs.add(new Log(id, dauer, datum.toLocalDate(), strecke, bemerkung,hightmeter, pause));
 | 
				
			||||||
 | 
					                }else {
 | 
				
			||||||
 | 
					                    return null;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            rs.close();
 | 
				
			||||||
 | 
					            stmt.close();
 | 
				
			||||||
 | 
					            this.c.close();
 | 
				
			||||||
 | 
					            return logs;
 | 
				
			||||||
 | 
					        } catch (Exception e) {
 | 
				
			||||||
 | 
					            System.err.println(e.getClass().getName() + ": " + e.getMessage());
 | 
				
			||||||
 | 
					            return null;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Füght einen Logeintrag ein
 | 
				
			||||||
 | 
					     * @param tourname Zu welcher Tour der Logeintrag gehört
 | 
				
			||||||
 | 
					     * @param log Der Logeintrag
 | 
				
			||||||
 | 
					     * @return false bei error
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public boolean addLog(String tourname, Log log){
 | 
				
			||||||
 | 
					        if(Double.isInfinite(log.getAvgspeed())) log.setAvgspeed(-1.0);
 | 
				
			||||||
 | 
					        return PostgresHelper.executeUpdate("INSERT INTO public.log (tourname, id, bemerkung, datum, strecke, avg, hightmeter, pause, gegangen, dauer) VALUES ('"+tourname+"', '"+log.getId()+"', '"+log.getBemerkung()+"', '"+log.getDatum()+"', "
 | 
				
			||||||
 | 
					                +log.getStrecke()+", "+log.getAvgspeed()+", "+log.getHightmeter()+", "+log.getPause()+", "+log.getGegangen()+", "+log.getDauer()+")");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public boolean editLog(String tourname, Log log){
 | 
				
			||||||
 | 
					        return PostgresHelper.executeUpdate("UPDATE public.log SET bemerkung = '"+log.getBemerkung()+"', datum = '"+log.getDatum()+"', strecke = "+log.getStrecke()+", avg = "+log.getAvgspeed()+", hightmeter = "+
 | 
				
			||||||
 | 
					                log.getHightmeter()+", pause = "+log.getPause()+", gegangen = "+log.getGegangen()+", dauer = "+log.getDauer()+" WHERE tourname = '"+tourname+"' and id = '"+log.getId()+"'");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public boolean delLog(String tourname, String id){
 | 
				
			||||||
 | 
					        System.out.println("DELETE FROM public.log WHERE tourname = '"+tourname+"' and id = '"+id+"'");
 | 
				
			||||||
 | 
					        return PostgresHelper.executeUpdate("DELETE FROM public.log WHERE tourname = '"+tourname+"' and id = '"+id+"'");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt alle Touren aus der Datenbank
 | 
				
			||||||
 | 
					     * @return Null bei fehler, sonst eine List aus den IDs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public ArrayList<Tour> getAllTouren(){
 | 
				
			||||||
 | 
					        this.c = PostgresHelper.con();
 | 
				
			||||||
 | 
					        String tourname, mapjson, start, ziel;
 | 
				
			||||||
 | 
					        double dauer, strecke;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ArrayList<Tour> touren = new ArrayList<>();
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            stmt = this.c.createStatement();
 | 
				
			||||||
 | 
					            ResultSet rs = stmt.executeQuery("select * from tour;");
 | 
				
			||||||
 | 
					            while (rs.next()) {
 | 
				
			||||||
 | 
					                tourname = rs.getString("tourname");
 | 
				
			||||||
 | 
					                mapjson = rs.getString("mapjson");
 | 
				
			||||||
 | 
					                start = rs.getString("start");
 | 
				
			||||||
 | 
					                ziel = rs.getString("ziel");
 | 
				
			||||||
 | 
					                dauer = rs.getDouble("dauer");
 | 
				
			||||||
 | 
					                strecke = rs.getDouble("strecke");
 | 
				
			||||||
 | 
					                if (!tourname.isEmpty()) {
 | 
				
			||||||
 | 
					                    touren.add(new Tour(tourname, dauer + "", mapjson, strecke, start, ziel, getLogs(tourname)));
 | 
				
			||||||
 | 
					                }else {
 | 
				
			||||||
 | 
					                    return null;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            rs.close();
 | 
				
			||||||
 | 
					            stmt.close();
 | 
				
			||||||
 | 
					            this.c.close();
 | 
				
			||||||
 | 
					            return touren;
 | 
				
			||||||
 | 
					        } catch (Exception e) {
 | 
				
			||||||
 | 
					            System.err.println(e.getClass().getName() + ": " + e.getMessage());
 | 
				
			||||||
 | 
					            return null;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt eine Tour aus der Datenbank
 | 
				
			||||||
 | 
					     * @param tn Tourname
 | 
				
			||||||
 | 
					     * @return Null bei fehler, sonst eine List aus den IDs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Tour getTour(String tn){
 | 
				
			||||||
 | 
					        this.c = PostgresHelper.con();
 | 
				
			||||||
 | 
					        String tourname, mapjson, start, ziel;
 | 
				
			||||||
 | 
					        double dauer, strecke;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Tour touren = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            stmt = this.c.createStatement();
 | 
				
			||||||
 | 
					            ResultSet rs = stmt.executeQuery("select * from tour where tourname = '"+tn+"';");
 | 
				
			||||||
 | 
					            while (rs.next()) {
 | 
				
			||||||
 | 
					                tourname = rs.getString("tourname");
 | 
				
			||||||
 | 
					                mapjson = rs.getString("mapjson");
 | 
				
			||||||
 | 
					                start = rs.getString("start");
 | 
				
			||||||
 | 
					                ziel = rs.getString("ziel");
 | 
				
			||||||
 | 
					                dauer = rs.getDouble("dauer");
 | 
				
			||||||
 | 
					                strecke = rs.getDouble("strecke");
 | 
				
			||||||
 | 
					                if (!tourname.isEmpty()) {
 | 
				
			||||||
 | 
					                    touren = new Tour(tourname, dauer + "", mapjson, strecke, start, ziel);
 | 
				
			||||||
 | 
					                }else {
 | 
				
			||||||
 | 
					                    return null;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            rs.close();
 | 
				
			||||||
 | 
					            stmt.close();
 | 
				
			||||||
 | 
					            this.c.close();
 | 
				
			||||||
 | 
					            return touren;
 | 
				
			||||||
 | 
					        } catch (Exception e) {
 | 
				
			||||||
 | 
					            System.err.println(e.getClass().getName() + ": " + e.getMessage());
 | 
				
			||||||
 | 
					            return null;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										69
									
								
								src/tourplaner/data/PostgresHelper.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								src/tourplaner/data/PostgresHelper.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,69 @@
 | 
				
			|||||||
 | 
					package tourplaner.data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import tourplaner.business.ConfigHelper;
 | 
				
			||||||
 | 
					import tourplaner.business.LogHelper;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.sql.Connection;
 | 
				
			||||||
 | 
					import java.sql.DriverManager;
 | 
				
			||||||
 | 
					import java.sql.ResultSet;
 | 
				
			||||||
 | 
					import java.sql.Statement;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Hilfsfunktionen für die verwendung der Postgres DB
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class PostgresHelper {
 | 
				
			||||||
 | 
					    private Connection c;
 | 
				
			||||||
 | 
					    private Statement stmt;
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Verbindet mit der Datenbank
 | 
				
			||||||
 | 
					     * @return Das Connection Objekt
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static Connection con() {
 | 
				
			||||||
 | 
					        Connection c = null;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            Class.forName("org.postgresql.Driver");
 | 
				
			||||||
 | 
					            System.out.println("jdbc:postgresql://" + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "url") + ":" + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "port") + "/" + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "dbname")+
 | 
				
			||||||
 | 
					                    ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "user")+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "pw"));
 | 
				
			||||||
 | 
					            c = DriverManager
 | 
				
			||||||
 | 
					                    .getConnection("jdbc:postgresql://" + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "url") + ":" + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "port") + "/" + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "dbname"),
 | 
				
			||||||
 | 
					                            ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "user"), ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "db", "pw"));
 | 
				
			||||||
 | 
					        } catch (Exception e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return c;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Führt ein Sql statement ohne rückgabe aus, mit message nachricht
 | 
				
			||||||
 | 
					     * @param sql Sql command
 | 
				
			||||||
 | 
					     * @param message Mesasage die vor dem Durchführen angezeigt wird
 | 
				
			||||||
 | 
					     * @return True bei erfolg, sonst false
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean executeUpdateMessage(String sql, String message){
 | 
				
			||||||
 | 
					        LogHelper.info(message, "PostgresHelper");
 | 
				
			||||||
 | 
					        return executeUpdate(sql);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Führt ein Sql statement ohne rückgabe aus
 | 
				
			||||||
 | 
					     * @param sql Sql command
 | 
				
			||||||
 | 
					     * @return True bei erfolg, sonst false
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static boolean executeUpdate(String sql){
 | 
				
			||||||
 | 
					        Connection c = con();
 | 
				
			||||||
 | 
					        Statement stmt;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            stmt = c.createStatement();
 | 
				
			||||||
 | 
					            stmt.executeUpdate(sql);
 | 
				
			||||||
 | 
					            stmt.close();
 | 
				
			||||||
 | 
					            c.close();
 | 
				
			||||||
 | 
					        } catch (Exception e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), e.getClass().getName());
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
package tourplaner.model;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Model einer Tour
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public class Tour {
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										96
									
								
								src/tourplaner/object/Log.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								src/tourplaner/object/Log.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,96 @@
 | 
				
			|||||||
 | 
					package tourplaner.object;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import jdk.jshell.spi.ExecutionControl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
 | 
					import java.util.Date;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Log {
 | 
				
			||||||
 | 
					    private String id, bemerkung;
 | 
				
			||||||
 | 
					    private LocalDate datum;
 | 
				
			||||||
 | 
					    private double strecke, avgspeed, hightmeter, pause, dauer, gegangen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    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() {
 | 
				
			||||||
 | 
					        return id;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setId(String id) {
 | 
				
			||||||
 | 
					        this.id = id;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public double getDauer() {
 | 
				
			||||||
 | 
					        return dauer;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setDauer(double dauer) {
 | 
				
			||||||
 | 
					        this.dauer = dauer;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public LocalDate getDatum() {
 | 
				
			||||||
 | 
					        return datum;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setDatum(LocalDate datum) {
 | 
				
			||||||
 | 
					        this.datum = datum;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public double getStrecke() {
 | 
				
			||||||
 | 
					        return strecke;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setStrecke(double strecke) {
 | 
				
			||||||
 | 
					        this.strecke = strecke;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										134
									
								
								src/tourplaner/object/Tour.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										134
									
								
								src/tourplaner/object/Tour.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,134 @@
 | 
				
			|||||||
 | 
					package tourplaner.object;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.concurrent.atomic.AtomicReference;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Model einer Tour
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Tour {
 | 
				
			||||||
 | 
					    private String dauer, mapJson, name, start, ziel;
 | 
				
			||||||
 | 
					    private double strecke;
 | 
				
			||||||
 | 
					    private ArrayList<Log> log;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Tour(String name, String dauer, String mapJson, double strecke, String start, String ziel) {
 | 
				
			||||||
 | 
					        this.dauer = dauer;
 | 
				
			||||||
 | 
					        this.mapJson = mapJson;
 | 
				
			||||||
 | 
					        this.strecke = strecke;
 | 
				
			||||||
 | 
					        this.name = name;
 | 
				
			||||||
 | 
					        this.start = start;
 | 
				
			||||||
 | 
					        this.ziel = ziel;
 | 
				
			||||||
 | 
					        this.log = new ArrayList<>();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Tour(String name, String dauer, String mapJson, double strecke, String start, String ziel, ArrayList<Log> logs) {
 | 
				
			||||||
 | 
					        this.dauer = dauer;
 | 
				
			||||||
 | 
					        this.mapJson = mapJson;
 | 
				
			||||||
 | 
					        this.strecke = strecke;
 | 
				
			||||||
 | 
					        this.name = name;
 | 
				
			||||||
 | 
					        this.start = start;
 | 
				
			||||||
 | 
					        this.ziel = ziel;
 | 
				
			||||||
 | 
					        this.log = logs;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setTour(Tour tour){
 | 
				
			||||||
 | 
					        this.dauer = tour.getDauer();
 | 
				
			||||||
 | 
					        this.mapJson = tour.getMapJson();
 | 
				
			||||||
 | 
					        this.strecke = tour.getStrecke();
 | 
				
			||||||
 | 
					        this.name = tour.getName();
 | 
				
			||||||
 | 
					        this.start = tour.getStart();
 | 
				
			||||||
 | 
					        this.ziel = tour.getZiel();
 | 
				
			||||||
 | 
					        this.log = tour.getLogs();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setLog(ArrayList<Log> log) {
 | 
				
			||||||
 | 
					        this.log = log;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt einen einzigen Log Eintrag anhand der Id
 | 
				
			||||||
 | 
					     * @param id Id des Eintrags der zu besorgen ist
 | 
				
			||||||
 | 
					     * @return Der gefundene Log Eintrag
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Log getLog(String id){
 | 
				
			||||||
 | 
					        AtomicReference<Log> returnLog = new AtomicReference<>();
 | 
				
			||||||
 | 
					        this.log.forEach(s -> {
 | 
				
			||||||
 | 
					            if(s.getId().equals(id)){
 | 
				
			||||||
 | 
					                returnLog.set(s);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        return returnLog.get();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt ein Log Eintrag hinzu
 | 
				
			||||||
 | 
					     * @param newLog Der neue Log Eintrag
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void addLog(Log newLog){
 | 
				
			||||||
 | 
					        this.log.add(newLog);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Gibt alle log Einträge zurück
 | 
				
			||||||
 | 
					     * @return Alle log Einträge in einer Arraylist
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public ArrayList<Log> getLogs(){
 | 
				
			||||||
 | 
					        return this.log;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Löscht einen Log eintrag anhand der ID
 | 
				
			||||||
 | 
					     * @param id Id die zum löschen ist
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void delLog(String id){
 | 
				
			||||||
 | 
					        this.log.removeIf(s -> s.getId().equals(id));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getDauer() {
 | 
				
			||||||
 | 
					        return dauer;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setDauer(String dauer) {
 | 
				
			||||||
 | 
					        this.dauer = dauer;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getMapJson() {
 | 
				
			||||||
 | 
					        return mapJson;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setMapJson(String mapJson) {
 | 
				
			||||||
 | 
					        this.mapJson = mapJson;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public double getStrecke() {
 | 
				
			||||||
 | 
					        return strecke;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setStrecke(double strecke) {
 | 
				
			||||||
 | 
					        this.strecke = strecke;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getName() {
 | 
				
			||||||
 | 
					        return name;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setName(String name) {
 | 
				
			||||||
 | 
					        this.name = name;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getStart() {
 | 
				
			||||||
 | 
					        return start;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setStart(String start) {
 | 
				
			||||||
 | 
					        this.start = start;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getZiel() {
 | 
				
			||||||
 | 
					        return ziel;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setZiel(String ziel) {
 | 
				
			||||||
 | 
					        this.ziel = ziel;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										222
									
								
								src/tourplaner/tourplaner.fxml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										222
									
								
								src/tourplaner/tourplaner.fxml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,222 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					  Copyright (c) 2015, 2019, Gluon and/or its affiliates.
 | 
				
			||||||
 | 
					  All rights reserved. Use is subject to license terms.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  This file is available and licensed under the following license:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Redistribution and use in source and binary forms, with or without
 | 
				
			||||||
 | 
					  modification, are permitted provided that the following conditions
 | 
				
			||||||
 | 
					  are met:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  - Redistributions of source code must retain the above copyright
 | 
				
			||||||
 | 
					    notice, this list of conditions and the following disclaimer.
 | 
				
			||||||
 | 
					  - Redistributions in binary form must reproduce the above copyright
 | 
				
			||||||
 | 
					    notice, this list of conditions and the following disclaimer in
 | 
				
			||||||
 | 
					    the documentation and/or other materials provided with the distribution.
 | 
				
			||||||
 | 
					  - Neither the name of Oracle Corporation nor the names of its
 | 
				
			||||||
 | 
					    contributors may be used to endorse or promote products derived
 | 
				
			||||||
 | 
					    from this software without specific prior written permission.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 | 
				
			||||||
 | 
					  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 | 
				
			||||||
 | 
					  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 | 
				
			||||||
 | 
					  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 | 
				
			||||||
 | 
					  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 | 
				
			||||||
 | 
					  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 | 
				
			||||||
 | 
					  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 | 
				
			||||||
 | 
					  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 | 
				
			||||||
 | 
					  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
				
			||||||
 | 
					  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 | 
				
			||||||
 | 
					  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<?import javafx.geometry.*?>
 | 
				
			||||||
 | 
					<?import javafx.scene.control.*?>
 | 
				
			||||||
 | 
					<?import javafx.scene.image.*?>
 | 
				
			||||||
 | 
					<?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.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="tourplaner.ui.TourplanerController">
 | 
				
			||||||
 | 
					  <children>
 | 
				
			||||||
 | 
					    <MenuBar VBox.vgrow="NEVER">
 | 
				
			||||||
 | 
					      <menus>
 | 
				
			||||||
 | 
					        <Menu fx:id="menueFile" mnemonicParsing="false" text="Datei">
 | 
				
			||||||
 | 
					          <items>
 | 
				
			||||||
 | 
					            <MenuItem fx:id="beendenButton" mnemonicParsing="false" onAction="#quitApp" text="Beenden" />
 | 
				
			||||||
 | 
					          </items>
 | 
				
			||||||
 | 
					        </Menu>
 | 
				
			||||||
 | 
					        <Menu mnemonicParsing="false" text="Bearbeiten">
 | 
				
			||||||
 | 
					               <items>
 | 
				
			||||||
 | 
					                  <MenuItem mnemonicParsing="false" onAction="#importBtn" text="Import" />
 | 
				
			||||||
 | 
					                  <MenuItem mnemonicParsing="false" onAction="#exportBtn" text="Export" />
 | 
				
			||||||
 | 
					                  <MenuItem mnemonicParsing="false" onAction="#reportSum" text="Report alles" />
 | 
				
			||||||
 | 
					                  <MenuItem mnemonicParsing="false" onAction="#tourReport" text="Tour Report erstellen" />
 | 
				
			||||||
 | 
					               </items>
 | 
				
			||||||
 | 
					        </Menu>
 | 
				
			||||||
 | 
					            <Menu mnemonicParsing="false" text="Optionen">
 | 
				
			||||||
 | 
					               <items>
 | 
				
			||||||
 | 
					                  <MenuItem mnemonicParsing="false" onAction="#nimpButton" text="Keine Funktion" />
 | 
				
			||||||
 | 
					               </items>
 | 
				
			||||||
 | 
					            </Menu>
 | 
				
			||||||
 | 
					        <Menu mnemonicParsing="false" text="Hilfe">
 | 
				
			||||||
 | 
					          <items>
 | 
				
			||||||
 | 
					            <MenuItem mnemonicParsing="false" onAction="#gitWebBrowser" text="Git Repo" />
 | 
				
			||||||
 | 
					                  <MenuItem mnemonicParsing="false" onAction="#javaDocBrowser" text="JavaDoc" />
 | 
				
			||||||
 | 
					                  <MenuItem mnemonicParsing="false" onAction="#doxygenDocBrowser" text="Doxygen Doc" />
 | 
				
			||||||
 | 
					          </items>
 | 
				
			||||||
 | 
					        </Menu>
 | 
				
			||||||
 | 
					      </menus>
 | 
				
			||||||
 | 
					    </MenuBar>
 | 
				
			||||||
 | 
					      <HBox id="HBox" alignment="CENTER_LEFT" layoutX="10.0" layoutY="588.0" spacing="5.0">
 | 
				
			||||||
 | 
					         <children>
 | 
				
			||||||
 | 
					            <AnchorPane prefWidth="-1.0" HBox.hgrow="ALWAYS">
 | 
				
			||||||
 | 
					               <children>
 | 
				
			||||||
 | 
					                  <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" />
 | 
				
			||||||
 | 
					         </children>
 | 
				
			||||||
 | 
					         <padding>
 | 
				
			||||||
 | 
					            <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
 | 
				
			||||||
 | 
					         </padding>
 | 
				
			||||||
 | 
					      </HBox>
 | 
				
			||||||
 | 
					    <SplitPane dividerPositions="0.060133630289532294" focusTraversable="true" prefHeight="522.0" prefWidth="300.0" VBox.vgrow="ALWAYS">
 | 
				
			||||||
 | 
					      <items>
 | 
				
			||||||
 | 
					            <AnchorPane prefWidth="239.0">
 | 
				
			||||||
 | 
					               <children>
 | 
				
			||||||
 | 
					                  <ListView fx:id="TourListView" layoutX="-1.0" onMouseClicked="#tourListSelectedItem" prefHeight="520.0" prefWidth="190.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
 | 
				
			||||||
 | 
					               </children>
 | 
				
			||||||
 | 
					            </AnchorPane>
 | 
				
			||||||
 | 
					            <SplitPane dividerPositions="0.5" orientation="VERTICAL" prefHeight="496.0" prefWidth="620.0">
 | 
				
			||||||
 | 
					               <items>
 | 
				
			||||||
 | 
					                  <VBox prefWidth="100.0">
 | 
				
			||||||
 | 
					                     <children>
 | 
				
			||||||
 | 
					                        <AnchorPane prefWidth="676.0">
 | 
				
			||||||
 | 
					                           <children>
 | 
				
			||||||
 | 
					                              <HBox id="HBox" alignment="CENTER_LEFT" prefHeight="7.0" prefWidth="44.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
				
			||||||
 | 
					                                 <children>
 | 
				
			||||||
 | 
					                                    <Label text="Title:">
 | 
				
			||||||
 | 
					                                       <HBox.margin>
 | 
				
			||||||
 | 
					                                          <Insets left="10.0" />
 | 
				
			||||||
 | 
					                                       </HBox.margin>
 | 
				
			||||||
 | 
					                                    </Label>
 | 
				
			||||||
 | 
					                                    <TextField fx:id="titleTextView" editable="false" />
 | 
				
			||||||
 | 
					                                 </children>
 | 
				
			||||||
 | 
					                              </HBox>
 | 
				
			||||||
 | 
					                           </children>
 | 
				
			||||||
 | 
					                        </AnchorPane>
 | 
				
			||||||
 | 
					                        <AnchorPane prefWidth="200.0">
 | 
				
			||||||
 | 
					                           <children>
 | 
				
			||||||
 | 
					                              <TabPane fx:id="viewTabPane" layoutX="1.0" layoutY="69.0" prefWidth="702.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="-67.0" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="0.0">
 | 
				
			||||||
 | 
					                                 <tabs>
 | 
				
			||||||
 | 
					                                     <Tab fx:id="kartenTab" text="Karte">
 | 
				
			||||||
 | 
					                                         <AnchorPane>
 | 
				
			||||||
 | 
					                                             <ImageView fx:id="mapImageView" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
 | 
				
			||||||
 | 
					                                         </AnchorPane>
 | 
				
			||||||
 | 
					                                     </Tab>
 | 
				
			||||||
 | 
					                                    <Tab fx:id="beschreibungTab" text="Beschreibung">
 | 
				
			||||||
 | 
					                                       <content>
 | 
				
			||||||
 | 
					                                          <AnchorPane>
 | 
				
			||||||
 | 
					                                             <children>
 | 
				
			||||||
 | 
					                                                <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" />
 | 
				
			||||||
 | 
					                                                      <TableColumn fx:id="streckeCol" maxWidth="1.7976931348623157E308" minWidth="50.0" prefWidth="-1.0" text="Strecke" />
 | 
				
			||||||
 | 
					                                                      <TableColumn fx:id="startCol" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="-1.0" text="Startpunk" />
 | 
				
			||||||
 | 
					                                                      <TableColumn fx:id="zielCol" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="-1.0" text="Zielpunkt" />
 | 
				
			||||||
 | 
					                                                  </columns>
 | 
				
			||||||
 | 
					                                                </TableView>
 | 
				
			||||||
 | 
					                                             </children>
 | 
				
			||||||
 | 
					                                          </AnchorPane>
 | 
				
			||||||
 | 
					                                       </content>
 | 
				
			||||||
 | 
					                                    </Tab>
 | 
				
			||||||
 | 
					                                 </tabs>
 | 
				
			||||||
 | 
					                              </TabPane>
 | 
				
			||||||
 | 
					                           </children>
 | 
				
			||||||
 | 
					                        </AnchorPane>
 | 
				
			||||||
 | 
					                     </children>
 | 
				
			||||||
 | 
					                  </VBox>
 | 
				
			||||||
 | 
					                  <AnchorPane prefWidth="200.0">
 | 
				
			||||||
 | 
					                     <children>
 | 
				
			||||||
 | 
					                        <VBox prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
				
			||||||
 | 
					                           <children>
 | 
				
			||||||
 | 
					                              <AnchorPane>
 | 
				
			||||||
 | 
					                                 <children>
 | 
				
			||||||
 | 
					                                    <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>
 | 
				
			||||||
 | 
					                                                <Insets left="10.0" />
 | 
				
			||||||
 | 
					                                             </HBox.margin>
 | 
				
			||||||
 | 
					                                          </Label>
 | 
				
			||||||
 | 
					                                          <Button mnemonicParsing="false" onAction="#addLog" text="+" textAlignment="CENTER">
 | 
				
			||||||
 | 
					                                             <HBox.margin>
 | 
				
			||||||
 | 
					                                                <Insets />
 | 
				
			||||||
 | 
					                                             </HBox.margin>
 | 
				
			||||||
 | 
					                                          </Button>
 | 
				
			||||||
 | 
					                                          <Button fx:id="logDel" mnemonicParsing="false" onAction="#delLog" prefWidth="21.0" text="-" textAlignment="CENTER">
 | 
				
			||||||
 | 
					                                             <HBox.margin>
 | 
				
			||||||
 | 
					                                                <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" />
 | 
				
			||||||
 | 
					                                       </padding>
 | 
				
			||||||
 | 
					                                    </HBox>
 | 
				
			||||||
 | 
					                                 </children>
 | 
				
			||||||
 | 
					                              </AnchorPane>
 | 
				
			||||||
 | 
					                              <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="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" />
 | 
				
			||||||
 | 
					                                       </columnResizePolicy>
 | 
				
			||||||
 | 
					                                    </TableView>
 | 
				
			||||||
 | 
					                                 </children>
 | 
				
			||||||
 | 
					                              </AnchorPane>
 | 
				
			||||||
 | 
					                           </children>
 | 
				
			||||||
 | 
					                        </VBox>
 | 
				
			||||||
 | 
					                     </children>
 | 
				
			||||||
 | 
					                  </AnchorPane>
 | 
				
			||||||
 | 
					               </items>
 | 
				
			||||||
 | 
					            </SplitPane>
 | 
				
			||||||
 | 
					      </items>
 | 
				
			||||||
 | 
					    </SplitPane>
 | 
				
			||||||
 | 
					    <HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER">
 | 
				
			||||||
 | 
					      <children>
 | 
				
			||||||
 | 
					        <Label maxHeight="1.7976931348623157E308" maxWidth="-1.0" text="Left status" HBox.hgrow="ALWAYS">
 | 
				
			||||||
 | 
					          <font>
 | 
				
			||||||
 | 
					            <Font size="11.0" fx:id="x3" />
 | 
				
			||||||
 | 
					          </font>
 | 
				
			||||||
 | 
					          <textFill>
 | 
				
			||||||
 | 
					            <Color red="0.625" green="0.625" blue="0.625" fx:id="x4" />
 | 
				
			||||||
 | 
					          </textFill>
 | 
				
			||||||
 | 
					        </Label>
 | 
				
			||||||
 | 
					        <AnchorPane prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS" />
 | 
				
			||||||
 | 
					        <Label font="$x3" maxWidth="-1.0" text="Right status" textFill="$x4" HBox.hgrow="NEVER" />
 | 
				
			||||||
 | 
					      </children>
 | 
				
			||||||
 | 
					      <padding>
 | 
				
			||||||
 | 
					        <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
 | 
				
			||||||
 | 
					      </padding>
 | 
				
			||||||
 | 
					    </HBox>
 | 
				
			||||||
 | 
					  </children>
 | 
				
			||||||
 | 
					</VBox>
 | 
				
			||||||
							
								
								
									
										253
									
								
								src/tourplaner/ui/AlertHelper.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										253
									
								
								src/tourplaner/ui/AlertHelper.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,253 @@
 | 
				
			|||||||
 | 
					package tourplaner.ui;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javafx.event.EventHandler;
 | 
				
			||||||
 | 
					import javafx.scene.Scene;
 | 
				
			||||||
 | 
					import javafx.scene.control.*;
 | 
				
			||||||
 | 
					import javafx.scene.control.Label;
 | 
				
			||||||
 | 
					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 javax.swing.*;
 | 
				
			||||||
 | 
					import java.io.PrintWriter;
 | 
				
			||||||
 | 
					import java.io.StringWriter;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
 | 
					import java.util.Optional;
 | 
				
			||||||
 | 
					import java.util.concurrent.atomic.AtomicReference;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class AlertHelper {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Warning Dialog
 | 
				
			||||||
 | 
					     * @param title Title des Dialogs
 | 
				
			||||||
 | 
					     * @param header Header des Dialogs
 | 
				
			||||||
 | 
					     * @param msg Nachricht des Dialogs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void warn(String title, String header, String msg){
 | 
				
			||||||
 | 
					        alertType(Alert.AlertType.WARNING, title, header, msg);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Info Dialog
 | 
				
			||||||
 | 
					     * @param title Title des Dialogs
 | 
				
			||||||
 | 
					     * @param header Header des Dialogs
 | 
				
			||||||
 | 
					     * @param msg Nachricht des Dialogs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void inform(String title, String header, String msg){
 | 
				
			||||||
 | 
					        alertType(Alert.AlertType.INFORMATION, title, header, msg);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Info Dialog ohne Header
 | 
				
			||||||
 | 
					     * @param title Title des Dialogs
 | 
				
			||||||
 | 
					     * @param msg Nachricht des Dialogs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void informNoHeader(String title, String msg){
 | 
				
			||||||
 | 
					        inform(title, null, msg);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Error Dialog
 | 
				
			||||||
 | 
					     * @param title Title des Dialogs
 | 
				
			||||||
 | 
					     * @param header Header des Dialogs
 | 
				
			||||||
 | 
					     * @param msg Nachricht des Dialogs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void error(String title, String header, String msg){
 | 
				
			||||||
 | 
					        alertType(Alert.AlertType.ERROR, title, header, msg);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Ausgabe einer Exception in einem Dialog
 | 
				
			||||||
 | 
					     * @param title Title des Dialogs
 | 
				
			||||||
 | 
					     * @param header Header des Dialogs
 | 
				
			||||||
 | 
					     * @param msg Nachricht des Dialogs
 | 
				
			||||||
 | 
					     * @param ex Die exception die ausgegeben werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void exerror(String title, String header, String msg, Exception ex){
 | 
				
			||||||
 | 
					        Alert alert = new Alert(Alert.AlertType.ERROR);
 | 
				
			||||||
 | 
					        alert.setTitle(title);
 | 
				
			||||||
 | 
					        alert.setHeaderText(header);
 | 
				
			||||||
 | 
					        alert.setContentText(msg);
 | 
				
			||||||
 | 
					        StringWriter sw = new StringWriter();
 | 
				
			||||||
 | 
					        PrintWriter pw = new PrintWriter(sw);
 | 
				
			||||||
 | 
					        ex.printStackTrace(pw);
 | 
				
			||||||
 | 
					        String exceptionText = sw.toString();
 | 
				
			||||||
 | 
					        Label label = new Label(ConfigHelper.getLangIniString("exceptionstackheader"));
 | 
				
			||||||
 | 
					        TextArea textArea = new TextArea(exceptionText);
 | 
				
			||||||
 | 
					        textArea.setEditable(false);
 | 
				
			||||||
 | 
					        textArea.setWrapText(true);
 | 
				
			||||||
 | 
					        textArea.setMaxWidth(Double.MAX_VALUE);
 | 
				
			||||||
 | 
					        textArea.setMaxHeight(Double.MAX_VALUE);
 | 
				
			||||||
 | 
					        GridPane.setVgrow(textArea, Priority.ALWAYS);
 | 
				
			||||||
 | 
					        GridPane.setHgrow(textArea, Priority.ALWAYS);
 | 
				
			||||||
 | 
					        GridPane expContent = new GridPane();
 | 
				
			||||||
 | 
					        expContent.setMaxWidth(Double.MAX_VALUE);
 | 
				
			||||||
 | 
					        expContent.add(label, 0, 0);
 | 
				
			||||||
 | 
					        expContent.add(textArea, 0, 1);
 | 
				
			||||||
 | 
					        alert.getDialogPane().setExpandableContent(expContent);
 | 
				
			||||||
 | 
					        alert.showAndWait();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param alertly Typ des Dialogs
 | 
				
			||||||
 | 
					     * @param title Title des Dialogs
 | 
				
			||||||
 | 
					     * @param header Header des Dialogs
 | 
				
			||||||
 | 
					     * @param msg Nachricht des Dialogs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private static void alertType(Alert.AlertType alertly, String title, String header, String msg){
 | 
				
			||||||
 | 
					        Alert alert = new Alert(alertly);
 | 
				
			||||||
 | 
					        alert.setTitle(title);
 | 
				
			||||||
 | 
					        alert.setHeaderText(header);
 | 
				
			||||||
 | 
					        alert.setContentText(msg);
 | 
				
			||||||
 | 
					        Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();
 | 
				
			||||||
 | 
					        stage.getIcons().add(
 | 
				
			||||||
 | 
					                new Image("file:"+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "logo")));
 | 
				
			||||||
 | 
					        alert.showAndWait();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 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 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() && notNull) {
 | 
				
			||||||
 | 
					                    AlertHelper.warn(ConfigHelper.getLangIniString("tournametitle"),
 | 
				
			||||||
 | 
					                            ConfigHelper.getLangIniString("achtung"),
 | 
				
			||||||
 | 
					                            ConfigHelper.getLangIniString("keintextimfeld"));
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }else{
 | 
				
			||||||
 | 
					                return "";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return returnStr;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt einen Text Input Dialog
 | 
				
			||||||
 | 
					     * @param title Title des Dialogs
 | 
				
			||||||
 | 
					     * @param header Header des Dialogs
 | 
				
			||||||
 | 
					     * @param msg Nachricht des Dialogs
 | 
				
			||||||
 | 
					     * @return Result des Inputs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    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")));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return dialog.showAndWait();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 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.0 bei error sonst ein double
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    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 {
 | 
				
			||||||
 | 
					                    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(-2.0);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            returnDouble = returnText.get();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return returnDouble;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Date Picker Dialog, sobald ein Datum ausgewählt wurde, wird es automatisch bestätigt und der dialog geschlossen
 | 
				
			||||||
 | 
					     * @param content Aktuelles datum
 | 
				
			||||||
 | 
					     * @return Gewähltes datum
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    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);
 | 
				
			||||||
 | 
					            selectedDate.set(date);
 | 
				
			||||||
 | 
					            stage.close();
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        stage.setScene(
 | 
				
			||||||
 | 
					                new Scene(datePicker)
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        stage.showAndWait();
 | 
				
			||||||
 | 
					        return selectedDate.get();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * File Auswahl
 | 
				
			||||||
 | 
					     * @param btn Text des Speichern/Öffnen Btn
 | 
				
			||||||
 | 
					     * @return String des Files, bei error null
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static String fileChooser(String btn){
 | 
				
			||||||
 | 
					        // JFileChooser-Objekt erstellen
 | 
				
			||||||
 | 
					        JFileChooser chooser = new JFileChooser();
 | 
				
			||||||
 | 
					        // Dialog zum Oeffnen von Dateien anzeigen
 | 
				
			||||||
 | 
					        int rueckgabeWert = chooser.showDialog(null, btn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* Abfrage, ob auf "Öffnen" geklickt wurde */
 | 
				
			||||||
 | 
					        if(rueckgabeWert == JFileChooser.APPROVE_OPTION)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return chooser.getSelectedFile().getAbsolutePath();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,34 +0,0 @@
 | 
				
			|||||||
package tourplaner.ui;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import javafx.fxml.FXMLLoader;
 | 
					 | 
				
			||||||
import javafx.scene.Parent;
 | 
					 | 
				
			||||||
import javafx.scene.Scene;
 | 
					 | 
				
			||||||
import javafx.stage.Stage;
 | 
					 | 
				
			||||||
import org.apache.log4j.Logger;
 | 
					 | 
				
			||||||
import tourplaner.business.LogHelper;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.io.IOException;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Presenter des Tourplaners
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public class PresenterMain {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * Startet die Gui
 | 
					 | 
				
			||||||
     * @param primaryStage Stage der GUI
 | 
					 | 
				
			||||||
     *
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public PresenterMain(Stage primaryStage){
 | 
					 | 
				
			||||||
        Parent root = null;
 | 
					 | 
				
			||||||
        try {
 | 
					 | 
				
			||||||
            root = FXMLLoader.load(getClass().getResource("../ui/tourplaner.fxml"));
 | 
					 | 
				
			||||||
            primaryStage.setTitle("DerGeorg Touren Planer");
 | 
					 | 
				
			||||||
            primaryStage.setScene(new Scene(root, 600, 600));
 | 
					 | 
				
			||||||
            primaryStage.show();
 | 
					 | 
				
			||||||
        } catch (IOException e) {
 | 
					 | 
				
			||||||
            LogHelper.error(e.getMessage(), "PresenterMain");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										257
									
								
								src/tourplaner/ui/TourplanerController.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										257
									
								
								src/tourplaner/ui/TourplanerController.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,257 @@
 | 
				
			|||||||
 | 
					package tourplaner.ui;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javafx.collections.ObservableList;
 | 
				
			||||||
 | 
					import javafx.fxml.FXML;
 | 
				
			||||||
 | 
					import javafx.fxml.Initializable;
 | 
				
			||||||
 | 
					import javafx.geometry.Orientation;
 | 
				
			||||||
 | 
					import javafx.scene.control.*;
 | 
				
			||||||
 | 
					import javafx.scene.control.Label;
 | 
				
			||||||
 | 
					import javafx.scene.control.TextField;
 | 
				
			||||||
 | 
					import javafx.scene.control.cell.PropertyValueFactory;
 | 
				
			||||||
 | 
					import javafx.scene.image.ImageView;
 | 
				
			||||||
 | 
					import javafx.scene.input.MouseEvent;
 | 
				
			||||||
 | 
					import tourplaner.business.ConfigHelper;
 | 
				
			||||||
 | 
					import tourplaner.business.LogHelper;
 | 
				
			||||||
 | 
					import tourplaner.business.TourPlaner;
 | 
				
			||||||
 | 
					import tourplaner.object.Log;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					import tourplaner.viewmodels.ViewModel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.net.URI;
 | 
				
			||||||
 | 
					import java.net.URISyntaxException;
 | 
				
			||||||
 | 
					import java.net.URL;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
 | 
					import java.util.ResourceBundle;
 | 
				
			||||||
 | 
					import java.util.UUID;
 | 
				
			||||||
 | 
					import java.util.concurrent.atomic.AtomicReference;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class TourplanerController implements Initializable {
 | 
				
			||||||
 | 
					    //VM
 | 
				
			||||||
 | 
					    private final ViewModel viewModel = new ViewModel();
 | 
				
			||||||
 | 
					    //Tour list -> links
 | 
				
			||||||
 | 
					    public ListView<String> TourListView = new ListView<>();
 | 
				
			||||||
 | 
					    //Tabs zu Tour -> rechts oben
 | 
				
			||||||
 | 
					    public TabPane viewTabPane;
 | 
				
			||||||
 | 
					    public Tab kartenTab, beschreibungTab;
 | 
				
			||||||
 | 
					    public TableView<Tour> beschreibungTableView;
 | 
				
			||||||
 | 
					    public TableColumn<Tour, String> startCol, zielCol, dauerCol, streckeCol, nameCol;
 | 
				
			||||||
 | 
					    public TextField titleTextView, sucheInput;
 | 
				
			||||||
 | 
					    public ImageView mapImageView;
 | 
				
			||||||
 | 
					    //Log -> rechts unten
 | 
				
			||||||
 | 
					    public TableView<Log> logTableView;
 | 
				
			||||||
 | 
					    public TableColumn<Log, String> logDauerCol, logStreckeCol, logDatumCol, logAvgCol, logHightCol, logPauseCol, logGegangenCol, logBemerkungCol;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void tourReport(){
 | 
				
			||||||
 | 
					        this.viewModel.tourReport();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void editTourBtn(){
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            this.viewModel.editTour();
 | 
				
			||||||
 | 
					        } catch (IOException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        syncTour(this.viewModel.getSelectedTour().getName());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void editLogBtn(){
 | 
				
			||||||
 | 
					        this.viewModel.editLog();
 | 
				
			||||||
 | 
					        syncLogs();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet github im standart browser
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void gitWebBrowser(){
 | 
				
			||||||
 | 
					       this.viewModel.gitWebBrowser();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet Java Doc im standart browser
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void javaDocBrowser(){
 | 
				
			||||||
 | 
					       this.viewModel.javaDocBrowser();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet Doxygen Doc im standart browser
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void doxygenDocBrowser(){
 | 
				
			||||||
 | 
					        this.viewModel.doxygenDocBrowser();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void syncTour(String selectedItem){
 | 
				
			||||||
 | 
					        beschreibungTableView.getItems().removeIf(s -> true); //Leert die Table View komplett
 | 
				
			||||||
 | 
					        beschreibungTableView.getItems().add(this.viewModel.getTour(selectedItem));
 | 
				
			||||||
 | 
					        mapImageView.setImage(this.viewModel.getImage(selectedItem));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void syncTourNamen(){
 | 
				
			||||||
 | 
					        TourListView.getItems().removeIf(s -> true);
 | 
				
			||||||
 | 
					        TourListView.setItems(this.viewModel.getTourNamen());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void syncLogs(){
 | 
				
			||||||
 | 
					        logTableView.getItems().removeIf(s -> true);
 | 
				
			||||||
 | 
					        logTableView.setItems(this.viewModel.getLogData());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Wird gestartet wenn eine Tour in der Tour listView ausgewählt wird
 | 
				
			||||||
 | 
					     * @param mouseEvent Triggered Event
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void tourListSelectedItem(MouseEvent mouseEvent){
 | 
				
			||||||
 | 
					        String selectedItem = TourListView.getSelectionModel().getSelectedItem();
 | 
				
			||||||
 | 
					        this.viewModel.selectTour(selectedItem);
 | 
				
			||||||
 | 
					        titleTextView.setText(selectedItem);
 | 
				
			||||||
 | 
					        syncTour(selectedItem);
 | 
				
			||||||
 | 
					        startCol.setCellValueFactory(new PropertyValueFactory<Tour, String>("start"));
 | 
				
			||||||
 | 
					        zielCol.setCellValueFactory(new PropertyValueFactory<Tour, String>("ziel"));
 | 
				
			||||||
 | 
					        dauerCol.setCellValueFactory(new PropertyValueFactory<Tour, String>("dauer"));
 | 
				
			||||||
 | 
					        streckeCol.setCellValueFactory(new PropertyValueFactory<Tour, String>("strecke"));
 | 
				
			||||||
 | 
					        nameCol.setCellValueFactory(new PropertyValueFactory<Tour, String>("name"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //Log anzeigen
 | 
				
			||||||
 | 
					        logTableView.setPlaceholder(new Label( ConfigHelper.getLangIniString("keinelogsvorhanden")));
 | 
				
			||||||
 | 
					        logTableView.getItems().removeIf(s -> true);
 | 
				
			||||||
 | 
					        logTableView.setItems(this.viewModel.getLogData());
 | 
				
			||||||
 | 
					        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"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        mapImageView.setImage(this.viewModel.getImage(this.viewModel.getSelectedTour().getName()));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Beendet die App
 | 
				
			||||||
 | 
					     * Verbunden mit dem Menu -> Datei -> Beenden
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void quitApp(){
 | 
				
			||||||
 | 
					        System.exit(0);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt eine Tour hinzu
 | 
				
			||||||
 | 
					     * Verbunden mit Button -> Tour -> +
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void addTour(){
 | 
				
			||||||
 | 
					        this.viewModel.addTour();
 | 
				
			||||||
 | 
					        this.mapImageView.setImage(this.viewModel.getImage(this.viewModel.getSelectedTour().getName()));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Entfernt eine ausgewählte Tour
 | 
				
			||||||
 | 
					     * Verbunden mit Button -> Tour -> -
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void delTour(){
 | 
				
			||||||
 | 
					        this.beschreibungTableView.getItems().removeIf(s -> true); //löscht alles aus der tabelle
 | 
				
			||||||
 | 
					        this.titleTextView.setText(ConfigHelper.getLangIniString("keinetourselected"));
 | 
				
			||||||
 | 
					        this.viewModel.delTour();
 | 
				
			||||||
 | 
					        logTableView.setPlaceholder(new Label( ConfigHelper.getLangIniString("keinetourselected")));
 | 
				
			||||||
 | 
					        mapImageView.setImage(null);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Sucht eine Tour
 | 
				
			||||||
 | 
					     * Verbunden mit Button -> Suche
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void suche(){
 | 
				
			||||||
 | 
					        this.viewModel.suche(this.sucheInput.getText());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt einen Log eintrag zu einer Tour hinzu.
 | 
				
			||||||
 | 
					     * Ist keine Tour ausgewählt, dann kommt eine Warnung an den User!
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void addLog(){
 | 
				
			||||||
 | 
					        this.viewModel.addLog();
 | 
				
			||||||
 | 
					        syncLogs();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void delLog(){
 | 
				
			||||||
 | 
					        this.viewModel.delLog();
 | 
				
			||||||
 | 
					        syncLogs();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Ein Log eintrag wurde ausgewählt
 | 
				
			||||||
 | 
					     * @param mouseEvent Aktuelles Mouse Event
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void logItemSelected(MouseEvent mouseEvent){
 | 
				
			||||||
 | 
					        this.viewModel.selectLog(logTableView.getSelectionModel().getSelectedItem().getId());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Wird beim Start ausgeführt
 | 
				
			||||||
 | 
					     * @param url
 | 
				
			||||||
 | 
					     * @param resourceBundle
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void initialize(URL url, ResourceBundle resourceBundle) {
 | 
				
			||||||
 | 
					        //Tour list -> links
 | 
				
			||||||
 | 
					        TourListView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
 | 
				
			||||||
 | 
					        TourListView.setOrientation(Orientation.VERTICAL);
 | 
				
			||||||
 | 
					        syncTourNamen();
 | 
				
			||||||
 | 
					        deselectAll();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void deselectAll(){
 | 
				
			||||||
 | 
					        //Tabs zu Tour -> rechts oben
 | 
				
			||||||
 | 
					        beschreibungTableView.setPlaceholder(new Label( ConfigHelper.getLangIniString("keinetourselected")));
 | 
				
			||||||
 | 
					        titleTextView.setText( ConfigHelper.getLangIniString("keinetourselected"));
 | 
				
			||||||
 | 
					        //Log -> rechts unten
 | 
				
			||||||
 | 
					        logTableView.setPlaceholder(new Label( ConfigHelper.getLangIniString("keinetourselected")));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void exportBtn(){
 | 
				
			||||||
 | 
					        this.viewModel.exportData();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void importBtn(){
 | 
				
			||||||
 | 
					        deselectAll();
 | 
				
			||||||
 | 
					        this.viewModel.importData();
 | 
				
			||||||
 | 
					        syncTourNamen();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void reportSum(){
 | 
				
			||||||
 | 
					        this.viewModel.sumReport();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Funktion für noch nicht implementierte sachen wie im Menu der 'Bearbeiten' und 'Optionen' Knopf
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @FXML
 | 
				
			||||||
 | 
					    private void nimpButton(){
 | 
				
			||||||
 | 
					        this.viewModel.nimpButton();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,237 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<!--
 | 
					 | 
				
			||||||
  Copyright (c) 2015, 2019, Gluon and/or its affiliates.
 | 
					 | 
				
			||||||
  All rights reserved. Use is subject to license terms.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  This file is available and licensed under the following license:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  Redistribution and use in source and binary forms, with or without
 | 
					 | 
				
			||||||
  modification, are permitted provided that the following conditions
 | 
					 | 
				
			||||||
  are met:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - Redistributions of source code must retain the above copyright
 | 
					 | 
				
			||||||
    notice, this list of conditions and the following disclaimer.
 | 
					 | 
				
			||||||
  - Redistributions in binary form must reproduce the above copyright
 | 
					 | 
				
			||||||
    notice, this list of conditions and the following disclaimer in
 | 
					 | 
				
			||||||
    the documentation and/or other materials provided with the distribution.
 | 
					 | 
				
			||||||
  - Neither the name of Oracle Corporation nor the names of its
 | 
					 | 
				
			||||||
    contributors may be used to endorse or promote products derived
 | 
					 | 
				
			||||||
    from this software without specific prior written permission.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 | 
					 | 
				
			||||||
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 | 
					 | 
				
			||||||
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 | 
					 | 
				
			||||||
  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 | 
					 | 
				
			||||||
  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 | 
					 | 
				
			||||||
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 | 
					 | 
				
			||||||
  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 | 
					 | 
				
			||||||
  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 | 
					 | 
				
			||||||
  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
					 | 
				
			||||||
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 | 
					 | 
				
			||||||
  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.SeparatorMenuItem?>
 | 
					 | 
				
			||||||
<?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?>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1">
 | 
					 | 
				
			||||||
  <children>
 | 
					 | 
				
			||||||
    <MenuBar VBox.vgrow="NEVER">
 | 
					 | 
				
			||||||
      <menus>
 | 
					 | 
				
			||||||
        <Menu mnemonicParsing="false" text="File">
 | 
					 | 
				
			||||||
          <items>
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="New" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Open…" />
 | 
					 | 
				
			||||||
            <Menu mnemonicParsing="false" text="Open Recent" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Close" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Save" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Save As…" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Revert" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Preferences…" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Quit" />
 | 
					 | 
				
			||||||
          </items>
 | 
					 | 
				
			||||||
        </Menu>
 | 
					 | 
				
			||||||
        <Menu mnemonicParsing="false" text="Edit">
 | 
					 | 
				
			||||||
          <items>
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Undo" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Redo" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Cut" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Copy" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Paste" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Delete" />
 | 
					 | 
				
			||||||
            <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Select All" />
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="Unselect All" />
 | 
					 | 
				
			||||||
          </items>
 | 
					 | 
				
			||||||
        </Menu>
 | 
					 | 
				
			||||||
            <Menu mnemonicParsing="false" text="Options">
 | 
					 | 
				
			||||||
               <items>
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Undo" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Redo" />
 | 
					 | 
				
			||||||
                  <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Cut" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Copy" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Paste" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Delete" />
 | 
					 | 
				
			||||||
                  <SeparatorMenuItem mnemonicParsing="false" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Select All" />
 | 
					 | 
				
			||||||
                  <MenuItem mnemonicParsing="false" text="Unselect All" />
 | 
					 | 
				
			||||||
               </items>
 | 
					 | 
				
			||||||
            </Menu>
 | 
					 | 
				
			||||||
        <Menu mnemonicParsing="false" text="Help">
 | 
					 | 
				
			||||||
          <items>
 | 
					 | 
				
			||||||
            <MenuItem mnemonicParsing="false" text="About MyHelloApp" />
 | 
					 | 
				
			||||||
          </items>
 | 
					 | 
				
			||||||
        </Menu>
 | 
					 | 
				
			||||||
      </menus>
 | 
					 | 
				
			||||||
    </MenuBar>
 | 
					 | 
				
			||||||
      <HBox id="HBox" alignment="CENTER_LEFT" layoutX="10.0" layoutY="588.0" spacing="5.0">
 | 
					 | 
				
			||||||
         <children>
 | 
					 | 
				
			||||||
            <AnchorPane prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS">
 | 
					 | 
				
			||||||
               <children>
 | 
					 | 
				
			||||||
                  <Button layoutX="58.0" mnemonicParsing="false" text="+" />
 | 
					 | 
				
			||||||
                  <Label layoutX="14.0" layoutY="4.0" text="Tours" />
 | 
					 | 
				
			||||||
                  <Button layoutX="89.0" mnemonicParsing="false" text="-" />
 | 
					 | 
				
			||||||
               </children></AnchorPane>
 | 
					 | 
				
			||||||
            <TextField text="Suche...." />
 | 
					 | 
				
			||||||
            <Button mnemonicParsing="false" text="Suchen" />
 | 
					 | 
				
			||||||
         </children>
 | 
					 | 
				
			||||||
         <padding>
 | 
					 | 
				
			||||||
            <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">
 | 
					 | 
				
			||||||
      <items>
 | 
					 | 
				
			||||||
            <AnchorPane prefHeight="520.0" prefWidth="239.0">
 | 
					 | 
				
			||||||
               <children>
 | 
					 | 
				
			||||||
                  <ListView layoutX="-1.0" prefHeight="520.0" prefWidth="190.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                     <padding>
 | 
					 | 
				
			||||||
                        <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
 | 
					 | 
				
			||||||
                     </padding>
 | 
					 | 
				
			||||||
                  </ListView>
 | 
					 | 
				
			||||||
               </children>
 | 
					 | 
				
			||||||
            </AnchorPane>
 | 
					 | 
				
			||||||
            <SplitPane dividerPositions="0.5" orientation="VERTICAL" prefHeight="496.0" prefWidth="620.0">
 | 
					 | 
				
			||||||
               <items>
 | 
					 | 
				
			||||||
                  <VBox prefHeight="200.0" prefWidth="100.0">
 | 
					 | 
				
			||||||
                     <children>
 | 
					 | 
				
			||||||
                        <AnchorPane prefHeight="51.0" prefWidth="676.0">
 | 
					 | 
				
			||||||
                           <children>
 | 
					 | 
				
			||||||
                              <HBox id="HBox" alignment="CENTER_LEFT" prefHeight="7.0" prefWidth="44.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                 <children>
 | 
					 | 
				
			||||||
                                    <Label text="Title:">
 | 
					 | 
				
			||||||
                                       <HBox.margin>
 | 
					 | 
				
			||||||
                                          <Insets left="10.0" />
 | 
					 | 
				
			||||||
                                       </HBox.margin>
 | 
					 | 
				
			||||||
                                    </Label>
 | 
					 | 
				
			||||||
                                    <TextField />
 | 
					 | 
				
			||||||
                                 </children>
 | 
					 | 
				
			||||||
                              </HBox>
 | 
					 | 
				
			||||||
                           </children>
 | 
					 | 
				
			||||||
                        </AnchorPane>
 | 
					 | 
				
			||||||
                        <AnchorPane prefHeight="200.0" prefWidth="200.0">
 | 
					 | 
				
			||||||
                           <children>
 | 
					 | 
				
			||||||
                              <TabPane layoutX="1.0" layoutY="69.0" prefHeight="225.0" prefWidth="702.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="-67.0" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                 <tabs>
 | 
					 | 
				
			||||||
                                    <Tab text="Route" />
 | 
					 | 
				
			||||||
                                    <Tab text="Description">
 | 
					 | 
				
			||||||
                                       <content>
 | 
					 | 
				
			||||||
                                          <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
 | 
					 | 
				
			||||||
                                       </content>
 | 
					 | 
				
			||||||
                                    </Tab>
 | 
					 | 
				
			||||||
                                 </tabs>
 | 
					 | 
				
			||||||
                              </TabPane>
 | 
					 | 
				
			||||||
                           </children>
 | 
					 | 
				
			||||||
                        </AnchorPane>
 | 
					 | 
				
			||||||
                     </children>
 | 
					 | 
				
			||||||
                  </VBox>
 | 
					 | 
				
			||||||
                  <AnchorPane prefHeight="200.0" prefWidth="200.0">
 | 
					 | 
				
			||||||
                     <children>
 | 
					 | 
				
			||||||
                        <VBox prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                           <children>
 | 
					 | 
				
			||||||
                              <AnchorPane prefHeight="51.0" prefWidth="676.0">
 | 
					 | 
				
			||||||
                                 <children>
 | 
					 | 
				
			||||||
                                    <HBox id="HBox" alignment="CENTER_LEFT" prefHeight="38.0" prefWidth="702.0" spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                       <children>
 | 
					 | 
				
			||||||
                                          <Label text="Logs:">
 | 
					 | 
				
			||||||
                                             <HBox.margin>
 | 
					 | 
				
			||||||
                                                <Insets left="10.0" />
 | 
					 | 
				
			||||||
                                             </HBox.margin>
 | 
					 | 
				
			||||||
                                          </Label>
 | 
					 | 
				
			||||||
                                          <Button mnemonicParsing="false" text="+" textAlignment="CENTER">
 | 
					 | 
				
			||||||
                                             <HBox.margin>
 | 
					 | 
				
			||||||
                                                <Insets />
 | 
					 | 
				
			||||||
                                             </HBox.margin>
 | 
					 | 
				
			||||||
                                          </Button>
 | 
					 | 
				
			||||||
                                          <Button mnemonicParsing="false" prefWidth="21.0" text="-" textAlignment="CENTER">
 | 
					 | 
				
			||||||
                                             <HBox.margin>
 | 
					 | 
				
			||||||
                                                <Insets right="10.0" />
 | 
					 | 
				
			||||||
                                             </HBox.margin>
 | 
					 | 
				
			||||||
                                          </Button>
 | 
					 | 
				
			||||||
                                       </children>
 | 
					 | 
				
			||||||
                                       <padding>
 | 
					 | 
				
			||||||
                                          <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
 | 
					 | 
				
			||||||
                                       </padding>
 | 
					 | 
				
			||||||
                                    </HBox>
 | 
					 | 
				
			||||||
                                 </children>
 | 
					 | 
				
			||||||
                              </AnchorPane>
 | 
					 | 
				
			||||||
                              <AnchorPane prefHeight="200.0" prefWidth="200.0">
 | 
					 | 
				
			||||||
                                 <children>
 | 
					 | 
				
			||||||
                                    <TableView prefHeight="209.0" prefWidth="702.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
 | 
					 | 
				
			||||||
                                      <columns>
 | 
					 | 
				
			||||||
                                        <TableColumn prefWidth="238.0" text="Date" />
 | 
					 | 
				
			||||||
                                        <TableColumn prefWidth="223.0" text="Duration" />
 | 
					 | 
				
			||||||
                                          <TableColumn prefWidth="240.0" text="Distance" />
 | 
					 | 
				
			||||||
                                      </columns>
 | 
					 | 
				
			||||||
                                    </TableView>
 | 
					 | 
				
			||||||
                                 </children>
 | 
					 | 
				
			||||||
                              </AnchorPane>
 | 
					 | 
				
			||||||
                           </children>
 | 
					 | 
				
			||||||
                        </VBox>
 | 
					 | 
				
			||||||
                     </children>
 | 
					 | 
				
			||||||
                  </AnchorPane>
 | 
					 | 
				
			||||||
               </items>
 | 
					 | 
				
			||||||
            </SplitPane>
 | 
					 | 
				
			||||||
      </items>
 | 
					 | 
				
			||||||
    </SplitPane>
 | 
					 | 
				
			||||||
    <HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER">
 | 
					 | 
				
			||||||
      <children>
 | 
					 | 
				
			||||||
        <Label maxHeight="1.7976931348623157E308" maxWidth="-1.0" text="Left status" HBox.hgrow="ALWAYS">
 | 
					 | 
				
			||||||
          <font>
 | 
					 | 
				
			||||||
            <Font size="11.0" fx:id="x3" />
 | 
					 | 
				
			||||||
          </font>
 | 
					 | 
				
			||||||
          <textFill>
 | 
					 | 
				
			||||||
            <Color red="0.625" green="0.625" blue="0.625" fx:id="x4" />
 | 
					 | 
				
			||||||
          </textFill>
 | 
					 | 
				
			||||||
        </Label>
 | 
					 | 
				
			||||||
        <AnchorPane prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS" />
 | 
					 | 
				
			||||||
        <Label font="$x3" maxWidth="-1.0" text="Right status" textFill="$x4" HBox.hgrow="NEVER" />
 | 
					 | 
				
			||||||
      </children>
 | 
					 | 
				
			||||||
      <padding>
 | 
					 | 
				
			||||||
        <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
 | 
					 | 
				
			||||||
      </padding>
 | 
					 | 
				
			||||||
    </HBox>
 | 
					 | 
				
			||||||
  </children>
 | 
					 | 
				
			||||||
</VBox>
 | 
					 | 
				
			||||||
							
								
								
									
										624
									
								
								src/tourplaner/viewmodels/ViewModel.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										624
									
								
								src/tourplaner/viewmodels/ViewModel.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,624 @@
 | 
				
			|||||||
 | 
					package tourplaner.viewmodels;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javafx.collections.FXCollections;
 | 
				
			||||||
 | 
					import javafx.collections.ObservableList;
 | 
				
			||||||
 | 
					import javafx.scene.image.Image;
 | 
				
			||||||
 | 
					import tourplaner.business.*;
 | 
				
			||||||
 | 
					import tourplaner.ui.AlertHelper;
 | 
				
			||||||
 | 
					import tourplaner.object.Log;
 | 
				
			||||||
 | 
					import tourplaner.object.Tour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import java.io.FileNotFoundException;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.net.URI;
 | 
				
			||||||
 | 
					import java.net.URISyntaxException;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.UUID;
 | 
				
			||||||
 | 
					import java.util.concurrent.atomic.AtomicInteger;
 | 
				
			||||||
 | 
					import java.util.concurrent.atomic.AtomicReference;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class ViewModel {
 | 
				
			||||||
 | 
					    //Tour
 | 
				
			||||||
 | 
					    private final ObservableList<Tour> tourData = FXCollections.observableArrayList();
 | 
				
			||||||
 | 
					    private ObservableList<String> tourNamen = FXCollections.observableArrayList();
 | 
				
			||||||
 | 
					    private Tour selectedTour;
 | 
				
			||||||
 | 
					    private String neueTourName, neueTourStart, neueTourZiel, neueBemerkung;
 | 
				
			||||||
 | 
					    //Log
 | 
				
			||||||
 | 
					    private final ObservableList<Log> logData = FXCollections.observableArrayList();
 | 
				
			||||||
 | 
					    private Log selectedLog;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Image getImage(String tourname){
 | 
				
			||||||
 | 
					        return new Image( ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "map", "file_pre") + TourPlaner.getImagePath(tourname));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Bearbeitet eine bereits bestehende Tour
 | 
				
			||||||
 | 
					     * prüft ob eine tour ausgewählt ist
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void editTour() throws IOException {
 | 
				
			||||||
 | 
					        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()));
 | 
				
			||||||
 | 
					                            Tour newTour = new Tour(this.neueTourName, "TBD", "TBD", 0, this.neueTourStart, this.neueTourZiel);
 | 
				
			||||||
 | 
					                            this.tourData.add(newTour);
 | 
				
			||||||
 | 
					                            this.tourNamen.add(this.neueTourName);
 | 
				
			||||||
 | 
					                            LogHelper.info("Edit Tour: " + this.neueTourName + " upload zu Postgres war: " + TourPlaner.editTour(this.selectedTour.getName(), newTour), "ViewModel - EditTour");
 | 
				
			||||||
 | 
					                            selectTour(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 true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Fügt eine neue Tour hinzu
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void addTour(){
 | 
				
			||||||
 | 
					        tourNameInput();
 | 
				
			||||||
 | 
					        tourStartInput("");
 | 
				
			||||||
 | 
					        tourZielInput("");
 | 
				
			||||||
 | 
					        if (getTour(this.neueTourName) == null) {
 | 
				
			||||||
 | 
					            Tour newTour = new Tour(this.neueTourName, "1", "1", 0, this.neueTourStart, this.neueTourZiel);
 | 
				
			||||||
 | 
					            tourData.add(newTour);
 | 
				
			||||||
 | 
					            tourNamen.add(this.neueTourName);
 | 
				
			||||||
 | 
					            this.selectedTour = newTour;
 | 
				
			||||||
 | 
					            try {
 | 
				
			||||||
 | 
					                TourPlaner.addTour(newTour);
 | 
				
			||||||
 | 
					            } catch (IOException e) {
 | 
				
			||||||
 | 
					                e.printStackTrace();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        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());
 | 
				
			||||||
 | 
					                                TourPlaner.editLog(this.selectedTour.getName(), newLog);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        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<>();
 | 
				
			||||||
 | 
					                    newId.set(UUID.randomUUID().toString());
 | 
				
			||||||
 | 
					                    this.logData.forEach(ss -> {
 | 
				
			||||||
 | 
					                        if (ss.getId().equals(newId.get())) {
 | 
				
			||||||
 | 
					                            newId.set(UUID.randomUUID().toString());
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    });
 | 
				
			||||||
 | 
					                    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);
 | 
				
			||||||
 | 
					                                            TourPlaner.addLog(this.selectedTour.getName(), newLog);
 | 
				
			||||||
 | 
					                                            s.addLog(newLog);
 | 
				
			||||||
 | 
					                                        }
 | 
				
			||||||
 | 
					                                    }
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            this.neueBemerkung = null;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Entfernt ein Log anhand des selectierten Logs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void delLog(){
 | 
				
			||||||
 | 
					        if(this.selectedLog != null) {
 | 
				
			||||||
 | 
					                TourPlaner.delLog(this.selectedTour.getName(), this.selectedLog.getId());
 | 
				
			||||||
 | 
					                this.selectedLog = null;
 | 
				
			||||||
 | 
					        }else{
 | 
				
			||||||
 | 
					            AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("keinetourselected"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("deltournoselectmsg"));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Selectiert ein Log anhand der Id
 | 
				
			||||||
 | 
					     * @param id Id welche zu selectieren ist
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void selectLog(String id){
 | 
				
			||||||
 | 
					        this.selectedLog = getLog(id);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt das selectierte Log als Log Objekt
 | 
				
			||||||
 | 
					     * @return Das selectierte Log Objekt
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Log getSelectedLog(){
 | 
				
			||||||
 | 
					        return this.selectedLog;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt ein Log anhand seiner ID
 | 
				
			||||||
 | 
					     * @param id Id des Log Eintrags
 | 
				
			||||||
 | 
					     * @return Das gefundene Log
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Log getLog(String id){
 | 
				
			||||||
 | 
					        AtomicReference<Log> returnLog = new AtomicReference<>();
 | 
				
			||||||
 | 
					        this.logData.forEach(s -> {
 | 
				
			||||||
 | 
					            if(s.getId().equals(id)){
 | 
				
			||||||
 | 
					                returnLog.set(s);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        return returnLog.get();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ObservableList<Log> getLogData() {
 | 
				
			||||||
 | 
					        logData.removeAll();
 | 
				
			||||||
 | 
					        logData.addAll(TourPlaner.getLogs(this.selectedTour.getName()));
 | 
				
			||||||
 | 
					        return logData;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setSelectedTour(Tour selectedTour) {
 | 
				
			||||||
 | 
					        this.selectedTour = selectedTour;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Holt das Tourobjekt anhand des Namens
 | 
				
			||||||
 | 
					     * @param tourname Name der Tour
 | 
				
			||||||
 | 
					     * @return Gefundene Tour
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Tour getTour(String tourname){
 | 
				
			||||||
 | 
					        AtomicReference<Tour> returnTour = new AtomicReference<>();
 | 
				
			||||||
 | 
					        tourData.forEach(s -> {
 | 
				
			||||||
 | 
					            if(s.getName().equals(tourname)){
 | 
				
			||||||
 | 
					                returnTour.set(s);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        return returnTour.get();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Selectiert eine Tour anhand des eindeutigen Namens
 | 
				
			||||||
 | 
					     * @param tourname Der Name der Tour
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void selectTour(String tourname){
 | 
				
			||||||
 | 
					        this.selectedTour = getTour(tourname);
 | 
				
			||||||
 | 
					        this.logData.removeIf(s -> true); // Löscht alles aus dem Array
 | 
				
			||||||
 | 
					        this.logData.addAll(this.selectedTour.getLogs());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//    /**
 | 
				
			||||||
 | 
					//     * Selectiert eine Tour anhand des Tour Objects.
 | 
				
			||||||
 | 
					//     * Kann z.b. verwerndet werden um das selectierte Tour Object zu bearbeiten
 | 
				
			||||||
 | 
					//     * @param selected
 | 
				
			||||||
 | 
					//     */
 | 
				
			||||||
 | 
					//    public void setSelectedTour(Tour selected){
 | 
				
			||||||
 | 
					//        this.selectedTour = selected;
 | 
				
			||||||
 | 
					//    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Tour getSelectedTour() {
 | 
				
			||||||
 | 
					        return selectedTour;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getNeueTourZiel() {
 | 
				
			||||||
 | 
					        return neueTourZiel;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setNeueTourZiel(String neueTourZiel) {
 | 
				
			||||||
 | 
					        this.neueTourZiel = neueTourZiel;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ObservableList<String> getTourNamen() {
 | 
				
			||||||
 | 
					        ArrayList<String> namen = new ArrayList<>();
 | 
				
			||||||
 | 
					        getTourData().forEach(s -> {
 | 
				
			||||||
 | 
					            namen.add(s.getName());
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        tourNamen.removeAll();
 | 
				
			||||||
 | 
					        tourNamen.addAll(namen);
 | 
				
			||||||
 | 
					        return tourNamen;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getNeueTourName() {
 | 
				
			||||||
 | 
					        return neueTourName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setNeueTourName(String neueTourName) {
 | 
				
			||||||
 | 
					        this.neueTourName = neueTourName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getNeueTourStart() {
 | 
				
			||||||
 | 
					        return neueTourStart;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setNeueTourStart(String neueTourStart) {
 | 
				
			||||||
 | 
					        this.neueTourStart = neueTourStart;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ObservableList<Tour> getTourData() {
 | 
				
			||||||
 | 
					        tourData.removeAll();
 | 
				
			||||||
 | 
					        tourData.addAll(TourPlaner.getAllTours());
 | 
				
			||||||
 | 
					        return tourData;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Entfernt eine Tour anhand der ausgewählten Tour
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void delTour(){
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            String tourname = this.selectedTour.getName();
 | 
				
			||||||
 | 
					            tourData.removeIf(s -> s.getName().equals(tourname));
 | 
				
			||||||
 | 
					            tourNamen.removeIf(s -> s.equals(tourname));
 | 
				
			||||||
 | 
					            logData.removeIf(s -> true);
 | 
				
			||||||
 | 
					            setSelectedTour(null);
 | 
				
			||||||
 | 
					            TourPlaner.delTour(tourname);
 | 
				
			||||||
 | 
					        }catch (NullPointerException e){
 | 
				
			||||||
 | 
					            LogHelper.error(ConfigHelper.getLangIniString("keinetourselected"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("deltournoselect"));
 | 
				
			||||||
 | 
					            AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("keinetourselected"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("deltournoselectmsg"));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Sucht eine Tour
 | 
				
			||||||
 | 
					     * @param sucheInput Text nach dem gesucht werden soll
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void suche(String sucheInput){
 | 
				
			||||||
 | 
					        if(sucheInput.isEmpty()){
 | 
				
			||||||
 | 
					            AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("suchfeldleer"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("suchtextzuerst"));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					            // TODO: 19.03.2021 Suchlogik
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet github im standart browser
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void gitWebBrowser(){
 | 
				
			||||||
 | 
					        openBrowser(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "hilfe", "gitrepo"), "Git");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet Java Doc im standart browser
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void javaDocBrowser(){
 | 
				
			||||||
 | 
					        openBrowser(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "hilfe", "javadoc"), "JavaDoc");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet Doxygen Doc im standart browser
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void doxygenDocBrowser(){
 | 
				
			||||||
 | 
					        openBrowser(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "hilfe", "doxygendoc"), "Doxygen");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Öffnet einen link im Standart Browser
 | 
				
			||||||
 | 
					     * @param uriString
 | 
				
			||||||
 | 
					     * @param appname
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private void openBrowser(String uriString, String appname){
 | 
				
			||||||
 | 
					        Desktop desktop = java.awt.Desktop.getDesktop();
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            URI oURL = new URI(
 | 
				
			||||||
 | 
					                    uriString);
 | 
				
			||||||
 | 
					            desktop.browse(oURL);
 | 
				
			||||||
 | 
					        } catch (URISyntaxException | IOException e) {
 | 
				
			||||||
 | 
					            LogHelper.error(e.getMessage(), ConfigHelper.getLangIniString("openbrowsererror") + appname);
 | 
				
			||||||
 | 
					            AlertHelper.exerror(ConfigHelper.getLangIniString("browserexception"),
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("openbrowsererror") + appname,
 | 
				
			||||||
 | 
					                    ConfigHelper.getLangIniString("browserexceptionmsg"), e);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Funktion für noch nicht implementierte sachen wie im Menu der 'Bearbeiten' und 'Optionen' Knopf
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void nimpButton(){
 | 
				
			||||||
 | 
					        AlertHelper.inform(ConfigHelper.getLangIniString("achtung"),
 | 
				
			||||||
 | 
					                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 {
 | 
				
			||||||
 | 
					           TourPlaner.doReport(this.selectedTour.getName());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Exportiert alle daten in ein File das hier gewählt wird
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void exportData(){
 | 
				
			||||||
 | 
					        String file = AlertHelper.fileChooser("Exportiere");
 | 
				
			||||||
 | 
					        System.out.println("EXPORT: " + file);
 | 
				
			||||||
 | 
					        if(file != null){
 | 
				
			||||||
 | 
					            try {
 | 
				
			||||||
 | 
					                new Exporter(file).doExport();
 | 
				
			||||||
 | 
					            } catch (IOException e) {
 | 
				
			||||||
 | 
					                AlertHelper.error("Error", "Export Error", "Fehler beim Exportieren");
 | 
				
			||||||
 | 
					                LogHelper.error(e);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Importiert alle daten von einem File das hier gewählt wird
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void importData() {
 | 
				
			||||||
 | 
					        String file = AlertHelper.fileChooser("Importiere");
 | 
				
			||||||
 | 
					        System.out.println("IMPORT: " + file);
 | 
				
			||||||
 | 
					        if (file != null){
 | 
				
			||||||
 | 
					            try {
 | 
				
			||||||
 | 
					                this.tourNamen = FXCollections.observableArrayList();
 | 
				
			||||||
 | 
					                new Exporter(file).doImport();
 | 
				
			||||||
 | 
					            } catch (IOException e) {
 | 
				
			||||||
 | 
					                AlertHelper.error("Error", "Import Error", "Fehler beim Importieren");
 | 
				
			||||||
 | 
					                LogHelper.error(e);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Erstellt einen Summary Report
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void sumReport(){
 | 
				
			||||||
 | 
					        Reporter.sumReport();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user