Skip to content
GitLab
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
Jan 07, 2025
by
Riegel
Browse files
Feat: Add JavaFX ListCell & Node for CityGmlZipEntry
parent
241f223a
Changes
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/ZipEntryListCell.java
0 → 100644
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
());
}
}
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/ZipEntryNode.java
0 → 100644
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
;
}
}
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