Compare commits
4 Commits
ad5d7d98c4
...
d872a39394
Author | SHA1 | Date | |
---|---|---|---|
d872a39394 | |||
9d010d452c | |||
58e94e6cbd | |||
63e736152b |
@ -6,6 +6,16 @@ logo = logo.png
|
||||
[lang]
|
||||
lang = langde
|
||||
|
||||
[settings]
|
||||
openpdf = 1
|
||||
openmap = 0
|
||||
|
||||
[einheiten]
|
||||
zeit = min
|
||||
strecke = km
|
||||
meter = m
|
||||
speed = km/h
|
||||
|
||||
[db]
|
||||
dbname = tourplaner
|
||||
url =
|
||||
|
46
langde.ini
46
langde.ini
@ -19,7 +19,7 @@ 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!
|
||||
deltournoselectmsg = Bitte wählen Sie zuerst eine Tour aus!
|
||||
exceptionstackheader = Exception stacktrace:
|
||||
keinelogsvorhanden = Fügen Sie erst ein Log hinzu um es anzuzeigen!
|
||||
datum = Datum
|
||||
@ -59,4 +59,46 @@ loggegangen = Davon gegangen:
|
||||
logavg = Berechnete Durchschnittliche Geschwindigkeit:
|
||||
logstrecke = Entfernung:
|
||||
loghight = Höhenmeter:
|
||||
logbemerkung = Bemerkung:
|
||||
logbemerkung = Bemerkung:
|
||||
|
||||
fkarte = Karte
|
||||
fbeschreibung = Beschreibung
|
||||
fedit = Bearbeiten
|
||||
fname = Tourname
|
||||
fstrecke = Berechnete Strecke
|
||||
fdauer = Berechnete Dauer
|
||||
fziel = Ziel
|
||||
fstart = Start
|
||||
favg = Durchschnittsgeschwindigkeit
|
||||
fbemerkung = Bemerkung
|
||||
fdatum = Datum
|
||||
fdauer = Dauer
|
||||
fgegangen = Davon gegangen
|
||||
fhight = Höhenmeter
|
||||
fpause = Davon Pause
|
||||
fstrecke = Strecke
|
||||
|
||||
keinlogselected = Kein Logeintrag ausgewählt
|
||||
keinlogselectedmsg = Bitte zuerst einen Logeintrag auswählen
|
||||
|
||||
fsuche = Suchen
|
||||
fopenmapsetting = Map automatisch öffnen
|
||||
fopenpdfsetting = Report automatisch öffnen
|
||||
flangenglisch = Englisch
|
||||
flangdeutsch = Deutsch
|
||||
fdatei = Datei
|
||||
fbearbeiten = Bearbeiten
|
||||
foptionen = Optionen
|
||||
fsprache = Sprache auswählen
|
||||
fhilfe = Hilfe
|
||||
freposum = Erstelle Report über alle Touren
|
||||
frepotour = Erstelle Report über aktuelle Tour
|
||||
fbeenden = Beenden
|
||||
fpunkte = ...
|
||||
|
||||
rzeitallerlogs = Gesammte Zeit aller Logs:
|
||||
rstreckeallerlogs = gesammte Strecke aller Logs:
|
||||
rcalzeitallerlogs = Berechnete Zeit aller Logs:
|
||||
calstreckeallerloggs = Berechnete Strecke aller Touren:
|
||||
rdaten = Daten
|
||||
rsummrepo = Zusammengefasster Report
|
105
langen.ini
Normal file
105
langen.ini
Normal file
@ -0,0 +1,105 @@
|
||||
[langen]
|
||||
achtung = ATTENTION
|
||||
openbrowsererror = TourplanerController -> Browser:
|
||||
browserexception = Browser Exception
|
||||
browserexceptionmsg = Error at opening Browser
|
||||
suchfeldleer = Search field is empty!
|
||||
suchtextzuerst = Please enter search term first!
|
||||
keinetourselected = No Tour selected
|
||||
tournametitle = Tour name
|
||||
tournameheader = Please enter a Tourname!
|
||||
tournamemsg = Name:
|
||||
namevergebenheader = Name is already occupied!
|
||||
namevergebenmsg1 = The name '
|
||||
namevergebenmsg2 = ' is already in use!
|
||||
startpunkttitle = Tour start
|
||||
startpunktheader = Please enter the start of the Tour
|
||||
startpunktmsg = Start:
|
||||
zielpunkttitle = Tour destination:
|
||||
zielpunktheader = Please enter the tour destination!
|
||||
zielpunktmsg = Destination:
|
||||
deltournoselect = ViewModel -> DelTour
|
||||
deltournoselectmsg = Please select a tour first!
|
||||
exceptionstackheader = Exception stacktrace:
|
||||
keinelogsvorhanden = First add a Log!
|
||||
datum = Date
|
||||
dauer = Duration
|
||||
strecke = Distance
|
||||
streckemsg = Distance of the log entry
|
||||
dauermsg = Duration of the log entry
|
||||
doppelpunkt = :
|
||||
fktnichtimplementiert = Not implementet jet
|
||||
vergessenodernochnichtsoweit = Not implementet jet
|
||||
logtournotselectedmsg = Please select a tour first!
|
||||
keintextimfeld = Please enter a text!
|
||||
nurzahlen = Only numbers!
|
||||
nurpositivezahlen = Only positiv numbers!
|
||||
pause = Break
|
||||
pausemsg = Duration of the break
|
||||
hightmeter = Vertical meters
|
||||
hightmetermsg = Vertical meters of the etape
|
||||
bemerkung = Comment
|
||||
bemerkungheader = Please enter a Comment, can also be empty!
|
||||
tourreportvon = Tour Report from ->
|
||||
tourplanervon = Tourplaner by DerGeorg
|
||||
reportkeywords = Tourplaner, Tour, Report
|
||||
tourplaner = Tourplaner
|
||||
tour = Tour
|
||||
reportvon = Report created by:
|
||||
reportstart = Start of the tour:
|
||||
reportziel = Destination of the tour:
|
||||
reportdauercal = Calculated duration of the tour:
|
||||
reportstreckecal = Calculated distance of the tour:
|
||||
logs = Logs
|
||||
countlog = Number of log entries:
|
||||
logvom = Log from:
|
||||
logdauer = Duration:
|
||||
logpause = Break from that:
|
||||
loggegangen = Gone away:
|
||||
logavg = Calculated averrage speed:
|
||||
logstrecke = Distance:
|
||||
loghight = Vertical meters:
|
||||
logbemerkung = Comment:
|
||||
|
||||
fkarte = Map
|
||||
fbeschreibung = Description
|
||||
fedit = Edit
|
||||
fname = Tourname
|
||||
fstrecke = Calculated Distance
|
||||
fdauer = Calculated Duration
|
||||
fziel = Destination
|
||||
fstart = Start
|
||||
favg = Average speed
|
||||
fbemerkung = Comment
|
||||
fdatum = Date
|
||||
fdauer = Duration
|
||||
fgegangen = Gone away
|
||||
fhight = Vertical meters
|
||||
fpause = Break from that
|
||||
fstrecke = Distance
|
||||
|
||||
keinlogselected = No log selected
|
||||
keinlogselectedmsg = Please select a log first!
|
||||
|
||||
|
||||
fsuche = Search
|
||||
fopenmapsetting = Open map automatic
|
||||
fopenpdfsetting = Open report automatic
|
||||
flangenglisch = English
|
||||
flangdeutsch = German
|
||||
fdatei = File
|
||||
fbearbeiten = Edit
|
||||
foptionen = Options
|
||||
fsprache = Choose Language
|
||||
fhilfe = Help
|
||||
freposum = Generate summarize-report
|
||||
frepotour = Generate tour-report
|
||||
fbeenden = Quit
|
||||
fpunkte = ...
|
||||
|
||||
rzeitallerlogs = Time of all logs:
|
||||
rstreckeallerlogs = Distance of all logs:
|
||||
rcalzeitallerlogs = Calculated time of all logs:
|
||||
calstreckeallerloggs = Calculated distance of all logs:
|
||||
rdaten = Data
|
||||
rsummrepo = Summary Report
|
@ -43,7 +43,7 @@ public class ConfigHelper {
|
||||
try {
|
||||
ini = new Wini(new File(filename));
|
||||
} catch (IOException e) {
|
||||
LogHelper.error(e.getMessage(), e.getClass().getName());
|
||||
LogHelper.error(e);
|
||||
}
|
||||
assert ini != null;
|
||||
return ini.get(sectionName, optionName, String.class);
|
||||
@ -56,7 +56,7 @@ public class ConfigHelper {
|
||||
* @return Den angeforderten String
|
||||
*/
|
||||
public static String getLangIniString(String optionName){
|
||||
return ConfigHelper.getIniString(ConfigHelper.getStandartLangde(), ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "lang", "lang"),optionName);
|
||||
return ConfigHelper.getIniString(getIniString(getStandartConfig(), "lang", "lang") + ".ini", ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "lang", "lang"),optionName);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,7 +92,7 @@ public class ConfigHelper {
|
||||
ini.put(sectionName, optionName, value);
|
||||
ini.store();
|
||||
} catch (IOException e) {
|
||||
LogHelper.error(e.getMessage(), e.getClass().getName());
|
||||
LogHelper.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,9 @@ public class DirectionMap {
|
||||
FileHelper.saveImage(this.map, "jpg", new File(this.file));
|
||||
FileHelper.saveImage(this.mappdf, "jpg", new File(this.filepdf));
|
||||
getDirections(start, ende);
|
||||
FileHelper.openDefault(file);
|
||||
if(ConfigHelper.getIniInt(ConfigHelper.getStandartConfig(), "settings", "openmap") == 1) {
|
||||
FileHelper.openDefault(file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
50
src/tourplaner/business/EinheitenAdder.java
Normal file
50
src/tourplaner/business/EinheitenAdder.java
Normal file
@ -0,0 +1,50 @@
|
||||
package tourplaner.business;
|
||||
|
||||
/**
|
||||
* Fügt am ende eines Strings die einheiten an
|
||||
*/
|
||||
public class EinheitenAdder {
|
||||
|
||||
/**
|
||||
* Fügt meter hinzu
|
||||
* @param meter Meter als String
|
||||
* @return Meter mit einheit
|
||||
*/
|
||||
public static String addMeter(String meter){
|
||||
return meter + " " +ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "meter");
|
||||
}
|
||||
|
||||
public static String addSpeed(String speed){
|
||||
return speed + " " + ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "speed");
|
||||
}
|
||||
|
||||
/**
|
||||
* Fügt km hinzu
|
||||
* @param km km als String
|
||||
* @return km mit einheit
|
||||
*/
|
||||
public static String addKm(String km){
|
||||
return km + " " +ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "strecke");
|
||||
}
|
||||
|
||||
/**
|
||||
* Fügt minuten hinzu
|
||||
* @param min minuten als String
|
||||
* @return minuten mit einheit
|
||||
*/
|
||||
public static String addMinuten(String min){
|
||||
return min + " " +ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "einheiten", "zeit");
|
||||
}
|
||||
|
||||
/**
|
||||
* Fügt am ende .json hinzu. Sofern es nicht schon dort ist
|
||||
* @param filename Filename ohne .json am ende
|
||||
* @return Der Filename mit .json am ende-
|
||||
*/
|
||||
public static String addJson(String filename){
|
||||
if(!filename.contains(".json")){
|
||||
filename += ".json";
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
}
|
@ -34,8 +34,9 @@ public class Exporter {
|
||||
ProgressBar progressBar = new ProgressBar("Export...");
|
||||
int step = progressBar.getProgressSize(4, 100);
|
||||
ArrayList<Tour> data = new DbConnect().getAllTouren();
|
||||
|
||||
progressBar.addProgress(step);
|
||||
FileWriter fileWriter = new FileWriter(path + ".json");
|
||||
FileWriter fileWriter = new FileWriter(EinheitenAdder.addJson(this.path));
|
||||
progressBar.addProgress(step);
|
||||
JsonHelper.getJsonFromObj(data, fileWriter);
|
||||
progressBar.addProgress(step);
|
||||
@ -51,7 +52,7 @@ public class Exporter {
|
||||
public void doImport() {
|
||||
ProgressBar progressBar = new ProgressBar("Import...");
|
||||
try {
|
||||
this.touren = JsonHelper.getTourenFromJson(new FileReader(this.path));
|
||||
this.touren = JsonHelper.getTourenFromJson(new FileReader(EinheitenAdder.addJson(this.path)));
|
||||
DbConnect dbConnect = new DbConnect();
|
||||
dbConnect.delAllData();
|
||||
progressBar.addProgress(5);
|
||||
|
@ -3,12 +3,9 @@ package tourplaner.business;
|
||||
import com.itextpdf.text.*;
|
||||
import com.itextpdf.text.Font;
|
||||
import com.itextpdf.text.Image;
|
||||
import tourplaner.data.DbConnect;
|
||||
import tourplaner.object.Log;
|
||||
import tourplaner.object.Tour;
|
||||
|
||||
import com.itextpdf.text.pdf.PdfPCell;
|
||||
import com.itextpdf.text.pdf.PdfPTable;
|
||||
import com.itextpdf.text.pdf.PdfWriter;
|
||||
|
||||
import java.awt.*;
|
||||
@ -53,7 +50,9 @@ public class Reporter {
|
||||
} catch (DocumentException | FileNotFoundException e) {
|
||||
LogHelper.error(e.getMessage(), e.getClass().getName());
|
||||
}
|
||||
FileHelper.openDefault(file);
|
||||
if(ConfigHelper.getIniInt(ConfigHelper.getStandartConfig(), "settings", "openpdf") == 1) {
|
||||
FileHelper.openDefault(file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,17 +75,17 @@ public class Reporter {
|
||||
strecke += log.getStrecke();
|
||||
}
|
||||
}
|
||||
Anchor anchor = new Anchor("Zusammengefasster Report", catFont);
|
||||
anchor.setName("Zusammengefasster Report");
|
||||
Anchor anchor = new Anchor(ConfigHelper.getLangIniString("rsummrepo"), catFont);
|
||||
anchor.setName(ConfigHelper.getLangIniString("rsummrepo"));
|
||||
// Second parameter is the number of the chapter
|
||||
Chapter catPart = new Chapter(new Paragraph(anchor), 1);
|
||||
Paragraph subPara = new Paragraph("Daten", subFont);
|
||||
Paragraph subPara = new Paragraph(ConfigHelper.getLangIniString("rdaten"), subFont);
|
||||
Section subCatPart = catPart.addSection(subPara);
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportvon") + System.getProperty("user.name") + ", " + new Date()));
|
||||
subCatPart.add(new Paragraph("Gesammte Zeit aller Logs: " + dauer));
|
||||
subCatPart.add(new Paragraph("gesammte Strecke aller Logs: " + strecke));
|
||||
subCatPart.add(new Paragraph("Berechnete Zeit aller Logs: " + calDauer));
|
||||
subCatPart.add(new Paragraph("Berechnete Strecke aller Touren: " + calStecke));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportvon") + " " + System.getProperty("user.name") + ", " + new Date()));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addMinuten(ConfigHelper.getLangIniString("rzeitallerlogs") + " " + dauer)));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addKm(ConfigHelper.getLangIniString("rstreckeallerlogs") + " " + strecke)));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addMinuten(ConfigHelper.getLangIniString("rcalzeitallerlogs") + " " + calDauer)));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addKm(ConfigHelper.getLangIniString("calstreckeallerloggs") + " " + calStecke)));
|
||||
document.add(catPart);
|
||||
}
|
||||
|
||||
@ -109,14 +108,16 @@ public class Reporter {
|
||||
} catch (DocumentException | FileNotFoundException e) {
|
||||
LogHelper.error(e.getMessage(), e.getClass().getName());
|
||||
}
|
||||
FileHelper.openDefault(file);
|
||||
if(ConfigHelper.getIniInt(ConfigHelper.getStandartConfig(), "settings", "openpdf") == 1) {
|
||||
FileHelper.openDefault(file);
|
||||
}
|
||||
}
|
||||
|
||||
// iText allows to add metadata to the PDF which can be viewed in your Adobe
|
||||
// Reader
|
||||
// under File -> Properties
|
||||
private static void addMetaData(Document document, Tour tour) {
|
||||
document.addTitle(ConfigHelper.getLangIniString("tourreportvon") + tour.getName());
|
||||
document.addTitle(ConfigHelper.getLangIniString("tourreportvon") + " " + tour.getName());
|
||||
document.addSubject(ConfigHelper.getLangIniString("tourplanervon"));
|
||||
document.addKeywords(ConfigHelper.getLangIniString("reportkeywords"));
|
||||
document.addAuthor(ConfigHelper.getLangIniString("tourplaner"));
|
||||
@ -138,11 +139,11 @@ public class Reporter {
|
||||
|
||||
Paragraph subPara = new Paragraph(ConfigHelper.getLangIniString("tour"), subFont);
|
||||
Section subCatPart = catPart.addSection(subPara);
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportvon") + System.getProperty("user.name") + ", " + new Date()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportstart") + tour.getStart()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportziel") + tour.getZiel()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportdauercal") + tour.getDauer()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportstreckecal") + tour.getStrecke()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportvon") + " " + System.getProperty("user.name") + ", " + new Date()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportstart") + " " + tour.getStart()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("reportziel") + " " + tour.getZiel()));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addMinuten(ConfigHelper.getLangIniString("reportdauercal") + " " + tour.getDauer())));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addKm(ConfigHelper.getLangIniString("reportstreckecal") + " " + tour.getStrecke())));
|
||||
Paragraph emptyLine = new Paragraph();
|
||||
addEmptyLine(emptyLine, 5);
|
||||
subCatPart.add(emptyLine);
|
||||
@ -164,18 +165,18 @@ public class Reporter {
|
||||
anchor = new Anchor(ConfigHelper.getLangIniString("logs"), catFont);
|
||||
anchor.setName(ConfigHelper.getLangIniString("logs"));
|
||||
catPart = new Chapter(new Paragraph(anchor), 2);
|
||||
catPart.add(new Paragraph(ConfigHelper.getLangIniString("countlog") + logs.size()));
|
||||
catPart.add(new Paragraph(ConfigHelper.getLangIniString("countlog") + " " + logs.size()));
|
||||
|
||||
for (Log log: logs) {
|
||||
subPara = new Paragraph(ConfigHelper.getLangIniString("logvom") + log.getDatum() , subFont);
|
||||
subPara = new Paragraph(ConfigHelper.getLangIniString("logvom") + " " + log.getDatum() , subFont);
|
||||
subCatPart = catPart.addSection(subPara);
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logdauer") + log.getDauer()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logpause") + log.getPause()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("loggegangen") + log.getGegangen()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logavg")+ log.getAvgspeed()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logstrecke") + log.getStrecke()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("loghight") + log.getHightmeter()));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logbemerkung") + log.getBemerkung()));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addMinuten(ConfigHelper.getLangIniString("logdauer") + " " + log.getDauer())));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addMinuten(ConfigHelper.getLangIniString("logpause") + " " + log.getPause())));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addMinuten(ConfigHelper.getLangIniString("loggegangen") + " " + log.getGegangen())));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addSpeed(ConfigHelper.getLangIniString("logavg") + " " + log.getAvgspeed())));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addKm(ConfigHelper.getLangIniString("logstrecke") + " " + log.getStrecke())));
|
||||
subCatPart.add(new Paragraph(EinheitenAdder.addMeter(ConfigHelper.getLangIniString("loghight") + " " + log.getHightmeter())));
|
||||
subCatPart.add(new Paragraph(ConfigHelper.getLangIniString("logbemerkung") + " " + log.getBemerkung()));
|
||||
}
|
||||
// now add all this to the document
|
||||
document.add(catPart);
|
||||
|
@ -119,7 +119,9 @@ public class TourPlaner{
|
||||
* @param tourname Tourname
|
||||
*/
|
||||
public static void openImage(String tourname){
|
||||
FileHelper.openDefault(getImagePath(tourname));
|
||||
if(ConfigHelper.getIniInt(ConfigHelper.getStandartConfig(), "settings", "openmap") == 1) {
|
||||
FileHelper.openDefault(getImagePath(tourname));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -181,17 +183,6 @@ public class TourPlaner{
|
||||
return new DbConnect().editLog(tourname, log);
|
||||
}
|
||||
|
||||
/**
|
||||
* Exportiert die Daten
|
||||
* @param path Path zu den Daten
|
||||
* @throws IOException Fehler beim schreiben der Daten
|
||||
*/
|
||||
public static void exportData(String path) throws IOException {
|
||||
Exporter exporter = new Exporter(path);
|
||||
exporter.doExport();
|
||||
FileHelper.openDefault(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sucht alle touren die den gegebenen tournamen enthalten
|
||||
* @param tourname Name der zu suchen ist
|
||||
|
@ -20,6 +20,9 @@ public class Log {
|
||||
this.pause = pause;
|
||||
this.gegangen = this.dauer - this.pause;
|
||||
this.avgspeed = this.strecke / (this.gegangen);
|
||||
if(Double.isInfinite(this.avgspeed)){
|
||||
this.avgspeed = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public String getBemerkung() {
|
||||
|
@ -45,30 +45,30 @@
|
||||
<menus>
|
||||
<Menu fx:id="menueFile" mnemonicParsing="false" text="Datei">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" onAction="#reportSum" text="Report Summary" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#tourReport" text="Tour Report" />
|
||||
<MenuItem fx:id="reportsummary" mnemonicParsing="false" onAction="#reportSum" text="Report Summary" />
|
||||
<MenuItem fx:id="tourreport" mnemonicParsing="false" onAction="#tourReport" text="Tour Report" />
|
||||
<MenuItem fx:id="beendenButton" mnemonicParsing="false" onAction="#quitApp" text="Beenden" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Bearbeiten">
|
||||
<Menu fx:id="menuebearbeiten" mnemonicParsing="false" text="Bearbeiten">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" onAction="#importBtn" text="Import" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#exportBtn" text="Export" />
|
||||
<MenuItem fx:id="menueimport" mnemonicParsing="false" onAction="#importBtn" text="Import" />
|
||||
<MenuItem fx:id="menueexport" mnemonicParsing="false" onAction="#exportBtn" text="Export" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Optionen">
|
||||
<Menu fx:id="menueoptionen" mnemonicParsing="false" text="Optionen">
|
||||
<items>
|
||||
<CheckMenuItem mnemonicParsing="false" text="Map automatisch öffnen" />
|
||||
<CheckMenuItem mnemonicParsing="false" text="Report automatisch öffnen" />
|
||||
<Menu mnemonicParsing="false" text="Sprache">
|
||||
<CheckMenuItem fx:id="openmap" mnemonicParsing="false" onAction="#openmapaction" text="Map automatisch öffnen" />
|
||||
<CheckMenuItem fx:id="openpdf" mnemonicParsing="false" onAction="#openpdfaction" text="Report automatisch öffnen" />
|
||||
<Menu fx:id="menuesprachen" mnemonicParsing="false" text="Sprache">
|
||||
<items>
|
||||
<RadioMenuItem mnemonicParsing="false" text="Deutsch" />
|
||||
<RadioMenuItem mnemonicParsing="false" text="Englisch" />
|
||||
<RadioMenuItem fx:id="langdeutsch" mnemonicParsing="false" onAction="#onlangdeutsch" text="Deutsch" />
|
||||
<RadioMenuItem fx:id="langenglisch" mnemonicParsing="false" onAction="#onlangenglisch" text="Englisch" />
|
||||
</items>
|
||||
</Menu>
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Hilfe">
|
||||
<Menu fx:id="menuehilfe" mnemonicParsing="false" text="Hilfe">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" onAction="#gitWebBrowser" text="Git Repo" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#javaDocBrowser" text="JavaDoc" />
|
||||
@ -84,7 +84,7 @@
|
||||
<Button fx:id="tourAdd" layoutX="58.0" mnemonicParsing="false" onAction="#addTour" text="+" />
|
||||
<Label layoutX="14.0" layoutY="4.0" text="Tours" />
|
||||
<Button fx:id="tourDel" layoutX="89.0" mnemonicParsing="false" onAction="#delTour" text="-" />
|
||||
<Button layoutX="117.0" mnemonicParsing="false" onAction="#editTourBtn" text="Edit" />
|
||||
<Button fx:id="editTourBtn" layoutX="117.0" mnemonicParsing="false" onAction="#editTourBtn" text="Edit" />
|
||||
</children></AnchorPane>
|
||||
<TextField fx:id="sucheInput" promptText="Suche..." />
|
||||
<Button fx:id="sucheButton" mnemonicParsing="false" onAction="#suche" text="Suchen" />
|
||||
@ -133,9 +133,9 @@
|
||||
<children>
|
||||
<TableView fx:id="beschreibungTableView" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="nameCol" maxWidth="1.7976931348623157E308" minWidth="70.0" prefWidth="-1.0" text="Tourname" />
|
||||
<TableColumn fx:id="dauerCol" maxWidth="1.7976931348623157E308" minWidth="40.0" prefWidth="-1.0" text="Dauer" />
|
||||
<TableColumn fx:id="streckeCol" maxWidth="1.7976931348623157E308" minWidth="50.0" prefWidth="-1.0" text="Strecke" />
|
||||
<TableColumn fx:id="nameCol" minWidth="100.0" prefWidth="-1.0" text="Tourname" />
|
||||
<TableColumn fx:id="dauerCol" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="-1.0" text="Dauer" />
|
||||
<TableColumn fx:id="streckeCol" maxWidth="1.7976931348623157E308" minWidth="100.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>
|
||||
@ -173,7 +173,7 @@
|
||||
<Insets />
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" onAction="#editLogBtn" text="Edit" />
|
||||
<Button fx:id="editBtn" mnemonicParsing="false" onAction="#editLogBtn" text="Edit" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
|
||||
@ -185,14 +185,14 @@
|
||||
<children>
|
||||
<TableView fx:id="logTableView" onMouseClicked="#logItemSelected" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columns>
|
||||
<TableColumn fx:id="logDatumCol" prefWidth="49.0" text="Datum" />
|
||||
<TableColumn fx:id="logDauerCol" prefWidth="126.0" text="Dauer" />
|
||||
<TableColumn fx:id="logStreckeCol" prefWidth="240.0" text="Entfernung" />
|
||||
<TableColumn fx:id="logAvgCol" prefWidth="75.0" text="AVG Geschwindigkeit" />
|
||||
<TableColumn fx:id="logHightCol" prefWidth="75.0" text="Höhenmeter" />
|
||||
<TableColumn fx:id="logPauseCol" prefWidth="75.0" text="Davon Pause" />
|
||||
<TableColumn fx:id="logGegangenCol" prefWidth="75.0" text="Davon Unterwegs" />
|
||||
<TableColumn fx:id="logBemerkungCol" prefWidth="75.0" text="Bemerkung" />
|
||||
<TableColumn fx:id="logDatumCol" minWidth="-1.0" prefWidth="-1.0" text="Datum" />
|
||||
<TableColumn fx:id="logDauerCol" minWidth="-1.0" prefWidth="-1.0" text="Dauer" />
|
||||
<TableColumn fx:id="logStreckeCol" minWidth="-1.0" prefWidth="-1.0" text="Entfernung" />
|
||||
<TableColumn fx:id="logAvgCol" minWidth="-1.0" prefWidth="-1.0" text="AVG Geschwindigkeit" />
|
||||
<TableColumn fx:id="logHightCol" minWidth="-1.0" prefWidth="75.0" text="Höhenmeter" />
|
||||
<TableColumn fx:id="logPauseCol" minWidth="-1.0" prefWidth="-1.0" text="Davon Pause" />
|
||||
<TableColumn fx:id="logGegangenCol" minWidth="-1.0" prefWidth="-1.0" text="Davon Unterwegs" />
|
||||
<TableColumn fx:id="logBemerkungCol" minWidth="-1.0" prefWidth="-1.0" text="Bemerkung" />
|
||||
</columns>
|
||||
<columnResizePolicy>
|
||||
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
|
||||
@ -210,7 +210,7 @@
|
||||
</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">
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="-1.0" text="Tourplaner" HBox.hgrow="ALWAYS">
|
||||
<font>
|
||||
<Font size="11.0" fx:id="x3" />
|
||||
</font>
|
||||
@ -219,7 +219,7 @@
|
||||
</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" />
|
||||
<Label font="$x3" maxWidth="-1.0" text="Georg Reisinger" textFill="$x4" HBox.hgrow="NEVER" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
|
||||
|
@ -10,6 +10,7 @@ import javafx.scene.layout.*;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.WindowEvent;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
import tourplaner.business.EinheitenAdder;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
@ -1,10 +1,10 @@
|
||||
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.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.cell.PropertyValueFactory;
|
||||
@ -12,21 +12,13 @@ import javafx.scene.image.ImageView;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
import tourplaner.business.LogHelper;
|
||||
import tourplaner.business.TourPlaner;
|
||||
import tourplaner.object.Log;
|
||||
import tourplaner.object.Tour;
|
||||
import tourplaner.viewmodels.ViewModel;
|
||||
|
||||
import javax.swing.*;
|
||||
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
|
||||
@ -43,6 +35,26 @@ public class TourplanerController implements Initializable {
|
||||
//Log -> rechts unten
|
||||
public TableView<Log> logTableView;
|
||||
public TableColumn<Log, String> logDauerCol, logStreckeCol, logDatumCol, logAvgCol, logHightCol, logPauseCol, logGegangenCol, logBemerkungCol;
|
||||
//Menue
|
||||
public CheckMenuItem openmap, openpdf;
|
||||
public RadioMenuItem langenglisch, langdeutsch;
|
||||
private ToggleGroup langgroup;
|
||||
public Menu menueFile, menuebearbeiten, menueoptionen, menuesprachen, menuehilfe;
|
||||
public MenuItem reportsummary, tourreport, beendenButton;
|
||||
//Elemente
|
||||
public Button sucheButton, editBtn, editTourBtn;
|
||||
|
||||
@FXML
|
||||
private void onlangenglisch(){
|
||||
ConfigHelper.setIniString(ConfigHelper.getStandartConfig(), "lang", "lang", "langen");
|
||||
langToFxml();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void onlangdeutsch(){
|
||||
ConfigHelper.setIniString(ConfigHelper.getStandartConfig(), "lang", "lang", "langde");
|
||||
langToFxml();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void tourReport(){
|
||||
@ -148,10 +160,10 @@ public class TourplanerController implements Initializable {
|
||||
this.viewModel.setSucheAktiv(false);
|
||||
progressBar.addProgress(10);
|
||||
syncTourNamen();
|
||||
progressBar.addProgress(40);
|
||||
progressBar.setProgress(100);
|
||||
this.sucheInput.setText("");
|
||||
}
|
||||
progressBar.addProgress(50);
|
||||
progressBar.setProgress(100);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -234,7 +246,77 @@ public class TourplanerController implements Initializable {
|
||||
TourListView.setOrientation(Orientation.VERTICAL);
|
||||
syncTourNamen();
|
||||
deselectAll();
|
||||
if(ConfigHelper.getIniInt(ConfigHelper.getStandartConfig(), "settings", "openpdf") == 1){
|
||||
this.openpdf.setSelected(true);
|
||||
}else {
|
||||
this.openpdf.setSelected(false);
|
||||
}
|
||||
if(ConfigHelper.getIniInt(ConfigHelper.getStandartConfig(), "settings", "openmap") == 1){
|
||||
this.openmap.setSelected(true);
|
||||
}else {
|
||||
this.openmap.setSelected(false);
|
||||
}
|
||||
this.langgroup = new ToggleGroup();
|
||||
this.langdeutsch.setToggleGroup(this.langgroup);
|
||||
this.langenglisch.setToggleGroup(this.langgroup);
|
||||
if(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "lang", "lang").equals("langde")){
|
||||
this.langdeutsch.setSelected(true);
|
||||
this.langenglisch.setSelected(false);
|
||||
}else if(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "lang", "lang").equals("langen")){
|
||||
this.langdeutsch.setSelected(false);
|
||||
this.langenglisch.setSelected(true);
|
||||
}
|
||||
|
||||
langToFxml();
|
||||
}
|
||||
|
||||
private void langToFxml(){
|
||||
this.kartenTab.setText(ConfigHelper.getLangIniString("fkarte"));
|
||||
this.beschreibungTab.setText(ConfigHelper.getLangIniString("fbeschreibung"));
|
||||
this.editBtn.setText(ConfigHelper.getLangIniString("fedit"));
|
||||
this.editTourBtn.setText(ConfigHelper.getLangIniString("fedit"));
|
||||
this.nameCol.setText(ConfigHelper.getLangIniString("fname"));
|
||||
this.streckeCol.setText(ConfigHelper.getLangIniString("fstrecke"));
|
||||
this.dauerCol.setText(ConfigHelper.getLangIniString("fdauer"));
|
||||
this.zielCol.setText(ConfigHelper.getLangIniString("fziel"));
|
||||
this.startCol .setText(ConfigHelper.getLangIniString("fstart"));
|
||||
this.logAvgCol.setText(ConfigHelper.getLangIniString("favg"));
|
||||
this.logBemerkungCol.setText(ConfigHelper.getLangIniString("fbemerkung"));
|
||||
this.logDatumCol.setText(ConfigHelper.getLangIniString("fdatum"));
|
||||
this.logDauerCol.setText(ConfigHelper.getLangIniString("fdauer"));
|
||||
this.logGegangenCol.setText(ConfigHelper.getLangIniString("fgegangen"));
|
||||
this.logHightCol.setText(ConfigHelper.getLangIniString("fhight"));
|
||||
this.logPauseCol.setText(ConfigHelper.getLangIniString("fpause"));
|
||||
this.logStreckeCol.setText(ConfigHelper.getLangIniString("fstrecke"));
|
||||
|
||||
this.sucheButton.setText(ConfigHelper.getLangIniString("fsuche"));
|
||||
this.openmap.setText(ConfigHelper.getLangIniString("fopenmapsetting"));
|
||||
this.openpdf.setText(ConfigHelper.getLangIniString("fopenpdfsetting"));
|
||||
this.langenglisch.setText(ConfigHelper.getLangIniString("flangenglisch"));
|
||||
this.langdeutsch.setText(ConfigHelper.getLangIniString("flangdeutsch"));
|
||||
this.menueFile.setText(ConfigHelper.getLangIniString("fdatei"));
|
||||
this.menuebearbeiten.setText(ConfigHelper.getLangIniString("fbearbeiten"));
|
||||
this.menueoptionen.setText(ConfigHelper.getLangIniString("foptionen"));
|
||||
this.menuesprachen.setText(ConfigHelper.getLangIniString("fsprache"));
|
||||
this.menuehilfe.setText(ConfigHelper.getLangIniString("fhilfe"));
|
||||
this.reportsummary.setText(ConfigHelper.getLangIniString("freposum"));
|
||||
this.tourreport.setText(ConfigHelper.getLangIniString("frepotour"));
|
||||
this.beendenButton.setText(ConfigHelper.getLangIniString("fbeenden"));
|
||||
this.sucheInput.setPromptText(ConfigHelper.getLangIniString("fsuche")+ConfigHelper.getLangIniString("fpunkte"));
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void openpdfaction(){
|
||||
int selected = 0;
|
||||
if(this.openpdf.isSelected()) selected = 1;
|
||||
ConfigHelper.setIniInt(ConfigHelper.getStandartConfig(), "settings", "openpdf", selected);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void openmapaction(){
|
||||
int selected = 0;
|
||||
if(this.openmap.isSelected()) selected = 1;
|
||||
ConfigHelper.setIniInt(ConfigHelper.getStandartConfig(), "settings", "openmap", selected);
|
||||
}
|
||||
|
||||
private void deselectAll(){
|
||||
|
@ -195,48 +195,59 @@ public class ViewModel {
|
||||
* 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);
|
||||
System.out.println(this.selectedLog);
|
||||
if(this.selectedTour != null) {
|
||||
if(this.selectedLog != null) {
|
||||
AtomicReference<Tour> tourAkt = new AtomicReference<>();
|
||||
AtomicReference<Log> logAkt = new AtomicReference<>();
|
||||
this.tourData.forEach(tourd -> {
|
||||
if (tourd.getName().equals(this.selectedTour.getName())) {
|
||||
tourd.getLogs().forEach(log -> {
|
||||
if (this.selectedLog.getId().equals(log.getId())) {
|
||||
logAkt.set(log);
|
||||
tourAkt.set(tourd);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
double dauer = dauerInput(this.selectedLog.getDauer());
|
||||
double strecke = -1;
|
||||
double pause = -1.0;
|
||||
double hightmeter = -1.0;
|
||||
boolean bemerkung = false;
|
||||
LocalDate datum = null;
|
||||
if (dauer >= 0) {
|
||||
strecke = streckeInput(this.selectedLog.getStrecke() + "");
|
||||
if (strecke >= 0) {
|
||||
pause = pauseInput(this.selectedLog.getPause() + "");
|
||||
if(pause >= 0.0) {
|
||||
hightmeter = hightmeterInput(this.selectedLog.getHightmeter() + "");
|
||||
if (hightmeter >= 0.0) {
|
||||
bemerkung = bemerkungInput(this.selectedLog.getBemerkung());
|
||||
if (bemerkung) {
|
||||
datum = dateInput(this.selectedLog.getDatum());
|
||||
if (datum != null) {
|
||||
Log newLog = new Log(this.selectedLog.getId(), dauer, datum, strecke, this.neueBemerkung, hightmeter, pause);
|
||||
this.logData.removeIf(ld -> ld.getId().equals(this.selectedLog.getId()));
|
||||
this.logData.add(newLog);
|
||||
double dauer = dauerInput(this.selectedLog.getDauer());
|
||||
double strecke = -1;
|
||||
double pause = -1.0;
|
||||
double hightmeter = -1.0;
|
||||
boolean bemerkung = false;
|
||||
LocalDate datum = null;
|
||||
if (dauer >= 0) {
|
||||
strecke = streckeInput(this.selectedLog.getStrecke() + "");
|
||||
if (strecke >= 0) {
|
||||
pause = pauseInput(this.selectedLog.getPause() + "");
|
||||
if (pause >= 0.0) {
|
||||
hightmeter = hightmeterInput(this.selectedLog.getHightmeter() + "");
|
||||
if (hightmeter >= 0.0) {
|
||||
bemerkung = bemerkungInput(this.selectedLog.getBemerkung());
|
||||
if (bemerkung) {
|
||||
datum = dateInput(this.selectedLog.getDatum());
|
||||
if (datum != null) {
|
||||
Log newLog = new Log(this.selectedLog.getId(), dauer, datum, strecke, this.neueBemerkung, hightmeter, pause);
|
||||
this.logData.removeIf(ld -> ld.getId().equals(this.selectedLog.getId()));
|
||||
this.logData.add(newLog);
|
||||
// tourAkt.get().delLog(this.selectedLog.getId());
|
||||
// tourAkt.get().addLog(newLog);
|
||||
this.tourData.removeIf(td -> td.getName().equals(this.selectedTour.getName()));
|
||||
this.tourData.add(tourAkt.get());
|
||||
TourPlaner.editLog(this.selectedTour.getName(), newLog);
|
||||
this.tourData.removeIf(td -> td.getName().equals(this.selectedTour.getName()));
|
||||
this.tourData.add(tourAkt.get());
|
||||
TourPlaner.editLog(this.selectedTour.getName(), newLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//Kein log
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"), ConfigHelper.getLangIniString("keinlogselected"), ConfigHelper.getLangIniString("keinlogselectedmsg"));
|
||||
}
|
||||
}else {
|
||||
//Keine Tour
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"), ConfigHelper.getLangIniString("keinetourselected"), ConfigHelper.getLangIniString("deltournoselectmsg"));
|
||||
}
|
||||
this.neueBemerkung = null;
|
||||
}
|
||||
@ -406,8 +417,8 @@ public class ViewModel {
|
||||
}
|
||||
|
||||
public ObservableList<Log> getLogData() {
|
||||
logData.removeAll();
|
||||
logData.addAll(TourPlaner.getLogs(this.selectedTour.getName()));
|
||||
logData.removeIf(s -> true);
|
||||
if(this.selectedTour != null) logData.addAll(TourPlaner.getLogs(this.selectedTour.getName()));
|
||||
return logData;
|
||||
}
|
||||
|
||||
@ -500,16 +511,18 @@ public class ViewModel {
|
||||
* Entfernt eine Tour anhand der ausgewählten Tour
|
||||
*/
|
||||
public void delTour(){
|
||||
try {
|
||||
if (this.selectedTour != null) {
|
||||
String tourname = this.selectedTour.getName();
|
||||
tourData.removeIf(s -> s.getName().equals(tourname));
|
||||
tourNamen.removeIf(s -> s.equals(tourname));
|
||||
logData.removeIf(s -> true);
|
||||
setSelectedTour(null);
|
||||
TourPlaner.delTour(tourname);
|
||||
}catch (NullPointerException e){
|
||||
LogHelper.error(ConfigHelper.getLangIniString("keinetourselected"),
|
||||
ConfigHelper.getLangIniString("deltournoselect"));
|
||||
try {
|
||||
tourData.removeIf(s -> s.getName().equals(tourname));
|
||||
tourNamen.removeIf(s -> s.equals(tourname));
|
||||
logData.removeIf(s -> true);
|
||||
TourPlaner.delTour(tourname);
|
||||
setSelectedTour(null);
|
||||
} catch (NullPointerException e) {
|
||||
LogHelper.error(e);
|
||||
}
|
||||
}else {
|
||||
AlertHelper.warn(ConfigHelper.getLangIniString("achtung"),
|
||||
ConfigHelper.getLangIniString("keinetourselected"),
|
||||
ConfigHelper.getLangIniString("deltournoselectmsg"));
|
||||
@ -612,7 +625,6 @@ public class ViewModel {
|
||||
*/
|
||||
public void exportData(){
|
||||
String file = AlertHelper.fileChooser("Exportiere");
|
||||
System.out.println("EXPORT: " + file);
|
||||
if(file != null){
|
||||
try {
|
||||
new Exporter(file).doExport();
|
||||
|
Loading…
x
Reference in New Issue
Block a user