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
9aa68d69
Commit
9aa68d69
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Refactor: Rename ZipEntryPicker to ZipEntryManager
parent
1c4d930e
master
dev
dev_gui_features_zip_loading
3.17.0
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
+17
-16
...odel/src/main/resources/CityDoctorLocalization.properties
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties
+17
-16
...l/src/main/resources/CityDoctorLocalization_de.properties
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
+4
-5
...e/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+22
-22
...ava/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.fxml
+0
-0
...ces/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.fxml
with
60 additions
and
59 deletions
+60
-59
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
+
17
-
16
View file @
9aa68d69
...
...
@@ -104,22 +104,23 @@ CheckDialog.schematronFileLabel=Schematron File:
CheckDialog.selectBtn
=
Select
CheckDialog.checkBtn
=
Check
CheckDialog.cancelBtn
=
Cancel
ZipEntryPicker.entryListTitle
=
Zip-entries
ZipEntryPicker.metadata
=
Metadata
ZipEntryPicker.subpathLbl
=
Subpath:
ZipEntryPicker.erroneousLbl
=
Erroneous:
ZipEntryPicker.excessiveFileSize
=
Filesize exceeds memory
ZipEntryPicker.invalidCityGml
=
Invalid CityGML file
ZipEntryPicker.ioError
=
Unable to access file
ZipEntryPicker.filesizeLbl
=
Filesize:
ZipEntryPicker.validatedLbl
=
Validated:
ZipEntryPicker.objectCountLbl
=
Object count:
ZipEntryPicker.loadBtn
=
Load CityGML model
ZipEntryPicker.decompressBtn
=
Unpack file
ZipEntryPicker.cancelBtn
=
Cancel
ZipEntryPicker.unknownValue
=
N/A
ZipEntryPicker.yes
=
Yes
ZipEntryPicker.no
=
No
ZipEntryManager.title
=
Zip-entry manager
ZipEntryManager.entryListTitle
=
Zip-entries
ZipEntryManager.metadata
=
Metadata
ZipEntryManager.subpathLbl
=
Subpath:
ZipEntryManager.erroneousLbl
=
Erroneous:
ZipEntryManager.excessiveFileSize
=
Filesize exceeds memory
ZipEntryManager.invalidCityGml
=
Invalid CityGML file
ZipEntryManager.ioError
=
Unable to access file
ZipEntryManager.filesizeLbl
=
Filesize:
ZipEntryManager.validatedLbl
=
Validated:
ZipEntryManager.objectCountLbl
=
Object count:
ZipEntryManager.loadBtn
=
Load CityGML model
ZipEntryManager.decompressBtn
=
Unpack file
ZipEntryManager.cancelBtn
=
Cancel
ZipEntryManager.unknownValue
=
N/A
ZipEntryManager.yes
=
Yes
ZipEntryManager.no
=
No
WriteReportDialog.writeBtn
=
Save
WriteReportDialog.cancelBtn
=
Cancel
WriteReportDialog.errorStatisticsLabel
=
Error Statistics
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties
+
17
-
16
View file @
9aa68d69
...
...
@@ -102,22 +102,23 @@ CheckDialog.schematronFileLabel=Schematron Datei
CheckDialog.selectBtn
=
Ausw
\u
00e4hlen
CheckDialog.checkBtn
=
Pr
\u
00fcfen
CheckDialog.cancelBtn
=
Abbrechen
ZipEntryPicker.entryListTitle
=
Zipeintr
\u
00e4ge
ZipEntryPicker.metadata
=
Metadaten
ZipEntryPicker.subpathLbl
=
Unterpfad:
ZipEntryPicker.erroneousLbl
=
Fehlerhaft:
ZipEntryPicker.excessiveFileSize
=
Datei zu gro
\u
00DF
ZipEntryPicker.invalidCityGml
=
Ung
\u
00fcltige CityGML Datei
ZipEntryPicker.ioError
=
Dateizugriff fehlgeschlagen
ZipEntryPicker.filesizeLbl
=
Dateigr
\u
00f6
\u
00DFe:
ZipEntryPicker.validatedLbl
=
Validiert:
ZipEntryPicker.objectCountLbl
=
Objektanzahl:
ZipEntryPicker.loadBtn
=
CityGML Modell laden
ZipEntryPicker.decompressBtn
=
Datei entpacken
ZipEntryPicker.cancelBtn
=
Abbruch
ZipEntryPicker.unknownValue
=
Unbekannt
ZipEntryPicker.yes
=
Ja
ZipEntryPicker.no
=
Nein
ZipEntryManager.title
=
Zipeintrag Manager
ZipEntryManager.entryListTitle
=
Zipeintr
\u
00e4ge
ZipEntryManager.metadata
=
Metadaten
ZipEntryManager.subpathLbl
=
Unterpfad:
ZipEntryManager.erroneousLbl
=
Fehlerhaft:
ZipEntryManager.excessiveFileSize
=
Datei zu gro
\u
00DF
ZipEntryManager.invalidCityGml
=
Ung
\u
00fcltige CityGML Datei
ZipEntryManager.ioError
=
Dateizugriff fehlgeschlagen
ZipEntryManager.filesizeLbl
=
Dateigr
\u
00f6
\u
00DFe:
ZipEntryManager.validatedLbl
=
Validiert:
ZipEntryManager.objectCountLbl
=
Objektanzahl:
ZipEntryManager.loadBtn
=
CityGML Modell laden
ZipEntryManager.decompressBtn
=
Datei entpacken
ZipEntryManager.cancelBtn
=
Abbruch
ZipEntryManager.unknownValue
=
Unbekannt
ZipEntryManager.yes
=
Ja
ZipEntryManager.no
=
Nein
WriteReportDialog.writeBtn
=
Speichern
WriteReportDialog.cancelBtn
=
Abbrechen
WriteReportDialog.errorStatisticsLabel
=
Fehler Statistik
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
+
4
-
5
View file @
9aa68d69
...
...
@@ -30,7 +30,6 @@ import org.xml.sax.SAXParseException;
import
java.io.File
;
import
java.io.IOException
;
import
java.nio.file.Path
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.function.Function
;
...
...
@@ -47,7 +46,7 @@ public class CityDoctorController {
private
ParserConfiguration
currentConfig
;
private
String
sourceFile
;
private
CityGmlZipArchive
zipArchive
;
private
ZipEntry
Pick
er
currentZipEntry
Pick
er
;
private
ZipEntry
Manag
er
currentZipEntry
Manag
er
;
private
Checker
currentChecker
;
private
HighlightController
highlightController
;
...
...
@@ -156,8 +155,8 @@ public class CityDoctorController {
Platform
.
runLater
(()
->
{
try
{
currentZipEntry
Pick
er
=
new
ZipEntry
Pick
er
(
mainWindow
.
getMainStage
(),
this
);
currentZipEntry
Pick
er
.
show
();
currentZipEntry
Manag
er
=
new
ZipEntry
Manag
er
(
mainWindow
.
getMainStage
(),
this
);
currentZipEntry
Manag
er
.
show
();
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
@@ -217,7 +216,7 @@ public class CityDoctorController {
}
public
void
showZipManager
()
{
Platform
.
runLater
(()
->
currentZipEntry
Pick
er
.
show
());
Platform
.
runLater
(()
->
currentZipEntry
Manag
er
.
show
());
}
private
void
setupFeatureTabs
()
{
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntry
Pick
er.java
→
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntry
Manag
er.java
+
22
-
22
View file @
9aa68d69
...
...
@@ -31,9 +31,9 @@ import org.apache.logging.log4j.Logger;
import
java.io.IOException
;
import
java.io.InputStream
;
public
class
ZipEntry
Pick
er
{
public
class
ZipEntry
Manag
er
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
ZipEntry
Pick
er
.
class
);
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
ZipEntry
Manag
er
.
class
);
private
Stage
stage
;
private
CityGmlZipArchive
archive
;
...
...
@@ -96,10 +96,10 @@ public class ZipEntryPicker {
private
CityDoctorController
controller
;
private
int
currentlyLoadedEntry
=
-
1
;
private
String
unknownValueText
=
Localization
.
getText
(
"ZipEntry
Pick
er.unknownValue"
);
private
String
unknownValueText
=
Localization
.
getText
(
"ZipEntry
Manag
er.unknownValue"
);
public
ZipEntry
Pick
er
(
Window
parent
,
CityDoctorController
controller
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
ZipEntry
Pick
er
.
class
.
getResource
(
"ZipEntry
Pick
er.fxml"
));
public
ZipEntry
Manag
er
(
Window
parent
,
CityDoctorController
controller
)
throws
IOException
{
FXMLLoader
loader
=
new
FXMLLoader
(
ZipEntry
Manag
er
.
class
.
getResource
(
"ZipEntry
Manag
er.fxml"
));
loader
.
setController
(
this
);
this
.
controller
=
controller
;
archive
=
controller
.
getZipArchive
();
...
...
@@ -109,7 +109,7 @@ public class ZipEntryPicker {
stage
.
setScene
(
new
Scene
(
box
));
stage
.
initOwner
(
parent
);
stage
.
initModality
(
Modality
.
APPLICATION_MODAL
);
stage
.
setTitle
(
"Zip
-
Entry
Picker"
);
stage
.
setTitle
(
Localization
.
getText
(
"ZipEntry
Manager.title"
)
);
stage
.
getScene
().
addEventFilter
(
KeyEvent
.
KEY_PRESSED
,
(
KeyEvent
event
)
->
{
if
(
event
.
getCode
()
==
KeyCode
.
ESCAPE
)
{
stage
.
close
();
...
...
@@ -221,13 +221,13 @@ public class ZipEntryPicker {
}
private
void
applyLocalization
()
{
entriesPane
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.entryListTitle"
));
metadataPane
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.metadata"
));
subpathLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.subpathLbl"
));
erroneousLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.erroneousLbl"
));
filesizeLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.filesizeLbl"
));
validatedLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.validatedLbl"
));
objectCountLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.objectCountLbl"
));
entriesPane
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.entryListTitle"
));
metadataPane
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.metadata"
));
subpathLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.subpathLbl"
));
erroneousLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.erroneousLbl"
));
filesizeLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.filesizeLbl"
));
validatedLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.validatedLbl"
));
objectCountLbl
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.objectCountLbl"
));
subpathValueTxt
.
setText
(
unknownValueText
);
erroneousValue
.
setText
(
unknownValueText
);
...
...
@@ -235,9 +235,9 @@ public class ZipEntryPicker {
validatedValue
.
setText
(
unknownValueText
);
objectCountValue
.
setText
(
unknownValueText
);
loadBtn
.
setTooltip
(
new
Tooltip
(
Localization
.
getText
(
"ZipEntry
Pick
er.loadBtn"
)));
decompressBtn
.
setTooltip
(
new
Tooltip
(
Localization
.
getText
(
"ZipEntry
Pick
er.decompressBtn"
)));
cancelBtn
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.cancelBtn"
));
loadBtn
.
setTooltip
(
new
Tooltip
(
Localization
.
getText
(
"ZipEntry
Manag
er.loadBtn"
)));
decompressBtn
.
setTooltip
(
new
Tooltip
(
Localization
.
getText
(
"ZipEntry
Manag
er.decompressBtn"
)));
cancelBtn
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.cancelBtn"
));
}
private
void
populateZipEntryList
()
{
...
...
@@ -284,7 +284,7 @@ public class ZipEntryPicker {
loadBtn
.
setDisable
(
true
);
decompressBtn
.
setDisable
(
true
);
}
else
{
erroneousValue
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.no"
));
erroneousValue
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.no"
));
loadBtn
.
setDisable
(!
entry
.
isDecompressed
());
decompressBtn
.
setDisable
(
entry
.
isDecompressed
());
...
...
@@ -294,9 +294,9 @@ public class ZipEntryPicker {
return
;
}
if
(
entry
.
getModel
().
isValidated
())
{
validatedValue
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.yes"
));
validatedValue
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.yes"
));
}
else
{
validatedValue
.
setText
(
Localization
.
getText
(
"ZipEntry
Pick
er.no"
));
validatedValue
.
setText
(
Localization
.
getText
(
"ZipEntry
Manag
er.no"
));
}
objectCountValue
.
setText
(
String
.
valueOf
(
entry
.
getModel
().
getNumberOfFeatures
()));
}
...
...
@@ -312,13 +312,13 @@ public class ZipEntryPicker {
private
String
getErrorText
(
ZipEntryErrorType
error
)
{
switch
(
error
)
{
case
EXCESSIVE_FILESIZE
->
{
return
Localization
.
getText
(
"ZipEntry
Pick
er.excessiveFileSize"
);
return
Localization
.
getText
(
"ZipEntry
Manag
er.excessiveFileSize"
);
}
case
INVALID_CITY_GML_FILE
->
{
return
Localization
.
getText
(
"ZipEntry
Pick
er.invalidCityGml"
);
return
Localization
.
getText
(
"ZipEntry
Manag
er.invalidCityGml"
);
}
default
->
{
return
Localization
.
getText
(
"ZipEntry
Pick
er.ioError"
);
return
Localization
.
getText
(
"ZipEntry
Manag
er.ioError"
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/ZipEntry
Pick
er.fxml
→
CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/ZipEntry
Manag
er.fxml
+
0
-
0
View file @
9aa68d69
File moved
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