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
3dba0e5e
Commit
3dba0e5e
authored
5 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Add focusing function to polygon context menu
parent
b17c191c
master
dev
dev_cpp_code_conversion
dev_gui_features
dev_gui_features_zip_loading
dev_visitor_rework
3.17.1
3.17.0
archive/dev_gui_features_zip_loading
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
+1
-0
...odel/src/main/resources/CityDoctorLocalization.properties
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties
+1
-0
...l/src/main/resources/CityDoctorLocalization_de.properties
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java
+42
-1
...ain/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/VertexClickHandler.java
+14
-1
.../de/hft/stuttgart/citydoctor2/gui/VertexClickHandler.java
with
58 additions
and
2 deletions
+58
-2
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
+
1
-
0
View file @
3dba0e5e
...
...
@@ -73,6 +73,7 @@ MainWindow.verticesTab=Vertices
MainWindow.attributeTab
=
Attributes
MainWindow.logTab
=
Log
MainWindow.globalErrorsTab
=
Global Errors
MainWindow.focusCityObject
=
Focus object
OpenFileDialog.fileLabel
=
File:
OpenFileDialog.selectBtn
=
Select
OpenFileDialog.loadBtn
=
Load
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization_de.properties
+
1
-
0
View file @
3dba0e5e
...
...
@@ -71,6 +71,7 @@ MainWindow.verticesTab=Punkte
MainWindow.attributeTab
=
Attribute
MainWindow.logTab
=
Log
MainWindow.globalErrorsTab
=
Globale Fehler
MainWindow.focusCityObject
=
Objekt fokussieren
OpenFileDialog.fileLabel
=
Datei:
OpenFileDialog.selectBtn
=
Ausw
\u
00e4hlen
OpenFileDialog.loadBtn
=
Laden
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/MainWindow.java
+
42
-
1
View file @
3dba0e5e
...
...
@@ -3,6 +3,7 @@ package de.hft.stuttgart.citydoctor2.gui;
import
de.hft.stuttgart.citydoctor2.CityDoctorValidation
;
import
de.hft.stuttgart.citydoctor2.check.ValidationConfiguration
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundingBox
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.FeatureType
;
import
de.hft.stuttgart.citydoctor2.gui.logger.GuiLogger
;
import
de.hft.stuttgart.citydoctor2.gui.tree.FeatureNode
;
...
...
@@ -300,7 +301,7 @@ public class MainWindow extends Application {
BorderPane
bp
=
loader
.
load
();
highlightController
=
new
HighlightController
(
world
);
renderer
=
new
Renderer
(
this
,
highlightController
);
clickHandler
=
new
VertexClickHandler
(
errorView
,
renderer
,
stage
);
clickHandler
=
new
VertexClickHandler
(
errorView
,
renderer
,
stage
,
this
);
controller
=
new
CityDoctorController
(
this
,
highlightController
,
renderer
);
mainToolBar
=
new
MainToolBar
(
stage
,
controller
,
featurePane
,
renderer
,
this
);
viewPane
.
getChildren
().
add
(
mainToolBar
.
getToolBar
());
...
...
@@ -1145,6 +1146,46 @@ public class MainWindow extends Application {
controller
.
setOriginBB
(
b
);
}
public
void
showCityObjectDetail
(
CityObject
co
)
{
FeatureType
coType
=
co
.
getFeatureType
();
TreeView
<
Renderable
>
featureView
;
Tab
featureTab
;
if
(
coType
==
FeatureType
.
BUILDING
){
featureView
=
buildingsView
;
featureTab
=
buildingsTab
;
}
else
if
(
coType
==
FeatureType
.
VEGETATION
){
featureView
=
vegetationView
;
featureTab
=
vegetationTab
;
}
else
if
(
coType
==
FeatureType
.
TRANSPORTATION
){
featureView
=
transView
;
featureTab
=
transportationTab
;
}
else
if
(
coType
==
FeatureType
.
TUNNEL
){
featureView
=
tunnelView
;
featureTab
=
tunnelTab
;
}
else
if
(
coType
==
FeatureType
.
BRIDGE
){
featureView
=
bridgeView
;
featureTab
=
bridgeTab
;
}
else
if
(
coType
==
FeatureType
.
WATER
){
featureView
=
waterView
;
featureTab
=
waterTab
;
}
else
if
(
coType
==
FeatureType
.
LAND
){
featureView
=
terrainView
;
featureTab
=
terrainTab
;
}
else
if
(
coType
==
FeatureType
.
CITY_FURNITURE
){
featureView
=
cityFurnitureView
;
featureTab
=
cityFurnitureTab
;
}
else
if
(
coType
==
FeatureType
.
GENERIC_CITY_OBJECT
){
featureView
=
otherObjectsView
;
featureTab
=
otherObjectsTab
;
}
else
{
throw
new
IllegalArgumentException
(
"unknown feature type: "
+
coType
);
}
featurePane
.
getSelectionModel
().
select
(
featureTab
);
searchField
.
setText
(
co
.
getGmlId
().
getGmlString
());
searchBtn
.
fire
();
renderer
.
render
(
co
);
}
public
MainToolBar
getMainToolbar
()
{
return
mainToolBar
;
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/VertexClickHandler.java
+
14
-
1
View file @
3dba0e5e
...
...
@@ -25,12 +25,14 @@ public class VertexClickHandler implements ClickHandler {
private
TreeView
<
Renderable
>
errorView
;
private
Renderer
renderer
;
private
Stage
stage
;
private
MainWindow
mainWindow
;
private
ParserConfiguration
config
;
public
VertexClickHandler
(
TreeView
<
Renderable
>
errorView
,
Renderer
renderer
,
Stage
stage
)
{
public
VertexClickHandler
(
TreeView
<
Renderable
>
errorView
,
Renderer
renderer
,
Stage
stage
,
MainWindow
mainWindow
)
{
this
.
errorView
=
errorView
;
this
.
renderer
=
renderer
;
this
.
stage
=
stage
;
this
.
mainWindow
=
mainWindow
;
}
public
void
setConfig
(
ParserConfiguration
config
)
{
...
...
@@ -58,6 +60,17 @@ public class VertexClickHandler implements ClickHandler {
clipboard
.
setContent
(
content
);
});
cMenu
.
getItems
().
add
(
clipMi
);
MenuItem
detailMi
=
new
MenuItem
(
Localization
.
getText
(
"MainWindow.focusCityObject"
));
detailMi
.
setOnAction
(
ea
->
{
CityObject
parent
=
p
.
getParent
().
getParent
();
if
(
parent
instanceof
BoundarySurface
bs
)
{
parent
=
bs
.
getParent
();
}
mainWindow
.
showCityObjectDetail
(
parent
);
});
cMenu
.
getItems
().
add
(
detailMi
);
cMenu
.
show
(
stage
,
me
.
getScreenX
(),
me
.
getScreenY
());
}
}
...
...
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