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
766e173e
Commit
766e173e
authored
Feb 18, 2026
by
Luna Riegel
Browse files
Refactor: Simplify GeometryNode text creation
parent
b9a9738f
Changes
3
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Geometry.java
View file @
766e173e
...
...
@@ -251,6 +251,21 @@ public class Geometry extends GmlElement {
return
"Geometry [type="
+
type
+
", lod="
+
lod
+
", id="
+
getGmlId
()
+
"]"
;
}
public
String
getDisplayText
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"Geometry ["
);
sb
.
append
(
this
.
getType
());
sb
.
append
(
", "
);
sb
.
append
(
this
.
getLod
());
if
(
this
.
getGmlId
().
isGenerated
())
{
sb
.
append
(
"]"
);
}
else
{
sb
.
append
(
"] "
);
sb
.
append
(
this
.
getGmlId
());
}
return
sb
.
toString
();
}
public
List
<
Vertex
>
getVertices
()
{
return
vertices
;
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/ImplicitGeometryHolder.java
View file @
766e173e
...
...
@@ -119,6 +119,10 @@ public class ImplicitGeometryHolder extends Geometry {
LibraryObject
.
resetObjectMap
();
}
@Override
public
String
getDisplayText
()
{
return
"Implicit"
+
super
.
getDisplayText
();
}
}
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/node/GeometryNode.java
View file @
766e173e
...
...
@@ -13,21 +13,7 @@ public class GeometryNode extends Renderable {
public
GeometryNode
(
Geometry
geom
)
{
this
.
geom
=
geom
;
StringBuilder
sb
=
new
StringBuilder
();
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
sb
.
append
(
"Implicit"
);
}
sb
.
append
(
"Geometry ["
);
sb
.
append
(
geom
.
getType
());
sb
.
append
(
", "
);
sb
.
append
(
geom
.
getLod
());
if
(
geom
.
getGmlId
().
isGenerated
())
{
sb
.
append
(
"]"
);
}
else
{
sb
.
append
(
"] "
);
sb
.
append
(
geom
.
getGmlId
());
}
text
=
sb
.
toString
();
text
=
geom
.
getDisplayText
();
}
@Override
...
...
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