Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
2265014db3 | |||
100da38493 | |||
0b8f8f996d | |||
5d860eed3c | |||
c31728a92b | |||
e5c9e8dbf0 | |||
a2164dc303 | |||
1ff4a2cd6c | |||
c5d51edf57 | |||
526c47a643 | |||
2360566063 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
out/
|
||||
conf.ini
|
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/
|
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>
|
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>
|
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>
|
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,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<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="log4j:log4j:1.2.17" level="project" />
|
||||
</component>
|
||||
</module>
|
19
conf.ini.sample
Normal file
19
conf.ini.sample
Normal file
@ -0,0 +1,19 @@
|
||||
[start]
|
||||
message = Tour Planer App gestartet
|
||||
apptitle = Tour Planer
|
||||
logo = logo.png
|
||||
|
||||
[lang]
|
||||
lang = langde
|
||||
|
||||
[db]
|
||||
dbname = tourplaner
|
||||
url =
|
||||
port = 5432
|
||||
user =
|
||||
pw =
|
||||
|
||||
[hilfe]
|
||||
gitrepo = https://git.dergeorg.at/dergeorg/tourplaner
|
||||
doxygendoc = https://git.dergeorg.at/dergeorg/tourplaner
|
||||
javadoc = https://git.dergeorg.at/dergeorg/tourplaner
|
@ -5,14 +5,14 @@
|
||||
<simplesect>
|
||||
<title>Classes </title>
|
||||
<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>
|
||||
</itemizedlist>
|
||||
</simplesect>
|
||||
<simplesect>
|
||||
<title>Packages </title>
|
||||
<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>
|
||||
</itemizedlist>
|
||||
</simplesect>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?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">
|
||||
<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'?>
|
||||
<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>
|
||||
<indexterm><primary>tourplaner.model.Tour</primary></indexterm>
|
||||
<title>tourplaner.object.Tour Class Reference</title>
|
||||
<indexterm><primary>tourplaner.object.Tour</primary></indexterm>
|
||||
<section>
|
||||
<title>Detailed Description</title>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
<title>Package tourplaner.model</title>
|
||||
<indexterm><primary>tourplaner.model</primary></indexterm>
|
||||
<title>Package tourplaner.object</title>
|
||||
<indexterm><primary>tourplaner.object</primary></indexterm>
|
||||
<simplesect>
|
||||
<title>Classes </title>
|
||||
<itemizedlist>
|
||||
|
@ -93,12 +93,12 @@ $(document).ready(function(){initNavTree('_tour_8java.html',''); initResizable()
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
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>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
|
||||
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>
|
||||
</table>
|
||||
</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>
|
||||
<dl class="classindex even">
|
||||
<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><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.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"/>
|
||||
<script type="text/javascript" src="jquery.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="headertitle">
|
||||
<div class="title">tourplaner.model.Tour Class Reference</div> </div>
|
||||
<div class="title">tourplaner.object.Tour Class Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<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_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_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_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>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.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"/>
|
||||
<script type="text/javascript" src="jquery.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">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Package tourplaner.model</div> </div>
|
||||
<div class="title">Package tourplaner.object</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
|
@ -1,5 +1,5 @@
|
||||
\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}
|
||||
|
@ -1,5 +1,5 @@
|
||||
\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}
|
||||
\begin{DoxyCompactItemize}
|
||||
\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
|
||||
.nh
|
||||
.SH NAME
|
||||
tourplaner.model
|
||||
tourplaner.object
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.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
|
||||
.nh
|
||||
.SH NAME
|
||||
tourplaner.model.Tour
|
||||
tourplaner.object.Tour
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.PP
|
||||
|
@ -127,7 +127,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</th>
|
||||
</tr>
|
||||
<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">
|
||||
<div class="block">Model einer Tour</div>
|
||||
</th>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<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/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>
|
||||
</ul>
|
||||
</main>
|
||||
|
@ -118,7 +118,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<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>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
|
@ -1,5 +1,5 @@
|
||||
tourplaner
|
||||
tourplaner.business
|
||||
tourplaner.data
|
||||
tourplaner.model
|
||||
tourplaner.object
|
||||
tourplaner.ui
|
||||
|
@ -97,11 +97,11 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</a>
|
||||
<h2 class="title">T</h2>
|
||||
<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>
|
||||
<div class="block">Model einer Tour</div>
|
||||
</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>
|
||||
<dt><a href="../tourplaner/package-summary.html">tourplaner</a> - package tourplaner</dt>
|
||||
<dd> </dd>
|
||||
@ -117,7 +117,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<dd> </dd>
|
||||
<dt><a href="../tourplaner/data/package-summary.html">tourplaner.data</a> - package tourplaner.data</dt>
|
||||
<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>
|
||||
<dt><a href="../tourplaner/ui/package-summary.html">tourplaner.ui</a> - package tourplaner.ui</dt>
|
||||
<dd> </dd>
|
||||
|
@ -113,7 +113,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<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>
|
||||
</tr>
|
||||
<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/business/package-tree.html">tourplaner.business</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>
|
||||
</ul>
|
||||
</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.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.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>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -109,7 +109,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<main role="main">
|
||||
<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>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
@ -117,7 +117,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>tourplaner.model.Tour</li>
|
||||
<li>tourplaner.object.Tour</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- 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 name="dc.created" content="2021-02-25">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
@ -93,7 +93,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</header>
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package tourplaner.model</h1>
|
||||
<h1 title="Package" class="title">Package tourplaner.object</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
@ -106,7 +106,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</tr>
|
||||
<tbody>
|
||||
<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">
|
||||
<div class="block">Model einer Tour</div>
|
||||
</td>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- 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 name="dc.created" content="2021-02-25">
|
||||
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
|
||||
@ -93,7 +93,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
</header>
|
||||
<main role="main">
|
||||
<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>
|
||||
<ul class="horizontal">
|
||||
<li><a href="../../overview-tree.html">All Packages</a></li>
|
||||
@ -105,7 +105,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
<ul>
|
||||
<li class="circle">java.lang.Object
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
|
36
langde.ini
Normal file
36
langde.ini
Normal file
@ -0,0 +1,36 @@
|
||||
[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!
|
@ -1,6 +1,13 @@
|
||||
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
|
||||
2021-03-18 22:41:23 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:48:51 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:53:17 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:57:20 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:57:28 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:58:33 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 22:58:34 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 23:05:00 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 23:11:45 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-18 23:14:55 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-19 11:56:22 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-19 22:35:19 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
2021-03-19 23:23:36 ERROR ViewModel -> DelTour:33 - Keine Tour ausgewählt!
|
||||
|
@ -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,19 +1,29 @@
|
||||
package tourplaner;
|
||||
|
||||
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 tourplaner.business.TourPlaner;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class Main extends Application {
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
public static void main(String[] args){
|
||||
launch(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception{
|
||||
TourPlaner tourplaner = new TourPlaner(primaryStage);
|
||||
public void start(Stage primaryStage) throws IOException {
|
||||
Parent root = FXMLLoader.load(Main.class.getResource("tourplaner.fxml"));
|
||||
primaryStage.setTitle(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "apptitle"));
|
||||
primaryStage.getIcons().add(new Image("file:"+ ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "logo")));
|
||||
primaryStage.setScene(new Scene(root, 600, 600));
|
||||
primaryStage.show();
|
||||
}
|
||||
}
|
||||
|
@ -5,34 +5,110 @@ import org.ini4j.Wini;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Dient dem ein und auslesen von .ini Dateien
|
||||
*/
|
||||
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 {
|
||||
Wini ini = new Wini(new File(filename));
|
||||
/**
|
||||
* Liest einen Int aus der Config aus
|
||||
* @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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public static void setIniString(String filename, String sectionName, String optionName, String value) throws IOException {
|
||||
Wini ini = new Wini(new File(filename));
|
||||
ini.put(sectionName, optionName, value);
|
||||
ini.store();
|
||||
/**
|
||||
* Liest einen String aus der Lang datei aus
|
||||
* Die Sprache wird im config file umgestellt
|
||||
* @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
|
||||
* @param filename Speicherort
|
||||
* @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() {
|
||||
return standartConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt den namen des standard langde file zurück
|
||||
* @return Name des standard langde files
|
||||
*/
|
||||
public static String getStandartLangde() {
|
||||
return standartLangDe;
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import org.apache.log4j.*;
|
||||
*/
|
||||
public class LogHelper{
|
||||
/**
|
||||
* Logging in file und Console
|
||||
* Log info in file und Console
|
||||
* @param msg Nachricht in dem Log
|
||||
* @param name Name des Log Eintrags
|
||||
*/
|
||||
@ -15,20 +15,40 @@ public class LogHelper{
|
||||
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){
|
||||
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){
|
||||
getLog(name).error(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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){
|
||||
getLog(name).fatal(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Instanziert den Logger
|
||||
* @param name Name des Loggers
|
||||
* @return Den Logger
|
||||
*/
|
||||
private static Logger getLog(String name){
|
||||
return Logger.getLogger(name); // Initialiesiert das Logging
|
||||
return Logger.getLogger(name); // Instanziert den Logger
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,7 @@
|
||||
package tourplaner.business;
|
||||
|
||||
import javafx.stage.Stage;
|
||||
import org.apache.log4j.Logger;
|
||||
import tourplaner.ui.PresenterMain;
|
||||
|
||||
import java.io.IOException;
|
||||
import tourplaner.data.DbConnect;
|
||||
|
||||
/**
|
||||
* Haupt Logik des Tourplaners
|
||||
@ -12,18 +9,14 @@ import java.io.IOException;
|
||||
public class TourPlaner{
|
||||
private Logger logger;
|
||||
|
||||
/**
|
||||
* Startet alle bennötigten Komponenten
|
||||
* @param primaryStage Stage für den Presenter
|
||||
*/
|
||||
public TourPlaner(Stage primaryStage){
|
||||
try {
|
||||
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");
|
||||
}
|
||||
public TourPlaner(){
|
||||
LogHelper.info(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "message"),
|
||||
ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "app"));
|
||||
new DbConnect().init();
|
||||
|
||||
}
|
||||
|
||||
public String getMapJson(String start, String ziel){
|
||||
return start + " " + ziel;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,35 @@
|
||||
package tourplaner.data;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Verwaltet die Datenbankverbindung zu dem Postgres Server
|
||||
*/
|
||||
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() {
|
||||
// TODO: 26.02.2021 Alle sql im init sind noch falsch
|
||||
ArrayList<Boolean> errors = new ArrayList<>();
|
||||
errors.add(PostgresHelper.executeUpdateMessage("CREATE TABLE IF NOT EXISTS USERS (username TEXT PRIMARY KEY NOT NULL, nachname TEXT NOT NULL, email TEXT NOT NULL, password TEXT NOT NULL, bio TEXT, image TEXT, coins integer default 20 not null)", "User Table created"));
|
||||
return !errors.contains(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
63
src/tourplaner/data/PostgresHelper.java
Normal file
63
src/tourplaner/data/PostgresHelper.java
Normal file
@ -0,0 +1,63 @@
|
||||
package tourplaner.data;
|
||||
|
||||
|
||||
import tourplaner.business.ConfigHelper;
|
||||
import tourplaner.business.LogHelper;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.Statement;
|
||||
|
||||
/**
|
||||
* Hilfsfunktionen für die verwendung der Postgres DB
|
||||
*/
|
||||
public class PostgresHelper {
|
||||
|
||||
/**
|
||||
* Verbindet mit der Datenbank
|
||||
* @return Das Connection Objekt
|
||||
*/
|
||||
public static Connection con() {
|
||||
Connection c = null;
|
||||
try {
|
||||
Class.forName("org.postgresql.Driver");
|
||||
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 {
|
||||
}
|
51
src/tourplaner/object/Log.java
Normal file
51
src/tourplaner/object/Log.java
Normal file
@ -0,0 +1,51 @@
|
||||
package tourplaner.object;
|
||||
|
||||
import jdk.jshell.spi.ExecutionControl;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
public class Log {
|
||||
private String id, dauer;
|
||||
private LocalDate datum;
|
||||
private double strecke;
|
||||
|
||||
public Log(String id, String dauer, LocalDate datum, double strecke) {
|
||||
this.id = id;
|
||||
this.dauer = dauer;
|
||||
this.datum = datum;
|
||||
this.strecke = strecke;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDauer() {
|
||||
return dauer;
|
||||
}
|
||||
|
||||
public void setDauer(String 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;
|
||||
}
|
||||
}
|
110
src/tourplaner/object/Tour.java
Normal file
110
src/tourplaner/object/Tour.java
Normal file
@ -0,0 +1,110 @@
|
||||
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<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
@ -32,91 +32,51 @@
|
||||
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?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.paint.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<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 mnemonicParsing="false" text="File">
|
||||
<Menu fx:id="menueFile" mnemonicParsing="false" text="Datei">
|
||||
<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" />
|
||||
<MenuItem fx:id="beendenButton" mnemonicParsing="false" onAction="#quitApp" text="Beenden" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Edit">
|
||||
<Menu mnemonicParsing="false" text="Bearbeiten">
|
||||
<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" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#nimpButton" text="Keine Funktion" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Options">
|
||||
<Menu mnemonicParsing="false" text="Optionen">
|
||||
<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" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#nimpButton" text="Keine Funktion" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Help">
|
||||
<Menu mnemonicParsing="false" text="Hilfe">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" text="About MyHelloApp" />
|
||||
<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 prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS">
|
||||
<AnchorPane prefWidth="-1.0" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Button layoutX="58.0" mnemonicParsing="false" text="+" />
|
||||
<Button fx:id="tourAdd" layoutX="58.0" mnemonicParsing="false" onAction="#addTour" text="+" />
|
||||
<Label layoutX="14.0" layoutY="4.0" text="Tours" />
|
||||
<Button layoutX="89.0" mnemonicParsing="false" text="-" />
|
||||
<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 text="Suche...." />
|
||||
<Button mnemonicParsing="false" text="Suchen" />
|
||||
<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" />
|
||||
@ -124,20 +84,16 @@
|
||||
</HBox>
|
||||
<SplitPane dividerPositions="0.21492204899777284" focusTraversable="true" prefHeight="522.0" prefWidth="900.0" VBox.vgrow="ALWAYS">
|
||||
<items>
|
||||
<AnchorPane prefHeight="520.0" prefWidth="239.0">
|
||||
<AnchorPane 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>
|
||||
<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 prefHeight="200.0" prefWidth="100.0">
|
||||
<VBox prefWidth="100.0">
|
||||
<children>
|
||||
<AnchorPane prefHeight="51.0" prefWidth="676.0">
|
||||
<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>
|
||||
@ -146,19 +102,34 @@
|
||||
<Insets left="10.0" />
|
||||
</HBox.margin>
|
||||
</Label>
|
||||
<TextField />
|
||||
<TextField fx:id="titleTextView" editable="false" />
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="200.0" prefWidth="200.0">
|
||||
<AnchorPane 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">
|
||||
<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 text="Route" />
|
||||
<Tab text="Description">
|
||||
<Tab fx:id="kartenTab" text="Karte">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
|
||||
<AnchorPane />
|
||||
</content></Tab>
|
||||
<Tab fx:id="beschreibungTab" text="Beschreibung">
|
||||
<content>
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<TableView fx:id="beschreibungTableView" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<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>
|
||||
@ -167,29 +138,30 @@
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</VBox>
|
||||
<AnchorPane prefHeight="200.0" prefWidth="200.0">
|
||||
<AnchorPane 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">
|
||||
<VBox 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">
|
||||
<AnchorPane 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">
|
||||
<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" text="+" textAlignment="CENTER">
|
||||
<Button mnemonicParsing="false" onAction="#addLog" text="+" textAlignment="CENTER">
|
||||
<HBox.margin>
|
||||
<Insets />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" prefWidth="21.0" text="-" textAlignment="CENTER">
|
||||
<Button fx:id="logDel" mnemonicParsing="false" onAction="#delLog" prefWidth="21.0" text="-" textAlignment="CENTER">
|
||||
<HBox.margin>
|
||||
<Insets right="10.0" />
|
||||
<Insets />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onAction="#editLogBtn" text="Edit" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
|
||||
@ -197,14 +169,17 @@
|
||||
</HBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane prefHeight="200.0" prefWidth="200.0">
|
||||
<AnchorPane 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">
|
||||
<TableView fx:id="logTableView" onMouseClicked="#logItemSelected" 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" />
|
||||
<TableColumn fx:id="logDatumCol" prefWidth="238.0" text="Datum" />
|
||||
<TableColumn fx:id="logDauerCol" prefWidth="223.0" text="Dauer" />
|
||||
<TableColumn fx:id="logStreckeCol" prefWidth="240.0" text="Entfernung" />
|
||||
</columns>
|
||||
<columnResizePolicy>
|
||||
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
|
||||
</columnResizePolicy>
|
||||
</TableView>
|
||||
</children>
|
||||
</AnchorPane>
|
220
src/tourplaner/ui/AlertHelper.java
Normal file
220
src/tourplaner/ui/AlertHelper.java
Normal file
@ -0,0 +1,220 @@
|
||||
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 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
|
||||
* @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) {
|
||||
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()) {
|
||||
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();
|
||||
}
|
||||
}
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
197
src/tourplaner/ui/TourplanerController.java
Normal file
197
src/tourplaner/ui/TourplanerController.java
Normal file
@ -0,0 +1,197 @@
|
||||
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.input.MouseEvent;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
import tourplaner.business.LogHelper;
|
||||
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;
|
||||
//Log -> rechts unten
|
||||
public TableView<Log> logTableView;
|
||||
public TableColumn<Log, String> logDauerCol, logStreckeCol, logDatumCol;
|
||||
|
||||
|
||||
@FXML
|
||||
private void editTourBtn(){
|
||||
this.viewModel.editTour();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void editLogBtn(){
|
||||
this.viewModel.editLog();
|
||||
}
|
||||
/**
|
||||
* Ö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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
beschreibungTableView.getItems().removeIf(s -> true); //Leert die Table View komplett
|
||||
beschreibungTableView.getItems().add(this.viewModel.getTour(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.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"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void delLog(){
|
||||
this.viewModel.delLog();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
TourListView.setItems(this.viewModel.getTourNamen());
|
||||
//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")));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>
|
498
src/tourplaner/viewmodels/ViewModel.java
Normal file
498
src/tourplaner/viewmodels/ViewModel.java
Normal file
@ -0,0 +1,498 @@
|
||||
package tourplaner.viewmodels;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import tourplaner.ui.AlertHelper;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
import tourplaner.business.LogHelper;
|
||||
import tourplaner.object.Log;
|
||||
import tourplaner.object.Tour;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class ViewModel {
|
||||
//Tour
|
||||
private final ObservableList<Tour> tourData = FXCollections.observableArrayList(new Tour("Test 1", "120", "json dings", 22.3, "Wien", "Graz"),new Tour("Test 2", "210", "json dings", 42.3, "Da", "Dort"));
|
||||
private final ObservableList<String> tourNamen = FXCollections.observableArrayList("Test 1", "Test 2");
|
||||
private Tour selectedTour;
|
||||
private String neueTourName, neueTourStart, neueTourZiel;
|
||||
//Log
|
||||
private final ObservableList<Log> logData = FXCollections.observableArrayList();
|
||||
private Log selectedLog;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Bearbeitet eine bereits bestehende Tour
|
||||
* prüft ob eine tour ausgewählt ist
|
||||
*/
|
||||
public void editTour(){
|
||||
if (this.selectedTour == null){
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("keinetourselected"),
|
||||
ConfigHelper.getLangIniString("logtournotselectedmsg"));
|
||||
}else {
|
||||
AtomicInteger index = new AtomicInteger(-1);
|
||||
AtomicInteger aktIndex = new AtomicInteger(-1);
|
||||
this.tourData.forEach(s -> {
|
||||
index.getAndIncrement();
|
||||
if (s.getName().equals(this.selectedTour.getName())) {
|
||||
aktIndex.set(index.intValue());
|
||||
}
|
||||
});
|
||||
if(aktIndex.intValue() != -1){
|
||||
|
||||
if(tourNameInputDuplicatCheck(this.selectedTour.getName(), false)) {
|
||||
if (tourStartInput(this.selectedTour.getStart())) {
|
||||
if (tourZielInput(this.selectedTour.getZiel())) {
|
||||
|
||||
this.tourData.removeIf(tour -> tour.getName().equals(this.selectedTour.getName()));
|
||||
this.tourNamen.removeIf(tour -> tour.equals(this.selectedTour.getName()));
|
||||
this.tourData.add(new Tour(this.neueTourName, "TBD", "TBD", 0, this.neueTourStart, this.neueTourZiel));
|
||||
this.tourNamen.add(this.neueTourName);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.neueTourName = null;
|
||||
this.neueTourStart = null;
|
||||
this.neueTourZiel = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Input mit duplications check des Namens und ohne content im input feld
|
||||
*/
|
||||
private void tourNameInput(){
|
||||
tourNameInputDuplicatCheck("", true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Input des Tour Namen wird so lange durchgeführt, bis er korrekt ist. Das heißt:
|
||||
* er darf nicht schon vorhanden sein und er darf nicht Null sein
|
||||
* @param checkDuplicate Prüft ob name bereits vorhanden ist
|
||||
* @param content inhalt des Input fields
|
||||
* @return false beim schließen des input dialogs
|
||||
*/
|
||||
private boolean tourNameInputDuplicatCheck(String content, boolean checkDuplicate){
|
||||
while(this.neueTourName == null) {
|
||||
this.neueTourName = AlertHelper.inputText(ConfigHelper.getLangIniString("tournametitle"),
|
||||
ConfigHelper.getLangIniString("tournameheader"),
|
||||
ConfigHelper.getLangIniString("tournamemsg"), content);
|
||||
System.out.println(this.neueTourName);
|
||||
if(this.neueTourName.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
if (getTour(this.neueTourName) != null && checkDuplicate) {
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("namevergebenheader"),
|
||||
ConfigHelper.getLangIniString("namevergebenmsg1")
|
||||
+ this.neueTourName +
|
||||
ConfigHelper.getLangIniString("namevergebenmsg2"));
|
||||
this.neueTourName = null;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input der Startpunkt der Tour
|
||||
* Wird erst beendet wenn die eingabe erfolgreich war
|
||||
* @param content inhalt des Input fields
|
||||
* @return false beim schließen des input dialogs
|
||||
*/
|
||||
private boolean tourStartInput(String content){
|
||||
while(this.neueTourStart == null){
|
||||
this.neueTourStart = AlertHelper.inputText(ConfigHelper.getLangIniString("startpunkttitle"),
|
||||
ConfigHelper.getLangIniString("startpunktheader"),
|
||||
ConfigHelper.getLangIniString("startpunktmsg"), content);
|
||||
if(this.neueTourStart.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input des Zielpunktes der Tour
|
||||
* Wird erst beendet wenn die eingabe erfolgreich war
|
||||
* @param content inhalt des Input fields
|
||||
* @return false beim schließen des input dialogs
|
||||
*/
|
||||
private boolean tourZielInput(String content){
|
||||
while(this.neueTourZiel == null){
|
||||
this.neueTourZiel = AlertHelper.inputText(ConfigHelper.getLangIniString("zielpunkttitle"),
|
||||
ConfigHelper.getLangIniString("zielpunktheader"),
|
||||
ConfigHelper.getLangIniString("zielpunktmsg"), content);
|
||||
if(this.neueTourZiel.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fügt eine neue Tour hinzu
|
||||
*/
|
||||
public void addTour(){
|
||||
tourNameInput();
|
||||
tourStartInput("");
|
||||
tourZielInput("");
|
||||
if (getTour(this.neueTourName) == null) {
|
||||
tourData.add(new Tour(this.neueTourName, "TBD", "TBD", 0, this.neueTourStart, this.neueTourZiel));
|
||||
tourNamen.add(this.neueTourName);
|
||||
}
|
||||
this.neueTourStart = null;
|
||||
this.neueTourZiel = null;
|
||||
this.neueTourName = null;
|
||||
}
|
||||
|
||||
private boolean keineTourSelected(){
|
||||
if (this.selectedTour == null){
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("keinetourselected"),
|
||||
ConfigHelper.getLangIniString("logtournotselectedmsg"));
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bearbeitet einen gewählten Log eintrag
|
||||
*/
|
||||
public void editLog(){
|
||||
AtomicReference<Tour> tourAkt = new AtomicReference<>();
|
||||
AtomicReference<Log> logAkt = new AtomicReference<>();
|
||||
this.tourData.forEach(tourd -> {
|
||||
if(tourd.getName().equals(this.selectedTour.getName())) {
|
||||
tourd.getLogs().forEach(log -> {
|
||||
if(this.selectedLog.getId().equals(log.getId())){
|
||||
logAkt.set(log);
|
||||
tourAkt.set(tourd);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
double dauer = dauerInput(this.selectedLog.getDauer());
|
||||
double strecke = -1;
|
||||
LocalDate datum = null;
|
||||
if (dauer >= 0) {
|
||||
strecke = streckeInput(this.selectedLog.getStrecke() + "");
|
||||
if (strecke >= 0) {
|
||||
datum = dateInput(this.selectedLog.getDatum());
|
||||
if(datum != null){
|
||||
Log newLog = new Log(this.selectedLog.getId(), dauer + "", datum,strecke);
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @return Die eingegebene Dauer
|
||||
*/
|
||||
private double dauerInput(String content){
|
||||
return AlertHelper.inputNumber(ConfigHelper.getLangIniString("dauer"),
|
||||
ConfigHelper.getLangIniString("dauermsg"),
|
||||
ConfigHelper.getLangIniString("dauer") +
|
||||
ConfigHelper.getLangIniString("doppelpunkt"), content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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("");
|
||||
double strecke;
|
||||
LocalDate date = null;
|
||||
if(dauer >= 0) {
|
||||
strecke = streckeInput("");
|
||||
if (strecke >= 0.0) {
|
||||
date = dateInput(LocalDate.now());
|
||||
if (date != null){
|
||||
Log newLog = new Log(newId.get(), dauer + "", date, strecke);
|
||||
this.logData.add(newLog);
|
||||
s.addLog(newLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Entfernt ein Log anhand des selectierten Logs
|
||||
*/
|
||||
public void delLog(){
|
||||
if(this.selectedLog != null) {
|
||||
this.logData.removeIf(s -> s.getId().equals(this.selectedLog.getId()));
|
||||
AtomicReference<Tour> tourToEdit = new AtomicReference<>();
|
||||
this.tourData.forEach(s -> {
|
||||
if (s.getLogs() != null) {
|
||||
s.getLogs().forEach(ss -> {
|
||||
if (ss.getId().equals(this.selectedLog.getId())) {
|
||||
tourToEdit.set(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (tourToEdit.get() != null){
|
||||
Tour toEdit = tourToEdit.get();
|
||||
toEdit.delLog(this.selectedLog.getId());
|
||||
this.tourData.removeIf(s -> s.getName().equals(toEdit.getName()));
|
||||
this.tourData.add(toEdit);
|
||||
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() {
|
||||
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() {
|
||||
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() {
|
||||
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);
|
||||
}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"));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user