[PATCH 14 of 17] Replaced hard coded rivers with rivers loaded from module service
Wald Commits
scm-commit at wald.intevation.org
Thu Feb 27 16:48:00 CET 2014
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1393515707 -3600
# Node ID 4d74d09228f0c2527a5a39c31979b8b7b30f94d3
# Parent 2a97d9c3413a84a68b94a315b7f5eeda9f645f00
Replaced hard coded rivers with rivers loaded from module service.
diff -r 2a97d9c3413a -r 4d74d09228f0 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ModuleSelection.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ModuleSelection.java Thu Feb 27 16:40:33 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ModuleSelection.java Thu Feb 27 16:41:47 2014 +0100
@@ -73,26 +73,7 @@
rivers = null;
//TODO: put all the rivers into a config file, or something.
fixRivers = new ArrayList<String>();
- fixRivers.add("Rhein");
- fixRivers.add("Elbe");
- fixRivers.add("Donau");
- fixRivers.add("Fulda (Sommer)");
- fixRivers.add("Havel");
- fixRivers.add("Lahn");
- fixRivers.add("Main");
- fixRivers.add("Mosel");
- fixRivers.add("Neckar");
- fixRivers.add("Oder");
- fixRivers.add("Saale");
- fixRivers.add("Saar");
- fixRivers.add("Saar (Wiltinger Bogen)");
- fixRivers.add("Werra (Sommer)");
- fixRivers.add("Weser");
-
minfoRivers = new ArrayList<String>();
- minfoRivers.add("Elbe");
- minfoRivers.add("Rhein");
- minfoRivers.add("Oder");
readModules();
}
@@ -152,7 +133,16 @@
GWT.log("Module " + module.getName() + " is selected.");
if (radio != null) {
radio.setDefaultValue(module.getName());
- GWT.log("Setting " + module.getName() + " as selected.");
+ }
+ }
+ if (module.getName().equals("fixanalysis")) {
+ for (String river: module.getRivers()) {
+ fixRivers.add(river);
+ }
+ }
+ if (module.getName().equals("minfo")) {
+ for (String river: module.getRivers()) {
+ minfoRivers.add(river);
}
}
}
@@ -242,7 +232,6 @@
}-*/;
private static String getSelectedModule() {
- GWT.log("selected: " + radio.getValueAsString());
return radio.getValueAsString();
}
}
More information about the Dive4elements-commits
mailing list