Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
d33d54b8
Commit
d33d54b8
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Feat: Implement checkAllBtn functionality
parent
468cffd0
master
dev
dev_gui_features_zip_loading
archive/dev_gui_features_zip_loading
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
+8
-0
...odel/src/main/resources/CityDoctorLocalization.properties
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties
+8
-0
...l/src/main/resources/CityDoctorLocalization_de.properties
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CheckDialog.java
+75
-1
...in/java/de/hft/stuttgart/citydoctor2/gui/CheckDialog.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+16
-0
...ava/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/CheckDialog.fxml
+73
-1
...sources/de/hft/stuttgart/citydoctor2/gui/CheckDialog.fxml
with
180 additions
and
2 deletions
+180
-2
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
+
8
-
0
View file @
d33d54b8
...
...
@@ -18,6 +18,7 @@ CheckDialog.parameterValue=Value
CheckDialog.parameterUnit
=
Unit
CityDoctorController.noDatamodel
=
Datamodel is null, no checks could be done
CityDoctorController.noSourceFile
=
Source file is null, no checks could be done
CityDoctorController.noZipFile
=
ZIP archive is null, no checks could be done
CityDoctorController.exportSuccess
=
Successfully exported feature
ExceptionDialog.stacktrace
=
The exception stacktrace was:
FilterPane.buildings
=
Buildings
...
...
@@ -104,6 +105,13 @@ CheckDialog.schematronFileLabel=Schematron File:
CheckDialog.selectBtn
=
Select
CheckDialog.checkBtn
=
Check
CheckDialog.cancelBtn
=
Cancel
CheckDialog.streamCheckOption
=
Use low memory mode
CheckDialog.streamCheckLabel
=
Citymodels are not loaded and kept in memory. Check results are saved to the QualityADE in copies of the input files.
CheckDialog.outputPathLabel
=
Output path (Required):
CheckDialog.outputPathBtn
=
Select
CheckDialog.pdfReportsOption
=
Create PDF reports
CheckDialog.xmlReportsOption
=
Create XML reports
CheckDialog.noPathError
=
Output path is missing!
ZipEntryManager.title
=
Zip-entry manager
ZipEntryManager.entryListTitle
=
Zip-entries
ZipEntryManager.metadata
=
Metadata
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties
+
8
-
0
View file @
d33d54b8
...
...
@@ -16,6 +16,7 @@ CheckDialog.parameterValue=Wert
CheckDialog.parameterUnit
=
Einheit
CityDoctorController.noDatamodel
=
Datenmodell ist null, keine Pr
\u
00fcfungen konnten ausgef
\u
00fchrt werden
CityDoctorController.noSourceFile
=
Quelldatei ist null, keine Pr
\u
00fcfungen konnten ausgef
\u
00fchrt werden
CityDoctorController.noZipFile
=
ZIP-Archiv ist null, keine Pr
\u
00fcfungen konnten ausgef
\u
00fchrt werden
CityDoctorController.exportSuccess
=
Feature export erfolgreich abgeschlossen
ExceptionDialog.stacktrace
=
Der Stacktrace des Fehlers war:
FilterPane.buildings
=
Geb
\u
00e4ude
...
...
@@ -102,6 +103,13 @@ CheckDialog.schematronFileLabel=Schematron Datei
CheckDialog.selectBtn
=
Ausw
\u
00e4hlen
CheckDialog.checkBtn
=
Pr
\u
00fcfen
CheckDialog.cancelBtn
=
Abbrechen
CheckDialog.streamCheckOption
=
Niedrigen Arbeitsspeicherverbrauchsmodus aktivieren
CheckDialog.streamCheckLabel
=
Stadtmodelle werden nicht in den Arbeitsspeicher geladen. Ergebnisse werden in der QualityADE in Kopien der Eingangsdateien gespeichert.
CheckDialog.outputPathLabel
=
Ausgabepfad (Pflichtfeld):
CheckDialog.outputPathBtn
=
Ausw
\u
00e4hlen
CheckDialog.pdfReportsOption
=
PDF Berichte erstellen
CheckDialog.xmlReportsOption
=
XML Berichte erstellen
CheckDialog.noPathError
=
Ausgabepfad wurde nicht gesetzt!
ZipEntryManager.title
=
Zipeintrag Manager
ZipEntryManager.entryListTitle
=
Zipeintr
\u
00e4ge
ZipEntryManager.metadata
=
Metadaten
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CheckDialog.java
+
75
-
1
View file @
d33d54b8
...
...
@@ -3,6 +3,7 @@ package de.hft.stuttgart.citydoctor2.gui;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.nio.file.Path
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.HashMap
;
...
...
@@ -10,6 +11,12 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
javafx.beans.value.ChangeListener
;
import
javafx.beans.value.ObservableValue
;
import
javafx.scene.control.Alert
;
import
javafx.scene.control.CheckBox
;
import
javafx.scene.control.ProgressIndicator
;
import
javafx.scene.control.Tooltip
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -131,9 +138,29 @@ public class CheckDialog {
@FXML
private
Label
schematronFileLabel
;
@FXML
private
VBox
zipArchiveOptionsVBox
;
@FXML
private
CheckBox
streamCheckOption
;
@FXML
private
Label
streamCheckLabel
;
@FXML
private
VBox
streamCheckParametersVBox
;
@FXML
private
Label
outputPathLabel
;
@FXML
private
TextField
outputPathTextField
;
@FXML
private
Button
outputPathBtn
;
@FXML
private
CheckBox
pdfReportsOption
;
@FXML
private
CheckBox
xmlReportsOption
;
private
CityDoctorController
controller
;
private
FilterPane
filterPane
;
private
MainWindow
window
;
private
boolean
zipArchiveMode
;
public
CheckDialog
(
MainWindow
window
,
Window
parent
,
CityDoctorController
controller
)
throws
IOException
{
this
.
window
=
window
;
...
...
@@ -153,6 +180,8 @@ public class CheckDialog {
}
public
void
initialize
()
{
setupZipArchiveOptions
();
createEnableColumn
(
geometricTable
);
createNameColumn
(
geometricTable
);
createValueColumn
(
geometricTable
);
...
...
@@ -256,6 +285,30 @@ public class CheckDialog {
});
}
private
void
setupZipArchiveOptions
()
{
streamCheckOption
.
selectedProperty
().
addListener
(
new
ChangeListener
<
Boolean
>()
{
@Override
public
void
changed
(
ObservableValue
<?
extends
Boolean
>
observable
,
Boolean
oldValue
,
Boolean
newValue
)
{
streamCheckParametersVBox
.
setDisable
(!
streamCheckOption
.
isSelected
());
}
});
streamCheckOption
.
setText
(
Localization
.
getText
(
"CheckDialog.streamCheckOption"
));
streamCheckLabel
.
setTooltip
(
new
Tooltip
(
Localization
.
getText
(
"CheckDialog.streamCheckLabel"
)));
outputPathLabel
.
setText
(
Localization
.
getText
(
"CheckDialog.outputPathLabel"
));
outputPathBtn
.
setText
(
Localization
.
getText
(
"CheckDialog.outputPathBtn"
));
pdfReportsOption
.
setText
(
Localization
.
getText
(
"CheckDialog.pdfReportsOption"
));
xmlReportsOption
.
setText
(
Localization
.
getText
(
"CheckDialog.xmlReportsOption"
));
showZipArchiveOptions
(
false
);
}
public
void
showZipArchiveOptions
(
boolean
enabled
)
{
zipArchiveOptionsVBox
.
setDisable
(!
enabled
);
zipArchiveOptionsVBox
.
setVisible
(
enabled
);
zipArchiveMode
=
enabled
;
}
private
void
setupSelectButton
()
{
selectBtn
.
setOnAction
(
ae
->
{
FileChooser
chooser
=
new
FileChooser
();
...
...
@@ -416,13 +469,33 @@ public class CheckDialog {
checkBtn
.
setDisable
(
true
);
cancelBtn
.
setDisable
(
true
);
stage
.
setOnCloseRequest
(
Event:
:
consume
);
Thread
t
=
new
Thread
(()
->
{
try
{
if
(
logger
.
isInfoEnabled
())
{
String
startingChecks
=
Localization
.
getText
(
"CheckDialog.startingChecks"
);
logger
.
info
(
startingChecks
);
}
controller
.
startChecks
(
config
,
progress:
:
setProgress
);
if
(
zipArchiveMode
)
{
Path
outputPath
=
null
;
if
(
streamCheckOption
.
isSelected
())
{
if
(
outputPathTextField
.
getText
().
isEmpty
())
{
Alert
warning
=
new
Alert
(
Alert
.
AlertType
.
ERROR
);
warning
.
setTitle
(
"Error"
);
warning
.
setContentText
(
Localization
.
getText
(
"CheckDialog.noPathError"
));
warning
.
showAndWait
();
return
;
}
outputPath
=
Path
.
of
(
outputPathTextField
.
getText
());
progress
.
setProgress
(
ProgressIndicator
.
INDETERMINATE_PROGRESS
);
}
controller
.
startZipFileChecks
(
config
,
progress:
:
setProgress
,
streamCheckOption
.
isSelected
(),
outputPath
,
pdfReportsOption
.
isSelected
(),
xmlReportsOption
.
isSelected
());
}
else
{
controller
.
startChecks
(
config
,
progress:
:
setProgress
);
}
if
(
logger
.
isInfoEnabled
())
{
String
checksDone
=
Localization
.
getText
(
"CheckDialog.checksDone"
);
logger
.
info
(
checksDone
);
...
...
@@ -574,6 +647,7 @@ public class CheckDialog {
}
}
public
void
show
()
{
Platform
.
runLater
(()
->
{
if
(
controller
.
getCurrentConfig
()
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+
16
-
0
View file @
d33d54b8
...
...
@@ -100,6 +100,7 @@ public class ZipEntryManager {
private
CityDoctorController
controller
;
private
int
currentlyLoadedEntry
=
-
1
;
private
CheckDialog
dialog
;
private
String
unknownValueText
=
Localization
.
getText
(
"ZipEntryManager.unknownValue"
);
...
...
@@ -120,6 +121,8 @@ public class ZipEntryManager {
stage
.
close
();
}
});
dialog
=
new
CheckDialog
(
null
,
parent
,
controller
);
dialog
.
showZipArchiveOptions
(
true
);
}
public
void
initialize
()
{
...
...
@@ -234,6 +237,19 @@ public class ZipEntryManager {
t
.
start
();
});
checkAllBtn
.
setOnAction
(
e
->
{
disableTaskButtons
();
setEntryListLocked
(
true
);
try
{
dialog
.
show
();
}
finally
{
setEntryListLocked
(
false
);
}
});
cancelBtn
.
setOnAction
(
e
->
stage
.
close
());
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/CheckDialog.fxml
+
73
-
1
View file @
d33d54b8
...
...
@@ -2,6 +2,7 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Tab?>
...
...
@@ -16,7 +17,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox
prefHeight=
"800.0"
spacing=
"15.0"
xmlns=
"http://javafx.com/javafx/
8.0.
22
1
"
xmlns:fx=
"http://javafx.com/fxml/1"
>
<VBox
prefHeight=
"800.0"
spacing=
"15.0"
xmlns=
"http://javafx.com/javafx/22"
xmlns:fx=
"http://javafx.com/fxml/1"
>
<children>
<TabPane
fx:id=
"tabPane"
VBox.vgrow=
"ALWAYS"
>
<tabs>
...
...
@@ -51,6 +52,77 @@
<TableView
fx:constant=
"CONSTRAINED_RESIZE_POLICY"
/>
</columnResizePolicy>
</TableView>
<VBox
fx:id=
"zipArchiveOptionsVBox"
prefHeight=
"176.0"
prefWidth=
"485.0"
>
<children>
<HBox
prefHeight=
"100.0"
prefWidth=
"200.0"
>
<children>
<CheckBox
fx:id=
"streamCheckOption"
mnemonicParsing=
"false"
text=
"Use low memory mode"
>
<font>
<Font
size=
"14.0"
/>
</font>
</CheckBox>
<Label
fx:id=
"streamCheckLabel"
text=
"(?)"
underline=
"true"
>
<opaqueInsets>
<Insets/>
</opaqueInsets>
<padding>
<Insets
left=
"3.0"
/>
</padding>
<font>
<Font
size=
"14.0"
/>
</font>
</Label>
</children>
</HBox>
<VBox
fx:id=
"streamCheckParametersVBox"
prefHeight=
"200.0"
prefWidth=
"100.0"
>
<children>
<Label
fx:id=
"outputPathLabel"
text=
"Output path:"
>
<font>
<Font
size=
"14.0"
/>
</font>
</Label>
<HBox
prefWidth=
"485.0"
>
<children>
<TextField
fx:id=
"outputPathTextField"
prefHeight=
"25.0"
prefWidth=
"291.0"
>
<font>
<Font
size=
"14.0"
/>
</font>
</TextField>
<Button
fx:id=
"outputPathBtn"
mnemonicParsing=
"false"
prefHeight=
"30.0"
prefWidth=
"86.0"
text=
"Select"
>
<font>
<Font
size=
"14.0"
/>
</font>
</Button>
</children>
</HBox>
<CheckBox
fx:id=
"pdfReportsOption"
mnemonicParsing=
"false"
text=
"Create PDF reports"
>
<padding>
<Insets
top=
"10.0"
/>
</padding>
<font>
<Font
size=
"14.0"
/>
</font>
</CheckBox>
<CheckBox
layoutX=
"10.0"
layoutY=
"60.0"
mnemonicParsing=
"false"
text=
"Create XML reports"
fx:id=
"xmlReportsOption"
>
<padding>
<Insets
top=
"10.0"
/>
</padding>
<font>
<Font
size=
"14.0"
/>
</font>
</CheckBox>
</children>
</VBox>
</children>
<HBox.margin>
<Insets
left=
"30.0"
/>
</HBox.margin>
</VBox>
</children>
</HBox>
<HBox
spacing=
"5.0"
VBox.vgrow=
"NEVER"
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets