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
518dc98c
Commit
518dc98c
authored
1 month ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Feat: Add button to show error statistic of ZIP entry
parent
89db7652
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+32
-0
...ava/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.fxml
+11
-1
...ces/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.fxml
with
43 additions
and
1 deletion
+43
-1
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.java
+
32
-
0
View file @
518dc98c
...
...
@@ -91,6 +91,11 @@ public class ZipEntryManager {
@FXML
private
ImageView
checkAllImageView
;
@FXML
private
Button
showReportBtn
;
@FXML
private
ImageView
showReportImageView
;
@FXML
private
ListView
<
ZipEntryNode
>
entryList
;
@FXML
...
...
@@ -156,6 +161,10 @@ public class ZipEntryManager {
Image
img
=
new
Image
(
inStream
);
checkAllImageView
.
setImage
(
img
);
}
try
(
InputStream
inStream
=
MainWindow
.
class
.
getResourceAsStream
(
"icons/error_stat32x32.png"
))
{
Image
img
=
new
Image
(
inStream
);
showReportImageView
.
setImage
(
img
);
}
}
catch
(
IOException
ignored
)
{
//ignore exceptions
}
...
...
@@ -240,9 +249,29 @@ public class ZipEntryManager {
checkAllBtn
.
setOnAction
(
e
->
{
disableTaskButtons
();
dialog
.
show
();
refresh
();
});
showReportBtn
.
setOnAction
(
e
->
{
disableTaskButtons
();
setEntryListLocked
(
true
);
try
{
controller
.
loadZipEntry
(
entryList
.
getSelectionModel
().
getSelectedItem
().
getEntry
());
if
(
currentlyLoadedEntry
==
-
1
)
{
currentlyLoadedEntry
=
entryList
.
getSelectionModel
().
getSelectedIndex
();
}
WriteReportDialog
writeDialog
=
new
WriteReportDialog
(
stage
,
controller
,
null
);
writeDialog
.
show
();
}
catch
(
IOException
ex
)
{
throw
new
RuntimeException
(
ex
);
}
finally
{
controller
.
loadZipEntry
(
entryList
.
getItems
().
get
(
currentlyLoadedEntry
).
getEntry
());
setEntryListLocked
(
false
);
refresh
();
}
});
showReportBtn
.
setDisable
(
true
);
cancelBtn
.
setOnAction
(
e
->
stage
.
close
());
}
...
...
@@ -312,6 +341,7 @@ public class ZipEntryManager {
objectCountValue
.
setText
(
unknownValueText
);
loadBtn
.
setDisable
(
true
);
decompressBtn
.
setDisable
(
true
);
showReportBtn
.
setDisable
(
true
);
}
else
{
erroneousValue
.
setText
(
Localization
.
getText
(
"ZipEntryManager.no"
));
...
...
@@ -324,8 +354,10 @@ public class ZipEntryManager {
}
if
(
entry
.
getModel
().
isValidated
())
{
validatedValue
.
setText
(
Localization
.
getText
(
"ZipEntryManager.yes"
));
showReportBtn
.
setDisable
(
false
);
}
else
{
validatedValue
.
setText
(
Localization
.
getText
(
"ZipEntryManager.no"
));
showReportBtn
.
setDisable
(
true
);
}
objectCountValue
.
setText
(
String
.
valueOf
(
entry
.
getModel
().
getNumberOfFeatures
()));
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/ZipEntryManager.fxml
+
11
-
1
View file @
518dc98c
...
...
@@ -40,6 +40,17 @@
preserveRatio=
"true"
/>
</graphic>
</Button>
<Button
fx:id=
"showReportBtn"
alignment=
"CENTER"
layoutX=
"70.0"
layoutY=
"15.0"
maxWidth=
"1.7976931348623157E308"
mnemonicParsing=
"false"
>
<font>
<Font
size=
"14.0"
/>
</font>
<graphic>
<ImageView
fx:id=
"showReportImageView"
fitHeight=
"32.0"
fitWidth=
"32.0"
pickOnBounds=
"true"
preserveRatio=
"true"
/>
</graphic>
</Button>
<Separator
orientation=
"VERTICAL"
prefHeight=
"200.0"
/>
<Button
fx:id=
"decompressAllBtn"
alignment=
"CENTER"
layoutX=
"70.0"
layoutY=
"15.0"
maxWidth=
"1.7976931348623157E308"
mnemonicParsing=
"false"
>
<font>
...
...
@@ -50,7 +61,6 @@
preserveRatio=
"true"
/>
</graphic>
</Button>
<Separator
orientation=
"VERTICAL"
prefHeight=
"200.0"
/>
<Button
fx:id=
"checkAllBtn"
alignment=
"CENTER"
layoutX=
"126.0"
layoutY=
"15.0"
maxWidth=
"1.7976931348623157E308"
mnemonicParsing=
"false"
>
<font>
...
...
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