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
70201856
Commit
70201856
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Feat: Add JavaFX ListCell & Node for CityGmlZipEntry
parent
241f223a
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
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/ZipEntryListCell.java
+20
-0
.../hft/stuttgart/citydoctor2/gui/tree/ZipEntryListCell.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/ZipEntryNode.java
+32
-0
...a/de/hft/stuttgart/citydoctor2/gui/tree/ZipEntryNode.java
with
52 additions
and
0 deletions
+52
-0
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/ZipEntryListCell.java
0 → 100644
+
20
-
0
View file @
70201856
package
de.hft.stuttgart.citydoctor2.gui.tree
;
import
javafx.scene.control.ListCell
;
public
class
ZipEntryListCell
extends
ListCell
<
ZipEntryNode
>
{
@Override
protected
void
updateItem
(
ZipEntryNode
item
,
boolean
empty
)
{
super
.
updateItem
(
item
,
empty
);
if
(!
empty
||
item
!=
null
)
{
setText
(
item
.
getText
());
}
else
{
setText
(
null
);
}
}
public
void
updateColor
()
{
setTextFill
(
getItem
().
getTextColor
());
}
}
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/ZipEntryNode.java
0 → 100644
+
32
-
0
View file @
70201856
package
de.hft.stuttgart.citydoctor2.gui.tree
;
import
de.hft.stuttgart.citydoctor2.zip.CityGmlZipEntry
;
import
javafx.scene.paint.Color
;
public
class
ZipEntryNode
{
private
final
CityGmlZipEntry
entry
;
public
ZipEntryNode
(
CityGmlZipEntry
entry
)
{
this
.
entry
=
entry
;
}
public
Color
getTextColor
()
{
if
(
entry
.
getErrorType
()
!=
null
)
{
return
Color
.
RED
;
}
else
if
(
entry
.
isDecompressed
())
{
return
Color
.
GREEN
;
}
else
{
return
Color
.
BLACK
;
}
}
public
String
getText
()
{
return
entry
.
getDisplayName
();
}
public
CityGmlZipEntry
getEntry
()
{
return
entry
;
}
}
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