From 2eb7a48c15a23cbc0d575b2bd30e56e60707ffd3 Mon Sep 17 00:00:00 2001 From: duminil Date: Mon, 1 Jun 2015 13:57:21 +0000 Subject: [PATCH] RegionChooser: Cleaning up --- .../ExportJobFromJavaFXRegionChooser.java | 2 +- .../regionchooser/RegionChooserFX.java | 9 ++-- website/index.html | 50 +++++++++---------- website/script/simstadt_openlayers.js | 1 - website/style/style.css | 10 +++- 5 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java b/src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java index 26b2f03..614d356 100644 --- a/src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java +++ b/src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java @@ -70,7 +70,7 @@ public void processJob(Geometry poly, String productName, JSObject novaFactoryOp @Override public void jobStatusChanged(JobStatusEvent event) { JobStatus status = (JobStatus) event.getSource(); - System.out.println(status); + // System.out.println(status); if (status == JobStatus.LOCAL) { novaFactoryOpenLayer.call("updateStatus", "REQUEST HAS BEEN PREPARED"); } else if (status == JobStatus.SENT) { diff --git a/src/eu/simstadt/regionchooser/RegionChooserFX.java b/src/eu/simstadt/regionchooser/RegionChooserFX.java index 1210534..e63647f 100644 --- a/src/eu/simstadt/regionchooser/RegionChooserFX.java +++ b/src/eu/simstadt/regionchooser/RegionChooserFX.java @@ -97,13 +97,16 @@ protected Integer call() throws Exception { public void extractZIPtoGML(String zipFilename) throws IOException { ZipFile zipFile = new ZipFile(zipFilename); Enumeration entries = zipFile.entries(); + String userName = System.getProperty("user.name"); while (entries.hasMoreElements()) { ZipEntry ze = entries.nextElement(); - if (ze.getName().toLowerCase().contains("gml")) { - File extractedCityGML = selectSaveFileWithDialog(null, ze.getName(), ""); + String zeName = ze.getName(); + if (zeName.toLowerCase().contains("gml")) { + File extractedCityGML = selectSaveFileWithDialog(null, + zeName.replace("_GML.", ".").replace(userName, "novaFACTORY"), ""); if (extractedCityGML != null) { InputStream cityGMLInputStream = zipFile.getInputStream(ze); - System.out.println("Extract zipFile " + zipFilename + " to " + extractedCityGML); + // System.out.println("Extract zipFile " + zipFilename + " to " + extractedCityGML); FileOutputStream fos = new FileOutputStream(extractedCityGML); byte[] bytes = new byte[1024]; int length; diff --git a/website/index.html b/website/index.html index 09c3e7f..f6a866e 100644 --- a/website/index.html +++ b/website/index.html @@ -1,13 +1,13 @@ - - - Simstadt Region Chooser - - - - - + + + Simstadt Region Chooser + + + + + - + - -
-
- -
-
-
- + +
+
+
+
+
+ + diff --git a/website/script/simstadt_openlayers.js b/website/script/simstadt_openlayers.js index 8898363..88ec099 100644 --- a/website/script/simstadt_openlayers.js +++ b/website/script/simstadt_openlayers.js @@ -1,6 +1,5 @@ //TODO: Add zoom to extent as control //TODO: Try to leave everything in 4326 -//TODO: Add some tiles for offline mode var reset_btn = $('#reset')[0]; var dataPanel = $('#dataPanel'); diff --git a/website/style/style.css b/website/style/style.css index 112fb24..eb29fbc 100644 --- a/website/style/style.css +++ b/website/style/style.css @@ -19,8 +19,9 @@ div#header{ div#map{ width:70%; - height:70%; + height:80%; float:left; + outline: 0; } div#side{ width:30%; @@ -29,9 +30,14 @@ div#side{ div#dataPanel{ width:90%; - height:50%; + height:80%; overflow:auto; border:2px solid #DDDDDD; + font-family: Consolas,monaco,monospace; + font-size: 12px; + box-sizing:border-box; + -moz-box-sizing:border-box; + -webkit-box-sizing:border-box; } div#side input{ width:90%; -- GitLab