diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java index ba31e264155fadcca2a90c02c5cf53688ee69508..5a3fe3ddcf74b68022b4c9d89a4b8fd983078861 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java @@ -61,6 +61,7 @@ public class CityDoctorModel { private final List genericObjects; private final List land; private final List roads; + private final List tunnels; private final List water; private CityModel cModel; private final ParserConfiguration config; @@ -83,6 +84,7 @@ public class CityDoctorModel { bridges = new ArrayList<>(); land = new ArrayList<>(); roads = new ArrayList<>(); + tunnels = new ArrayList<>(); water = new ArrayList<>(); cityfurniture = new ArrayList<>(); genericObjects = new ArrayList<>(); @@ -125,7 +127,7 @@ public class CityDoctorModel { public Stream createFeatureStream() { return Stream.of(buildings.stream(), vegetation.stream(), bridges.stream(), land.stream(), roads.stream(), - water.stream(), cityfurniture.stream(),genericObjects.stream()).flatMap(co -> co); + tunnels.stream() ,water.stream(), cityfurniture.stream(),genericObjects.stream()).flatMap(co -> co); } public void saveAs(String file, boolean saveQualityAde) throws CityDoctorWriteException { @@ -227,6 +229,7 @@ public class CityDoctorModel { collectErrorsFromList(errors, bridges); collectErrorsFromList(errors, land); collectErrorsFromList(errors, roads); + collectErrorsFromList(errors, tunnels); collectErrorsFromList(errors, water); collectErrorsFromList(errors, cityfurniture); collectErrorsFromList(errors, genericObjects); @@ -287,6 +290,10 @@ public class CityDoctorModel { return roads; } + public List getTunnels() { + return tunnels; + } + public List getWater() { return water; } @@ -315,9 +322,13 @@ public class CityDoctorModel { roads.add(to); } + public void addTunnel(Tunnel tunnel) { + tunnels.add(tunnel); + } + public int getNumberOfFeatures() { - return buildings.size() + vegetation.size() + bridges.size() + land.size() + roads.size() + water.size() + cityfurniture.size() - + genericObjects.size(); + return buildings.size() + vegetation.size() + bridges.size() + land.size() + tunnels.size() + +roads.size() + water.size() + cityfurniture.size() + genericObjects.size(); } public ParserConfiguration getParserConfig() { @@ -331,7 +342,9 @@ public class CityDoctorModel { replaceBridge(currentFeature, nextFeature); } else if (nextFeature instanceof TransportationObject) { replaceTransportationObject(currentFeature, nextFeature); - } else if (nextFeature instanceof Vegetation) { + }else if (nextFeature instanceof Tunnel) { + replaceTunnel(currentFeature, nextFeature); + }else if (nextFeature instanceof Vegetation) { replaceVegetation(currentFeature, nextFeature); } else if (nextFeature instanceof LandObject) { replaceLandObject(currentFeature, nextFeature); @@ -392,6 +405,14 @@ public class CityDoctorModel { roads.set(index, (TransportationObject) nextFeature); } + private void replaceTunnel(CityObject currentFeature, CityObject nextFeature){ + int index = tunnels.indexOf(currentFeature); + if (index == -1) { + throw new IllegalStateException(COULD_NOT_FIND_FEATURE + currentFeature + " in tunnels"); + } + tunnels.set(index, (Tunnel) nextFeature); + } + private void replaceBridge(CityObject currentFeature, CityObject nextFeature) { int index = bridges.indexOf(currentFeature); if (index == -1) { @@ -415,6 +436,8 @@ public class CityDoctorModel { bridges.add(bo); } else if (co instanceof TransportationObject to) { roads.add(to); + } else if (co instanceof Tunnel tu) { + tunnels.add(tu); } else if (co instanceof Vegetation veg) { vegetation.add(veg); } else if (co instanceof LandObject lo) { diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelHollow.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelHollow.java index b9cb08572f1f544ca4b00f3d091e6713547d7f1c..85e53004797fabdf249bd63048ac31c57c758c93 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelHollow.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelHollow.java @@ -14,8 +14,8 @@ public class TunnelHollow extends AbstractRoom{ private final List furnitureRefs = new ArrayList<>(2); private CityObject parent; - public void setGmlObject(org.citygml4j.core.model.building.BuildingRoom cgmlRoom){ - super.cgmlRoom = cgmlRoom; + public void setGmlObject(org.citygml4j.core.model.tunnel.HollowSpace gmlHollowSpace){ + super.cgmlRoom = gmlHollowSpace; } diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelPart.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelPart.java index 09544926d6f75c14e3a1020e84451fc104cf07d0..7740be6f5f93ce35ffadd4e851abbcd114b0c3d0 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelPart.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelPart.java @@ -12,8 +12,6 @@ public class TunnelPart extends AbstractTunnel { private Tunnel parent; - private TunnelPart() { - } public TunnelPart(Tunnel parent) { this.parent = parent; @@ -52,4 +50,5 @@ public class TunnelPart extends AbstractTunnel { return new TunnelPart(); } + private TunnelPart(){} } diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java index eec47f1dbf378c406ec44f10c3e387efec4579ae..bc9eb56ed459ead0866f490c7b0d59171ead1627 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java @@ -26,9 +26,12 @@ import java.util.Map; import de.hft.stuttgart.citydoctor2.datastructure.*; import de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding; +import de.hft.stuttgart.citydoctor2.datastructure.AbstractTunnel; import de.hft.stuttgart.citydoctor2.datastructure.Building; import de.hft.stuttgart.citydoctor2.datastructure.BuildingPart; import de.hft.stuttgart.citydoctor2.datastructure.BuildingRoom; +import de.hft.stuttgart.citydoctor2.datastructure.TunnelFurniture; +import de.hft.stuttgart.citydoctor2.datastructure.TunnelPart; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.citygml4j.core.model.CityGMLVersion; @@ -58,12 +61,13 @@ import org.citygml4j.core.model.transportation.Track; import org.citygml4j.core.model.transportation.TrafficArea; import org.citygml4j.core.model.transportation.TrafficSpace; import org.citygml4j.core.model.transportation.TrafficSpaceProperty; +import org.citygml4j.core.model.tunnel.*; +import org.citygml4j.core.model.tunnel.Tunnel; import org.citygml4j.core.model.vegetation.AbstractVegetationObject; import org.citygml4j.core.model.vegetation.PlantCover; import org.citygml4j.core.model.vegetation.SolitaryVegetationObject; import org.citygml4j.core.model.waterbody.WaterBody; import org.citygml4j.core.visitor.ObjectWalker; -import org.xmlobjects.gml.adapter.geometry.complexes.CompositeSurfaceAdapter; import org.xmlobjects.gml.model.base.AbstractGML; import org.xmlobjects.gml.model.feature.AbstractFeature; import org.xmlobjects.gml.model.geometry.AbstractGeometry; @@ -357,6 +361,195 @@ public class Citygml3FeatureMapper extends ObjectWalker { return bi; } + @Override + public void visit(Tunnel tunnel){ + de.hft.stuttgart.citydoctor2.datastructure.Tunnel tu = new de.hft.stuttgart.citydoctor2.datastructure.Tunnel(); + for (TunnelPartProperty tPartProperty : tunnel.getTunnelParts()) { + if (!tPartProperty.isSetObject()) { + continue; + } + org.citygml4j.core.model.tunnel.TunnelPart gmlTunnelPart = tPartProperty.getObject(); + TunnelPart tPart = new TunnelPart(tu); + readAbstractTunnel(gmlTunnelPart, tPart); + tu.addTunnelPart(tPart); + } + readAbstractTunnel(tunnel, tu); + resolveAndClearReferences(); + updateEdgesAndVertices(tu); + for (TunnelPart part : tu.getTunnelParts()) { + updateEdgesAndVertices(part); + } + model.addTunnel(tu); + + } + + private void readAbstractTunnel(org.citygml4j.core.model.tunnel.AbstractTunnel gmlTunnel, AbstractTunnel cdTunnel) { + mapAbstractOccupiedSpace(gmlTunnel, cdTunnel); + cdTunnel.setGmlObject(gmlTunnel); + + // parse deprecated geometries + parseAndAddMultiSurface(gmlTunnel.getDeprecatedProperties().getLod1MultiSurface(), Lod.LOD1, cdTunnel); + parseAndAddMultiSurface(gmlTunnel.getDeprecatedProperties().getLod4MultiSurface(), Lod.LOD4, cdTunnel); + parseAndAddSolid(gmlTunnel.getDeprecatedProperties().getLod4Solid(), Lod.LOD4, cdTunnel); + + for (TunnelInstallationProperty tiProp : gmlTunnel.getTunnelInstallations()) { + var gmlTi = tiProp.getObject(); + if (gmlTi == null) { + // ignore empty properties + continue; + } + Installation ti = mapTunnelInstallation(gmlTi); + cdTunnel.addTunnelInstallation(ti); + } + + for (HollowSpaceProperty thProp : gmlTunnel.getHollowSpaces()) { + var gmlTh = thProp.getObject(); + if (gmlTh == null) { + continue; + } + TunnelHollow br = mapTunnelHollow(gmlTh); + cdTunnel.addTunnelHollow(br); + } + + SurfaceMapper surfaceMapper = new SurfaceMapper(polygonMap, references, vertexMap, config); + for (AbstractSpaceBoundaryProperty surfaceProp : gmlTunnel.getBoundaries()) { + if (!surfaceProp.isSetObject()) { + continue; + } + AbstractSpaceBoundary surface = surfaceProp.getObject(); + surface.accept(surfaceMapper); + } + + cdTunnel.unsetGmlGeometries(); + resolveAndClearReferences(); + updateEdgesAndVertices(cdTunnel); + for (BoundarySurface bs : surfaceMapper.getSurfaces()) { + updateEdgesAndVertices(bs); + for (Opening o : bs.getOpenings()) { + updateEdgesAndVertices(o); + } + } + for (Installation ti : cdTunnel.getTunnelInstallations()) { + updateEdgesAndVertices(ti); + for (BoundarySurface bs : ti.getBoundarySurfaces()) { + updateEdgesAndVertices(bs); + for (Opening o : bs.getOpenings()) { + updateEdgesAndVertices(o); + } + } + } + for (TunnelFurnitureProperty tfProp : gmlTunnel.getTunnelFurniture()){ + var gmlTf = tfProp.getObject(); + if (gmlTf == null) { + continue; + } + TunnelFurniture tf = mapTunnelFurniture(gmlTf); + cdTunnel.addTunnelFurniture(tf); + } + } + + private Installation mapTunnelInstallation(TunnelInstallation gmlTi){ + Installation ti = new Installation(); + ti.setGmlObject(gmlTi); + mapAbstractOccupiedSpace(gmlTi, ti); + GeometryProperty lod2Prop = gmlTi.getDeprecatedProperties().getLod2Geometry(); + parseAndAddAbstractGeometry(lod2Prop, Lod.LOD2, ti); + GeometryProperty lod3Prop = gmlTi.getDeprecatedProperties().getLod3Geometry(); + parseAndAddAbstractGeometry(lod3Prop, Lod.LOD3, ti); + GeometryProperty lod4Prop = gmlTi.getDeprecatedProperties().getLod4Geometry(); + parseAndAddAbstractGeometry(lod4Prop, Lod.LOD4, ti); + ti.unsetGmlGeometries(); + + SurfaceMapper surfaceMapper = new SurfaceMapper(polygonMap, references, vertexMap, config); + for (AbstractSpaceBoundaryProperty surfaceProp : gmlTi.getBoundaries()) { + if (!surfaceProp.isSetObject()) { + continue; + } + AbstractSpaceBoundary surface = surfaceProp.getObject(); + surface.accept(surfaceMapper); + } + for (BoundarySurface bs : surfaceMapper.getSurfaces()) { + ti.addBoundarySurface(bs); + for (Geometry geom : bs.getGeometries()) { + for (Polygon p : geom.getPolygons()) { + p.setPartOfSurface(bs); + p.setPartOfInstallation(ti); + } + } + } + for (Geometry geom : ti.getGeometries()) { + for (Polygon p : geom.getPolygons()) { + p.setPartOfInstallation(ti); + } + } + + return ti; + } + + private TunnelHollow mapTunnelHollow(HollowSpace gmlHo){ + TunnelHollow tHollow = new TunnelHollow(); + tHollow.setGmlObject(gmlHo); + mapAbstractUnoccupiedSpace(gmlHo,tHollow); + + SurfaceMapper surfaceMapper = new SurfaceMapper(polygonMap, references, vertexMap, config); + for (AbstractSpaceBoundaryProperty surfaceProp : gmlHo.getBoundaries()) { + if (!surfaceProp.isSetObject()) { + continue; + } + AbstractSpaceBoundary surface = surfaceProp.getObject(); + surface.accept(surfaceMapper); + } + for (BoundarySurface bs : surfaceMapper.getSurfaces()) { + tHollow.addBoundarySurface(bs); + for (Geometry geom : bs.getGeometries()) { + for (Polygon p : geom.getPolygons()) { + p.setPartOfSurface(bs); + } + } + } + for (TunnelInstallationProperty tiProp : gmlHo.getTunnelInstallations()) { + var gmlTi = tiProp.getObject(); + if (gmlTi == null) { + // ignore empty properties + continue; + } + Installation bi = mapTunnelInstallation(gmlTi); + tHollow.addRoomInstallation(bi); + } + for (TunnelFurnitureProperty tfProp : gmlHo.getTunnelFurniture()){ + var gmlHref = tfProp.getHref(); + if (gmlHref == null) { + continue; + } + tHollow.addFurnitureRef(tfProp); + } + return tHollow; + } + + private TunnelFurniture mapTunnelFurniture(org.citygml4j.core.model.tunnel.TunnelFurniture gmlTf){ + TunnelFurniture tf = new TunnelFurniture(); + tf.setGmlObject(gmlTf); + mapAbstractOccupiedSpace(gmlTf, tf); + tf.unsetGmlGeometries(); + SurfaceMapper surfaceMapper = new SurfaceMapper(polygonMap, references, vertexMap, config); + for (AbstractSpaceBoundaryProperty surfaceProp : gmlTf.getBoundaries()) { + if (!surfaceProp.isSetObject()) { + continue; + } + AbstractSpaceBoundary surface = surfaceProp.getObject(); + surface.accept(surfaceMapper); + } + for (BoundarySurface bs : surfaceMapper.getSurfaces()) { + tf.addBoundarySurface(bs); + for (Geometry geom : bs.getGeometries()) { + for (Polygon p : geom.getPolygons()) { + p.setPartOfSurface(bs); + } + } + } + return tf; + } + private void updatePartOfSurface(BridgeObject bo, SurfaceMapper surfaceMapper) { for (BoundarySurface bs : surfaceMapper.getSurfaces()) { bo.addBoundarySurface(bs); diff --git a/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties b/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties index e66b529ebd0a3b7f27c4c876e194787ca787b954..25e7a38559ac2883cbaccdf0dd018e3a90278127 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties +++ b/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties @@ -47,6 +47,7 @@ MainWindow.languageChange=For the change in language to apply, restart CityDocto MainWindow.buildingsTab=Buildings MainWindow.vegetationTab=Vegetation MainWindow.transportationTab=Transportation +MainWindow.tunnelTab=Tunnels MainWindow.bridgeTab=Bridges MainWindow.waterTab=Water MainWindow.terrainTab=Terrain diff --git a/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties b/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties index 55d093e316caa386c51656f70ee02088cb44981f..5d870f9ea5e7ebb8c728a69c9902d8ede40f922e 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties +++ b/CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties @@ -45,6 +45,7 @@ MainWindow.languageChange=Um die Spracheinstellung zu \u00fcbernehmen muss CityD MainWindow.buildingsTab=Geb\u00e4ude MainWindow.vegetationTab=Vegetation MainWindow.transportationTab=Verkehrsobjekte +MainWindow.tunnelTab=Tunnel MainWindow.bridgeTab=Br\u00fccken MainWindow.waterTab=Gew\u00e4sser MainWindow.terrainTab=Gel\u00e4nde diff --git a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java index 50e773bacebf6e05a207bd157787724725b9e55f..00c42e01d82614d65032368183d59a00eb69c0b6 100644 --- a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java +++ b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java @@ -63,6 +63,7 @@ public class CityDoctorController { private AtomicInteger buildingChunkNr = new AtomicInteger(0); private AtomicInteger vegetationChunkNr = new AtomicInteger(0); private AtomicInteger transportationChunkNr = new AtomicInteger(0); + private AtomicInteger tunnelChunkNr = new AtomicInteger(0); private AtomicInteger bridgeChunkNr = new AtomicInteger(0); private AtomicInteger waterChunkNr = new AtomicInteger(0); private AtomicInteger landChunkNr = new AtomicInteger(0); @@ -159,6 +160,7 @@ public class CityDoctorController { buildingChunkNr.set(0); vegetationChunkNr.set(0); transportationChunkNr.set(0); + tunnelChunkNr.set(0); bridgeChunkNr.set(0); waterChunkNr.set(0); landChunkNr.set(0); @@ -278,6 +280,18 @@ public class CityDoctorController { addMoreButtonIfNecessary(trans, transView, transRoot, transportationChunkNr); } + private void buildTunnel(List tunnels){ + if (tunnels.isEmpty()) { + return; + } + TreeView transView = mainWindow.getTunnelView(); + TreeItem transRoot = new TreeItem<>(new AllTunnelsNode(model.getTunnels())); + transRoot.setExpanded(true); + transView.setRoot(transRoot); + buildTreeFromList(tunnels, transView.getRoot(), tunnelChunkNr); + addMoreButtonIfNecessary(tunnels, transView, transRoot, tunnelChunkNr); + } + private void buildVegetation(List veg) { if (veg.isEmpty()) { return; @@ -853,6 +867,11 @@ public class CityDoctorController { cos = filterFeatures(searchString, model.getTransportation()); chunkCounter = transportationChunkNr; break; + case TUNNEL: + view = mainWindow.getTunnelView(); + cos = model.getTunnels(); + chunkCounter = tunnelChunkNr; + break; case WATER: view = mainWindow.getWaterView(); cos = filterFeatures(searchString, model.getWater()); @@ -930,6 +949,11 @@ public class CityDoctorController { cos = model.getTransportation(); chunkCounter = transportationChunkNr; break; + case TUNNEL: + view = mainWindow.getTunnelView(); + cos = model.getTunnels(); + chunkCounter = tunnelChunkNr; + break; case WATER: view = mainWindow.getWaterView(); cos = model.getWater(); @@ -1045,6 +1069,13 @@ public class CityDoctorController { transportationChunkNr); } + public void fillTreeViewWithErrorTunnel(){ + if (model == null) { + return; + } + fillTreeViewWithErrorCityObjects(mainWindow.getTunnelView(), model.getTunnels(), tunnelChunkNr); + } + public void fillTreeViewWithErrorWater() { if (model == null) { return; diff --git a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java index cf63a8d1a59ae98e9f06c3ed4457f66b40a5b2d8..9d027c7b7d7af618111d92eaa650fd40d6f8f057 100644 --- a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java +++ b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java @@ -95,6 +95,9 @@ public class MainWindow extends Application { @FXML private TreeView transView; + @FXML + private TreeView tunnelView; + @FXML private TreeView bridgeView; @@ -176,6 +179,9 @@ public class MainWindow extends Application { @FXML private Tab transportationTab; + @FXML + private Tab tunnelTab; + @FXML private Tab bridgeTab; @@ -426,6 +432,7 @@ public class MainWindow extends Application { buildingsTab.setText(Localization.getText("MainWindow.buildingsTab")); vegetationTab.setText(Localization.getText("MainWindow.vegetationTab")); transportationTab.setText(Localization.getText("MainWindow.transportationTab")); + tunnelTab.setText(Localization.getText("MainWindow.tunnelTab")); bridgeTab.setText(Localization.getText("MainWindow.bridgeTab")); waterTab.setText(Localization.getText("MainWindow.waterTab")); terrainTab.setText(Localization.getText("MainWindow.terrainTab")); @@ -638,18 +645,21 @@ public class MainWindow extends Application { selectedTab = FeatureType.TRANSPORTATION; break; case 3: - selectedTab = FeatureType.BRIDGE; + selectedTab = FeatureType.TRANSPORTATION; break; case 4: - selectedTab = FeatureType.WATER; + selectedTab = FeatureType.BRIDGE; break; case 5: - selectedTab = FeatureType.LAND; + selectedTab = FeatureType.WATER; break; case 6: - selectedTab = FeatureType.CITY_FURNITURE; + selectedTab = FeatureType.LAND; break; case 7: + selectedTab = FeatureType.CITY_FURNITURE; + break; + case 8: selectedTab = FeatureType.GENERIC_CITY_OBJECT; break; default: @@ -721,6 +731,10 @@ public class MainWindow extends Application { setupSelectListener(transView); transView.setCellFactory(param -> new RenderableTreeCell()); + tunnelView.setShowRoot(true); + setupSelectListener(tunnelView); + tunnelView.setCellFactory(param -> new RenderableTreeCell()); + bridgeView.setShowRoot(true); setupSelectListener(bridgeView); bridgeView.setCellFactory(param -> new RenderableTreeCell()); @@ -868,6 +882,10 @@ public class MainWindow extends Application { return transView; } + public TreeView getTunnelView() { + return tunnelView; + } + public TreeView getBridgeView() { return bridgeView; } @@ -932,6 +950,7 @@ public class MainWindow extends Application { buildingsView.getSelectionModel().clearSelection(); vegetationView.getSelectionModel().clearSelection(); transView.getSelectionModel().clearSelection(); + tunnelView.getSelectionModel().clearSelection(); waterView.getSelectionModel().clearSelection(); terrainView.getSelectionModel().clearSelection(); cityFurnitureView.getSelectionModel().clearSelection(); diff --git a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/AllFurnitureNode.java b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/AllFurnitureNode.java index 219d48603d1e0a532aec2b17fcaabac74943529f..435f1c3b23fe734021cbe0f4e15a98bb8307c065 100644 --- a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/AllFurnitureNode.java +++ b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/AllFurnitureNode.java @@ -16,7 +16,7 @@ public class AllFurnitureNode extends Renderable{ @Override public String getText() { - return "Building Furniture"; + return "Furniture"; } @Override diff --git a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/MainWindow.fxml b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/MainWindow.fxml index d25775af12135957f551dc1b1247ce2a9f398927..93989d0d6b14332ad1af8aa806b23ccc77616b84 100644 --- a/CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/MainWindow.fxml +++ b/CityDoctorParent/Extensions/CityDoctorGUI/src/main/resources/de/hft/stuttgart/citydoctor2/gui/MainWindow.fxml @@ -73,6 +73,11 @@ + + + + +