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
c748a058
Commit
c748a058
authored
Dec 03, 2025
by
Luna Riegel
Browse files
Refactor: Rename functions and fields
parent
8edfe8d6
Pipeline
#12217
passed with stage
in 2 minutes and 12 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java
View file @
c748a058
...
@@ -125,7 +125,7 @@ public class CityDoctorModel {
...
@@ -125,7 +125,7 @@ public class CityDoctorModel {
public
Stream
<
CityObject
>
createFeatureStream
()
{
public
Stream
<
CityObject
>
createFeatureStream
()
{
return
Stream
.
of
(
getBuildings
(),
getVegetation
(),
getBridges
(),
getLand
(),
getTransportation
(),
return
Stream
.
of
(
getBuildings
(),
getVegetation
(),
getBridges
(),
getLand
(),
getTransportation
(),
getTunnels
(),
getWater
(),
getCityFurniture
(),
get
Generic
CityObjects
()).
flatMap
(
co
->
co
);
getTunnels
(),
getWater
(),
getCityFurniture
(),
get
Other
CityObjects
()).
flatMap
(
co
->
co
);
}
}
public
List
<
GmlId
>
getFeatureIds
()
{
public
List
<
GmlId
>
getFeatureIds
()
{
...
@@ -347,20 +347,20 @@ public class CityDoctorModel {
...
@@ -347,20 +347,20 @@ public class CityDoctorModel {
return
cityfurniture
.
size
();
return
cityfurniture
.
size
();
}
}
public
void
add
Generic
CityObject
(
Generic
CityObject
coGeneric
CityObject
)
{
public
void
add
Other
CityObject
(
CityObject
other
CityObject
)
{
genericObjects
.
add
(
coGeneric
CityObject
.
getGmlId
());
genericObjects
.
add
(
other
CityObject
.
getGmlId
());
cache
.
put
(
coGeneric
CityObject
);
cache
.
put
(
other
CityObject
);
}
}
public
Stream
<
Generic
CityObject
>
get
Generic
CityObjects
()
{
public
Stream
<
CityObject
>
get
Other
CityObjects
()
{
return
genericObjects
.
stream
().
map
(
co
->
(
GenericCityObject
)
cache
.
get
(
co
)
);
return
genericObjects
.
stream
().
map
(
cache
:
:
get
);
}
}
public
List
<
GmlId
>
get
Generic
CityObjectIds
()
{
public
List
<
GmlId
>
get
Other
CityObject
s
Ids
()
{
return
genericObjects
;
return
genericObjects
;
}
}
public
int
get
Generic
CityObjectCount
(){
public
int
get
Other
CityObject
s
Count
(){
return
genericObjects
.
size
();
return
genericObjects
.
size
();
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
View file @
c748a058
...
@@ -227,6 +227,7 @@ public class Citygml3FeatureMapper extends ObjectWalker {
...
@@ -227,6 +227,7 @@ public class Citygml3FeatureMapper extends ObjectWalker {
}
}
}
}
finishCityObjectConstruction
(
oco
);
finishCityObjectConstruction
(
oco
);
model
.
addOtherCityObject
(
oco
);
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/writer/CityGMLWriterUtils.java
View file @
c748a058
...
@@ -92,7 +92,7 @@ public class CityGMLWriterUtils {
...
@@ -92,7 +92,7 @@ public class CityGMLWriterUtils {
storeCityObjects
(
model
.
getTransportation
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
getTransportation
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
getWater
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
getWater
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
getCityFurniture
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
getCityFurniture
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
get
Generic
CityObjects
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
get
Other
CityObjects
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
getTunnels
(),
gmlFactory
,
model
,
cModel
,
val
);
storeCityObjects
(
model
.
getTunnels
(),
gmlFactory
,
model
,
cModel
,
val
);
writer
.
write
(
cModel
);
writer
.
write
(
cModel
);
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModelTest.java
View file @
c748a058
...
@@ -325,11 +325,11 @@ public class CityDoctorModelTest {
...
@@ -325,11 +325,11 @@ public class CityDoctorModelTest {
}
}
@Test
@Test
public
void
testAdd
Generic
CityObject
()
{
public
void
testAdd
Other
CityObject
()
{
GenericCityObject
gen
=
Mockito
.
mock
(
GenericCityObject
.
class
);
GenericCityObject
gen
=
Mockito
.
mock
(
GenericCityObject
.
class
);
Mockito
.
when
(
gen
.
getGmlId
()).
thenReturn
(
new
GmlId
(
"g"
));
Mockito
.
when
(
gen
.
getGmlId
()).
thenReturn
(
new
GmlId
(
"g"
));
model
.
add
Generic
CityObject
(
gen
);
model
.
add
Other
CityObject
(
gen
);
assertEquals
(
gen
,
model
.
get
Generic
CityObjects
().
toList
().
get
(
0
));
assertEquals
(
gen
,
model
.
get
Other
CityObjects
().
toList
().
get
(
0
));
}
}
@Test
@Test
...
@@ -362,7 +362,7 @@ public class CityDoctorModelTest {
...
@@ -362,7 +362,7 @@ public class CityDoctorModelTest {
model
.
addLand
(
land
);
model
.
addLand
(
land
);
model
.
addWater
(
water
);
model
.
addWater
(
water
);
model
.
addCityFurniture
(
cf
);
model
.
addCityFurniture
(
cf
);
model
.
add
Generic
CityObject
(
generic
);
model
.
add
Other
CityObject
(
generic
);
assertEquals
(
9
,
model
.
getNumberOfFeatures
());
assertEquals
(
9
,
model
.
getNumberOfFeatures
());
...
@@ -547,11 +547,11 @@ public class CityDoctorModelTest {
...
@@ -547,11 +547,11 @@ public class CityDoctorModelTest {
GenericCityObject
gco2
=
Mockito
.
mock
(
GenericCityObject
.
class
);
GenericCityObject
gco2
=
Mockito
.
mock
(
GenericCityObject
.
class
);
Mockito
.
when
(
gco2
.
getGmlId
()).
thenReturn
(
new
GmlId
(
"gco2"
));
Mockito
.
when
(
gco2
.
getGmlId
()).
thenReturn
(
new
GmlId
(
"gco2"
));
model
.
add
Generic
CityObject
(
gco1
);
model
.
add
Other
CityObject
(
gco1
);
assertEquals
(
gco1
,
model
.
get
Generic
CityObjects
().
toList
().
get
(
0
));
assertEquals
(
gco1
,
model
.
get
Other
CityObjects
().
toList
().
get
(
0
));
model
.
replaceFeature
(
gco1
,
gco2
);
model
.
replaceFeature
(
gco1
,
gco2
);
assertEquals
(
gco2
,
model
.
get
Generic
CityObjects
().
toList
().
get
(
0
));
assertEquals
(
gco2
,
model
.
get
Other
CityObjects
().
toList
().
get
(
0
));
assertEquals
(
1
,
model
.
get
Generic
CityObjects
().
toList
().
size
());
assertEquals
(
1
,
model
.
get
Other
CityObjects
().
toList
().
size
());
}
}
@Test
(
expected
=
IllegalStateException
.
class
)
@Test
(
expected
=
IllegalStateException
.
class
)
...
...
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
View file @
c748a058
...
@@ -67,7 +67,7 @@ public class CityDoctorController {
...
@@ -67,7 +67,7 @@ public class CityDoctorController {
private
AtomicInteger
waterChunkNr
=
new
AtomicInteger
(
0
);
private
AtomicInteger
waterChunkNr
=
new
AtomicInteger
(
0
);
private
AtomicInteger
landChunkNr
=
new
AtomicInteger
(
0
);
private
AtomicInteger
landChunkNr
=
new
AtomicInteger
(
0
);
private
AtomicInteger
cityFurnitureChunkNr
=
new
AtomicInteger
(
0
);
private
AtomicInteger
cityFurnitureChunkNr
=
new
AtomicInteger
(
0
);
private
AtomicInteger
generic
CityObjectsChunkNr
=
new
AtomicInteger
(
0
);
private
AtomicInteger
other
CityObjectsChunkNr
=
new
AtomicInteger
(
0
);
...
@@ -164,7 +164,7 @@ public class CityDoctorController {
...
@@ -164,7 +164,7 @@ public class CityDoctorController {
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
WATER
,
model
.
getWaterCount
()
==
0
);
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
WATER
,
model
.
getWaterCount
()
==
0
);
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
LAND
,
model
.
getLandCount
()
==
0
);
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
LAND
,
model
.
getLandCount
()
==
0
);
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
CITY_FURNITURE
,
model
.
getCityFurnitureCount
()
==
0
);
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
CITY_FURNITURE
,
model
.
getCityFurnitureCount
()
==
0
);
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
GENERIC
_CITY_OBJECT
,
model
.
get
Generic
CityObjectCount
()
==
0
);
mainWindow
.
setDisableOfFeatureTab
(
FeatureType
.
OTHER
_CITY_OBJECT
,
model
.
get
Other
CityObject
s
Count
()
==
0
);
}
}
public
void
buildTrees
()
{
public
void
buildTrees
()
{
...
@@ -190,7 +190,7 @@ public class CityDoctorController {
...
@@ -190,7 +190,7 @@ public class CityDoctorController {
waterChunkNr
.
set
(
0
);
waterChunkNr
.
set
(
0
);
landChunkNr
.
set
(
0
);
landChunkNr
.
set
(
0
);
cityFurnitureChunkNr
.
set
(
0
);
cityFurnitureChunkNr
.
set
(
0
);
generic
CityObjectsChunkNr
.
set
(
0
);
other
CityObjectsChunkNr
.
set
(
0
);
}
}
private
void
buildLand
(
CityDoctorModel
model
)
{
private
void
buildLand
(
CityDoctorModel
model
)
{
...
@@ -235,18 +235,18 @@ public class CityDoctorController {
...
@@ -235,18 +235,18 @@ public class CityDoctorController {
}
}
private
void
buildGenericCityObjects
(
CityDoctorModel
model
)
{
private
void
buildGenericCityObjects
(
CityDoctorModel
model
)
{
if
(
model
.
get
Generic
CityObjectCount
()
==
0
)
{
if
(
model
.
get
Other
CityObject
s
Count
()
==
0
)
{
return
;
return
;
}
}
TreeView
<
Renderable
>
otherObjectsView
=
mainWindow
.
get
Generic
CityObjectView
();
TreeView
<
Renderable
>
otherObjectsView
=
mainWindow
.
get
Other
CityObjectView
();
TreeItem
<
Renderable
>
otherObjectsRoot
=
new
TreeItem
<>(
new
CityObjectGroupNode
(
Collections
.
emptyList
(),
TreeItem
<
Renderable
>
otherObjectsRoot
=
new
TreeItem
<>(
new
CityObjectGroupNode
(
Collections
.
emptyList
(),
"Generic CityObjects"
,
Color
.
DARKGRAY
));
"Generic CityObjects"
,
Color
.
DARKGRAY
));
otherObjectsRoot
.
setExpanded
(
true
);
otherObjectsRoot
.
setExpanded
(
true
);
otherObjectsView
.
setRoot
(
otherObjectsRoot
);
otherObjectsView
.
setRoot
(
otherObjectsRoot
);
Supplier
<
Stream
<
Generic
CityObject
>>
supply
=
model:
:
get
Generic
CityObjects
;
Supplier
<
Stream
<
CityObject
>>
supply
=
model:
:
get
Other
CityObjects
;
build
Generic
CityObjectTreeFromList
(
supply
,
otherObjectsView
.
getRoot
());
build
Other
CityObject
s
TreeFromList
(
supply
,
otherObjectsView
.
getRoot
());
addMoreButtonFor
Generic
CityObjects
(
otherObjectsView
,
otherObjectsRoot
,
generic
CityObjectsChunkNr
,
supply
,
addMoreButtonFor
Other
CityObjects
(
otherObjectsView
,
otherObjectsRoot
,
other
CityObjectsChunkNr
,
supply
,
model
.
get
Generic
CityObjectCount
());
model
.
get
Other
CityObject
s
Count
());
}
}
private
void
buildWater
(
CityDoctorModel
model
)
{
private
void
buildWater
(
CityDoctorModel
model
)
{
...
@@ -528,13 +528,13 @@ public class CityDoctorController {
...
@@ -528,13 +528,13 @@ public class CityDoctorController {
}
}
}
}
private
void
addMoreButtonFor
Generic
CityObjects
(
TreeView
<
Renderable
>
view
,
TreeItem
<
Renderable
>
root
,
private
void
addMoreButtonFor
Other
CityObjects
(
TreeView
<
Renderable
>
view
,
TreeItem
<
Renderable
>
root
,
AtomicInteger
chunkCounter
,
Supplier
<
Stream
<
Generic
CityObject
>>
supply
,
int
featureCount
){
AtomicInteger
chunkCounter
,
Supplier
<
Stream
<
CityObject
>>
supply
,
int
featureCount
){
if
((
chunkCounter
.
get
()
+
1
)
*
MAX_FEATURES_PER_CHUNK
<
featureCount
)
{
if
((
chunkCounter
.
get
()
+
1
)
*
MAX_FEATURES_PER_CHUNK
<
featureCount
)
{
AddMoreButtonRunnable
run
=
new
AddMoreButtonRunnable
(
featureCount
,
view
,
root
,
chunkCounter
)
{
AddMoreButtonRunnable
run
=
new
AddMoreButtonRunnable
(
featureCount
,
view
,
root
,
chunkCounter
)
{
@Override
@Override
public
void
buildNodeTreeCall
()
{
public
void
buildNodeTreeCall
()
{
build
Generic
CityObjectTreeFromList
(
supply
,
root
);
build
Other
CityObject
s
TreeFromList
(
supply
,
root
);
updateTree
(
root
);
updateTree
(
root
);
}
}
};
};
...
@@ -590,7 +590,7 @@ public class CityDoctorController {
...
@@ -590,7 +590,7 @@ public class CityDoctorController {
mainWindow
.
getWaterView
().
setRoot
(
null
);
mainWindow
.
getWaterView
().
setRoot
(
null
);
mainWindow
.
getTerrainView
().
setRoot
(
null
);
mainWindow
.
getTerrainView
().
setRoot
(
null
);
mainWindow
.
getCityFurnitureView
().
setRoot
(
null
);
mainWindow
.
getCityFurnitureView
().
setRoot
(
null
);
mainWindow
.
get
Generic
CityObjectView
().
setRoot
(
null
);
mainWindow
.
get
Other
CityObjectView
().
setRoot
(
null
);
mainWindow
.
getErrorTree
().
getRoot
().
getChildren
().
clear
();
mainWindow
.
getErrorTree
().
getRoot
().
getChildren
().
clear
();
mainWindow
.
getAttributeView
().
getRoot
().
getChildren
().
clear
();
mainWindow
.
getAttributeView
().
getRoot
().
getChildren
().
clear
();
mainWindow
.
getGlobalErrorsView
().
getItems
().
clear
();
mainWindow
.
getGlobalErrorsView
().
getItems
().
clear
();
...
@@ -697,8 +697,8 @@ public class CityDoctorController {
...
@@ -697,8 +697,8 @@ public class CityDoctorController {
});
});
}
}
private
void
build
Generic
CityObjectTreeFromList
(
Supplier
<
Stream
<
Generic
CityObject
>>
supply
,
TreeItem
<
Renderable
>
root
)
{
private
void
build
Other
CityObject
s
TreeFromList
(
Supplier
<
Stream
<
CityObject
>>
supply
,
TreeItem
<
Renderable
>
root
)
{
int
genericObjectChunk
=
generic
CityObjectsChunkNr
.
get
();
int
genericObjectChunk
=
other
CityObjectsChunkNr
.
get
();
supply
.
get
().
skip
((
long
)
genericObjectChunk
*
MAX_FEATURES_PER_CHUNK
).
limit
(
MAX_FEATURES_PER_CHUNK
).
forEach
(
gen
->{
supply
.
get
().
skip
((
long
)
genericObjectChunk
*
MAX_FEATURES_PER_CHUNK
).
limit
(
MAX_FEATURES_PER_CHUNK
).
forEach
(
gen
->{
buildTopLevelCityObjectNode
(
gen
,
root
);
buildTopLevelCityObjectNode
(
gen
,
root
);
});
});
...
@@ -1105,7 +1105,7 @@ public class CityDoctorController {
...
@@ -1105,7 +1105,7 @@ public class CityDoctorController {
updateTree
(
mainWindow
.
getCityFurnitureView
().
getRoot
());
updateTree
(
mainWindow
.
getCityFurnitureView
().
getRoot
());
updateTree
(
mainWindow
.
getTransportationView
().
getRoot
());
updateTree
(
mainWindow
.
getTransportationView
().
getRoot
());
updateTree
(
mainWindow
.
getWaterView
().
getRoot
());
updateTree
(
mainWindow
.
getWaterView
().
getRoot
());
updateTree
(
mainWindow
.
get
Generic
CityObjectView
().
getRoot
());
updateTree
(
mainWindow
.
get
Other
CityObjectView
().
getRoot
());
updateTree
(
mainWindow
.
getTunnelView
().
getRoot
());
updateTree
(
mainWindow
.
getTunnelView
().
getRoot
());
renderer
.
updateErrors
();
renderer
.
updateErrors
();
}
}
...
@@ -1228,7 +1228,7 @@ public class CityDoctorController {
...
@@ -1228,7 +1228,7 @@ public class CityDoctorController {
case
WATER
->
filterWaterTree
(
searchString
);
case
WATER
->
filterWaterTree
(
searchString
);
case
LAND
->
filterLandTree
(
searchString
);
case
LAND
->
filterLandTree
(
searchString
);
case
CITY_FURNITURE
->
filterCityFurnitureTree
(
searchString
);
case
CITY_FURNITURE
->
filterCityFurnitureTree
(
searchString
);
case
GENERIC
_CITY_OBJECT
->
filter
Generic
CityObjectTree
(
searchString
);
case
OTHER
_CITY_OBJECT
->
filter
Other
CityObject
s
Tree
(
searchString
);
}
}
...
@@ -1325,15 +1325,15 @@ public class CityDoctorController {
...
@@ -1325,15 +1325,15 @@ public class CityDoctorController {
addMoreButtonForCityFurniture
(
cityFurnitureView
,
root
,
cityFurnitureChunkNr
,
foundCityFurniture
,
featureCount
);
addMoreButtonForCityFurniture
(
cityFurnitureView
,
root
,
cityFurnitureChunkNr
,
foundCityFurniture
,
featureCount
);
}
}
private
void
filter
Generic
CityObjectTree
(
String
searchString
)
{
private
void
filter
Other
CityObject
s
Tree
(
String
searchString
)
{
Supplier
<
Stream
<
Generic
CityObject
>>
foundGenericCityObject
=
()
->
model
.
get
Generic
CityObjects
().
Supplier
<
Stream
<
CityObject
>>
foundGenericCityObject
=
()
->
model
.
get
Other
CityObjects
().
filter
(
co
->
featureFilter
(
co
,
searchString
));
filter
(
co
->
featureFilter
(
co
,
searchString
));
int
featureCount
=
(
int
)
foundGenericCityObject
.
get
().
count
();
int
featureCount
=
(
int
)
foundGenericCityObject
.
get
().
count
();
TreeView
<
Renderable
>
genericCityObjectView
=
mainWindow
.
get
Generic
CityObjectView
();
TreeView
<
Renderable
>
genericCityObjectView
=
mainWindow
.
get
Other
CityObjectView
();
TreeItem
<
Renderable
>
root
=
genericCityObjectView
.
getRoot
();
TreeItem
<
Renderable
>
root
=
genericCityObjectView
.
getRoot
();
root
.
getChildren
().
clear
();
root
.
getChildren
().
clear
();
build
Generic
CityObjectTreeFromList
(
foundGenericCityObject
,
root
);
build
Other
CityObject
s
TreeFromList
(
foundGenericCityObject
,
root
);
addMoreButtonFor
Generic
CityObjects
(
genericCityObjectView
,
root
,
generic
CityObjectsChunkNr
,
addMoreButtonFor
Other
CityObjects
(
genericCityObjectView
,
root
,
other
CityObjectsChunkNr
,
foundGenericCityObject
,
featureCount
);
foundGenericCityObject
,
featureCount
);
}
}
...
@@ -1484,8 +1484,8 @@ public class CityDoctorController {
...
@@ -1484,8 +1484,8 @@ public class CityDoctorController {
addMoreButtonForCityFurniture
(
cityFurnitureView
,
root
,
cityFurnitureChunkNr
,
supply
,
foundCityFurniture
.
size
());
addMoreButtonForCityFurniture
(
cityFurnitureView
,
root
,
cityFurnitureChunkNr
,
supply
,
foundCityFurniture
.
size
());
}
}
public
void
fillTreeViewWithError
Generic
CityObjects
()
{
public
void
fillTreeViewWithError
Other
CityObjects
()
{
TreeView
<
Renderable
>
genericCityObjectsView
=
mainWindow
.
get
Generic
CityObjectView
();
TreeView
<
Renderable
>
genericCityObjectsView
=
mainWindow
.
get
Other
CityObjectView
();
TreeItem
<
Renderable
>
root
=
genericCityObjectsView
.
getRoot
();
TreeItem
<
Renderable
>
root
=
genericCityObjectsView
.
getRoot
();
if
(
model
==
null
)
{
if
(
model
==
null
)
{
return
;
return
;
...
@@ -1496,14 +1496,14 @@ public class CityDoctorController {
...
@@ -1496,14 +1496,14 @@ public class CityDoctorController {
mainWindow
.
resetSearchBar
();
mainWindow
.
resetSearchBar
();
root
.
getChildren
().
clear
();
root
.
getChildren
().
clear
();
resetFeatureChunks
();
resetFeatureChunks
();
List
<
GmlId
>
found
Generic
CityObjects
=
model
.
getCache
().
getErrorFeatureIds
();
List
<
GmlId
>
found
Other
CityObjects
=
model
.
getCache
().
getErrorFeatureIds
();
List
<
GmlId
>
idList
=
model
.
get
Generic
CityObjectIds
();
List
<
GmlId
>
idList
=
model
.
get
Other
CityObject
s
Ids
();
found
Generic
CityObjects
.
removeIf
(
gmlId
->
(!
idList
.
contains
(
gmlId
)));
found
Other
CityObjects
.
removeIf
(
gmlId
->
(!
idList
.
contains
(
gmlId
)));
Supplier
<
Stream
<
Generic
CityObject
>>
supply
=
()
->
model
.
getCache
().
getStream
(
found
Generic
CityObjects
).
map
(
co
->
(
GenericCityObject
)
co
);
Supplier
<
Stream
<
CityObject
>>
supply
=
()
->
model
.
getCache
().
getStream
(
found
Other
CityObjects
).
map
(
co
->
(
GenericCityObject
)
co
);
build
Generic
CityObjectTreeFromList
(
supply
,
root
);
build
Other
CityObject
s
TreeFromList
(
supply
,
root
);
updateTree
(
root
);
updateTree
(
root
);
addMoreButtonFor
Generic
CityObjects
(
genericCityObjectsView
,
root
,
generic
CityObjectsChunkNr
,
supply
,
found
Generic
CityObjects
.
size
());
addMoreButtonFor
Other
CityObjects
(
genericCityObjectsView
,
root
,
other
CityObjectsChunkNr
,
supply
,
found
Other
CityObjects
.
size
());
}
}
public
void
fillTreeViewWithErrorTransportation
()
{
public
void
fillTreeViewWithErrorTransportation
()
{
...
@@ -1647,7 +1647,7 @@ public class CityDoctorController {
...
@@ -1647,7 +1647,7 @@ public class CityDoctorController {
fillTreeViewWithErrorTunnel
();
fillTreeViewWithErrorTunnel
();
fillTreeViewWithErrorWater
();
fillTreeViewWithErrorWater
();
fillTreeViewWithErrorCityFurniture
();
fillTreeViewWithErrorCityFurniture
();
fillTreeViewWithError
Generic
CityObjects
();
fillTreeViewWithError
Other
CityObjects
();
}
else
{
}
else
{
throw
new
IllegalStateException
(
"Unknown filter index selected: "
+
newV
);
throw
new
IllegalStateException
(
"Unknown filter index selected: "
+
newV
);
}
}
...
...
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java
View file @
c748a058
...
@@ -639,7 +639,7 @@ public class MainWindow extends Application {
...
@@ -639,7 +639,7 @@ public class MainWindow extends Application {
selectedTab
=
FeatureType
.
CITY_FURNITURE
;
selectedTab
=
FeatureType
.
CITY_FURNITURE
;
break
;
break
;
case
8
:
case
8
:
selectedTab
=
FeatureType
.
GENERIC
_CITY_OBJECT
;
selectedTab
=
FeatureType
.
OTHER
_CITY_OBJECT
;
break
;
break
;
default
:
default
:
throw
new
IllegalStateException
(
"Unknown tab index: "
+
index
);
throw
new
IllegalStateException
(
"Unknown tab index: "
+
index
);
...
@@ -673,7 +673,7 @@ public class MainWindow extends Application {
...
@@ -673,7 +673,7 @@ public class MainWindow extends Application {
case
CITY_FURNITURE:
case
CITY_FURNITURE:
cityFurnitureTab
.
setDisable
(
value
);
cityFurnitureTab
.
setDisable
(
value
);
break
;
break
;
case
GENERIC
_CITY_OBJECT:
case
OTHER
_CITY_OBJECT:
otherObjectsTab
.
setDisable
(
value
);
otherObjectsTab
.
setDisable
(
value
);
break
;
break
;
default
:
default
:
...
@@ -1015,7 +1015,7 @@ public class MainWindow extends Application {
...
@@ -1015,7 +1015,7 @@ public class MainWindow extends Application {
return
attributeView
;
return
attributeView
;
}
}
public
TreeView
<
Renderable
>
get
Generic
CityObjectView
()
{
public
TreeView
<
Renderable
>
get
Other
CityObjectView
()
{
return
otherObjectsView
;
return
otherObjectsView
;
}
}
...
@@ -1161,7 +1161,7 @@ public class MainWindow extends Application {
...
@@ -1161,7 +1161,7 @@ public class MainWindow extends Application {
case
WATER
->
new
Pair
<>(
waterTab
,
waterView
);
case
WATER
->
new
Pair
<>(
waterTab
,
waterView
);
case
LAND
->
new
Pair
<>(
terrainTab
,
terrainView
);
case
LAND
->
new
Pair
<>(
terrainTab
,
terrainView
);
case
CITY_FURNITURE
->
new
Pair
<>(
cityFurnitureTab
,
cityFurnitureView
);
case
CITY_FURNITURE
->
new
Pair
<>(
cityFurnitureTab
,
cityFurnitureView
);
case
GENERIC
_CITY_OBJECT
->
new
Pair
<>(
otherObjectsTab
,
otherObjectsView
);
case
OTHER
_CITY_OBJECT
->
new
Pair
<>(
otherObjectsTab
,
otherObjectsView
);
default
->
throw
new
IllegalArgumentException
(
"unknown feature type: "
+
coType
);
default
->
throw
new
IllegalArgumentException
(
"unknown feature type: "
+
coType
);
};
};
}
}
...
...
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/TriangulatedGeometry.java
View file @
c748a058
...
@@ -92,7 +92,7 @@ public class TriangulatedGeometry {
...
@@ -92,7 +92,7 @@ public class TriangulatedGeometry {
addPolygonDataFromCityObjects
(
model
.
getVegetation
(),
triGeom
,
Color
.
LIGHTGREEN
,
filters
);
addPolygonDataFromCityObjects
(
model
.
getVegetation
(),
triGeom
,
Color
.
LIGHTGREEN
,
filters
);
addPolygonDataFromCityObjects
(
model
.
getWater
(),
triGeom
,
Color
.
LIGHTSKYBLUE
,
filters
);
addPolygonDataFromCityObjects
(
model
.
getWater
(),
triGeom
,
Color
.
LIGHTSKYBLUE
,
filters
);
addPolygonDataFromCityObjects
(
model
.
getCityFurniture
(),
triGeom
,
Color
.
BLUEVIOLET
,
filters
);
addPolygonDataFromCityObjects
(
model
.
getCityFurniture
(),
triGeom
,
Color
.
BLUEVIOLET
,
filters
);
addPolygonDataFromCityObjects
(
model
.
get
Generic
CityObjects
(),
triGeom
,
Color
.
BLACK
,
filters
);
addPolygonDataFromCityObjects
(
model
.
get
Other
CityObjects
(),
triGeom
,
Color
.
BLACK
,
filters
);
return
triGeom
;
return
triGeom
;
}
}
...
...
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