Commit 4841f1f1 authored by Eric Duminil's avatar Eric Duminil
Browse files

RegionChooser: Removing old code.

parent 5a859766
...@@ -184,11 +184,6 @@ private File selectSaveFileWithDialog(String project, String citygml, String suf ...@@ -184,11 +184,6 @@ private File selectSaveFileWithDialog(String project, String citygml, String suf
return fileChooser.showSaveDialog(mainStage); return fileChooser.showSaveDialog(mainStage);
} }
public boolean checkIfCityGMLSAreAvailable(String project, String citygml) {
Path p = citygmlPath(project, citygml);
return Files.isReadable(p);
}
public void log(String text) { public void log(String text) {
System.out.println(text); System.out.println(text);
} }
......
...@@ -19,10 +19,9 @@ public class RegionChooserFX extends Application ...@@ -19,10 +19,9 @@ public class RegionChooserFX extends Application
* This application is basically just a scene and a browser for the RegionChooser website (HTML + Javascript frontend * This application is basically just a scene and a browser for the RegionChooser website (HTML + Javascript frontend
* + Java backend). The Java part is written in RegionChooserBrowser. * + Java backend). The Java part is written in RegionChooserBrowser.
*/ */
//TODO: Add version, just like for SimStadt
@Override @Override
public void start(Stage stage) { public void start(Stage stage) {
stage.setTitle("RegionChooserJavaFX"); stage.setTitle("RegionChooser " + applicationVersion());
scene = new Scene(new RegionChooserBrowser(), 1024, 900, Color.web("#666970")); scene = new Scene(new RegionChooserBrowser(), 1024, 900, Color.web("#666970"));
stage.setScene(scene); stage.setScene(scene);
stage.show(); stage.show();
...@@ -31,5 +30,15 @@ public void start(Stage stage) { ...@@ -31,5 +30,15 @@ public void start(Stage stage) {
public static void main(String[] args) { public static void main(String[] args) {
launch(args); launch(args);
} }
private String applicationVersion() {
Package simstadtJar = RegionChooserFX.class.getPackage();
String implementationVersion = simstadtJar.getImplementationVersion();
if (implementationVersion != null) {
return implementationVersion;
} else {
return "development version";
}
}
} }
...@@ -86,7 +86,6 @@ var regionChooser = (function(){ ...@@ -86,7 +86,6 @@ var regionChooser = (function(){
feature["geoJSON"] = geoJsonFormat.writeFeatureObject(feature); feature["geoJSON"] = geoJsonFormat.writeFeatureObject(feature);
feature["area"] = feature.getGeometry().getArea(); feature["area"] = feature.getGeometry().getArea();
feature["description"] = "novaFACTORY>" + name; feature["description"] = "novaFACTORY>" + name;
feature["available"] = true;
feature["source"] = "NovaFACTORY"; feature["source"] = "NovaFACTORY";
novafactory_vectors.addFeature(feature); novafactory_vectors.addFeature(feature);
...@@ -121,11 +120,6 @@ var regionChooser = (function(){ ...@@ -121,11 +120,6 @@ var regionChooser = (function(){
var name = feature.get("name"); var name = feature.get("name");
feature["description"] = project + ">" + name; feature["description"] = project + ">" + name;
feature["source"] = "CityGML"; feature["source"] = "CityGML";
var citygmlHere;
if (fromJavaFX) {
citygmlHere = fxapp.checkIfCityGMLSAreAvailable(project, name);
}
feature["available"] = citygmlHere;
}); });
} }
...@@ -206,10 +200,9 @@ var regionChooser = (function(){ ...@@ -206,10 +200,9 @@ var regionChooser = (function(){
intersections.addFeature(intersection); intersections.addFeature(intersection);
var description; var description;
if (feature["available"]) { if (fromJavaFX) {
description = "<a href=\"#\" onclick=\"regionChooser.downloadRegionFrom" + feature["source"] + "(" + i description = "<a href=\"#\" onclick=\"regionChooser.downloadRegionFrom" + feature["source"] + "(" + i
+ ");return false;\">" + feature["description"] + "</a>"; + ");return false;\">" + feature["description"] + "</a>";
// console.log(description);
} else { } else {
description = feature['description']; description = feature['description'];
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment