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
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) {
System.out.println(text);
}
......
......@@ -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
* + Java backend). The Java part is written in RegionChooserBrowser.
*/
//TODO: Add version, just like for SimStadt
@Override
public void start(Stage stage) {
stage.setTitle("RegionChooserJavaFX");
stage.setTitle("RegionChooser " + applicationVersion());
scene = new Scene(new RegionChooserBrowser(), 1024, 900, Color.web("#666970"));
stage.setScene(scene);
stage.show();
......@@ -31,5 +30,15 @@ public void start(Stage stage) {
public static void main(String[] 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(){
feature["geoJSON"] = geoJsonFormat.writeFeatureObject(feature);
feature["area"] = feature.getGeometry().getArea();
feature["description"] = "novaFACTORY>" + name;
feature["available"] = true;
feature["source"] = "NovaFACTORY";
novafactory_vectors.addFeature(feature);
......@@ -121,11 +120,6 @@ var regionChooser = (function(){
var name = feature.get("name");
feature["description"] = project + ">" + name;
feature["source"] = "CityGML";
var citygmlHere;
if (fromJavaFX) {
citygmlHere = fxapp.checkIfCityGMLSAreAvailable(project, name);
}
feature["available"] = citygmlHere;
});
}
......@@ -206,10 +200,9 @@ var regionChooser = (function(){
intersections.addFeature(intersection);
var description;
if (feature["available"]) {
if (fromJavaFX) {
description = "<a href=\"#\" onclick=\"regionChooser.downloadRegionFrom" + feature["source"] + "(" + i
+ ");return false;\">" + feature["description"] + "</a>";
// console.log(description);
} else {
description = feature['description'];
}
......
Markdown is supported
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