annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java @ 9072:02739b8c010d

bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
author gernotbelger
date Wed, 16 May 2018 17:43:47 +0200
parents 5e38e2924c07
children 850ce16034e9
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.client.ui.fixation;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
11 import java.util.Date;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
12 import java.util.HashMap;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
13
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
14 import org.dive4elements.river.client.client.Config;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
15 import org.dive4elements.river.client.client.FLYSConstants;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
16 import org.dive4elements.river.client.client.services.FixingsOverviewService;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
17 import org.dive4elements.river.client.client.services.FixingsOverviewServiceAsync;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
18 import org.dive4elements.river.client.client.ui.AbstractUIProvider;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
19 import org.dive4elements.river.client.shared.MapUtils;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
20 import org.dive4elements.river.client.shared.model.AbstractFixBunduArtifact;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
21 import org.dive4elements.river.client.shared.model.Data;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
22 import org.dive4elements.river.client.shared.model.DataList;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
23 import org.dive4elements.river.client.shared.model.FixFilter;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
24 import org.dive4elements.river.client.shared.model.FixingsOverviewInfo;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
25
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 import com.google.gwt.core.client.GWT;
3366
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
27 import com.google.gwt.i18n.client.DateTimeFormat;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
28 import com.google.gwt.i18n.client.NumberFormat;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
29 import com.google.gwt.json.client.JSONNumber;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
30 import com.google.gwt.json.client.JSONObject;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
31 import com.google.gwt.json.client.JSONString;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 import com.google.gwt.user.client.rpc.AsyncCallback;
3366
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
33 import com.smartgwt.client.types.Alignment;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 import com.smartgwt.client.util.SC;
3366
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
35 import com.smartgwt.client.widgets.Button;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 import com.smartgwt.client.widgets.Canvas;
3366
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
37 import com.smartgwt.client.widgets.HTMLPane;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
38 import com.smartgwt.client.widgets.Img;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
39 import com.smartgwt.client.widgets.events.ClickEvent;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
40 import com.smartgwt.client.widgets.events.ClickHandler;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
41 import com.smartgwt.client.widgets.events.ResizedEvent;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
42 import com.smartgwt.client.widgets.events.ResizedHandler;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 import com.smartgwt.client.widgets.form.DynamicForm;
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
44 import com.smartgwt.client.widgets.form.fields.TextItem;
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
45 import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
3366
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
46 import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
47 import com.smartgwt.client.widgets.layout.HLayout;
8bedd1fcaeee Removed trailing whitespace. Import cleanup
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3362
diff changeset
48 import com.smartgwt.client.widgets.layout.VLayout;
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
49 import com.smartgwt.client.widgets.tab.Tab;
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
50 import com.smartgwt.client.widgets.tab.TabSet;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 /**
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 * This UIProvider creates helper panel for fixation analysis without input
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 * elements.
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 *
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 */
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
58 public abstract class FixationPanel extends AbstractUIProvider implements ResizedHandler {
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
59 private static final long serialVersionUID = -3667553404493415619L;
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
60
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
61 protected static HashMap<String, FixationPanel> instances = new HashMap<String, FixationPanel>();
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 /** The message class that provides i18n strings. */
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 protected FLYSConstants MESSAGES = GWT.create(FLYSConstants.class);
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
66 protected FixingsOverviewServiceAsync overviewService = GWT.create(FixingsOverviewService.class);
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67
3861
16840d849298 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3366
diff changeset
68 protected String htmlOverview;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 protected FixingsOverviewInfo fixInfo;
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
70 protected TabSet tabs;
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
71 protected Tab events;
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
72 protected Tab chart;
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
73 protected VLayout chartContainer;
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
74 protected Img chartImg;
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
75 protected TextItem kmText;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
77 public static final DateTimeFormat DTF = DateTimeFormat.getFormat("dd.MM.yyyy");
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
78
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 public FixationPanel() {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
80 this.chartImg = new Img();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
81 this.htmlOverview = "";
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
82 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
83
3861
16840d849298 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3366
diff changeset
84 /** Get the (master) artifact UUID. */
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 protected String getArtifactUuid() {
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
86 return this.artifact.getUuid();
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
87 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
88
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 protected void init() {
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
90 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
91
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
92 @Override
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
93 public Data[] getData() {
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
94 return null;
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
95 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
96
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
97 @Override
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
98 public Canvas create(final DataList list) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
99 final VLayout layout = new VLayout();
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
100
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
101 final Canvas helper = createHelper();
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
102 this.helperContainer.addMember(helper);
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
103
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
104 final Canvas submit = getNextButton();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
105 final Canvas widget = createWidget(list);
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
106
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
107 layout.addMember(widget);
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
108 layout.addMember(submit);
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
109 return layout;
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
110 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
111
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
112 @Override
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
113 public Canvas createOld(final DataList list) {
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
114 return new DynamicForm();
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
115 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
116
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
117 protected Canvas createHelper() {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
118 final Config config = Config.getInstance();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
119 final String locale = config.getLocale();
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
120
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
121 this.tabs = new TabSet();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
122 this.events = new Tab(this.MESSAGES.events());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
123 this.chart = new Tab(this.MESSAGES.kmchart());
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
124
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
125 this.chartContainer = new VLayout();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
126 final Canvas scroll = createChartHelper();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
127
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
128 final VLayout layout = new VLayout();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
129 layout.addResizedHandler(this);
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
130 layout.addMember(this.chartContainer);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
131 layout.addMember(scroll);
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
132 layout.setAlign(Alignment.CENTER);
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
133 this.chart.setPane(layout);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
134
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
135 final HTMLPane eventPane = new HTMLPane();
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
136
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
137 final String river = this.artifact.getArtifactDescription().getRiver();
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
138 createCallback();
2914
7d69e570e79b FixA: Set discharge sectors 0 and 3 as default in UI.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2901
diff changeset
139
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
140 final String callBack = "fixationCallback(this.checked, this.name)";
2884
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
141
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
142 if (this.artifact instanceof AbstractFixBunduArtifact == false)
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
143 return this.chartContainer;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
144
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
145 final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) this.artifact;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
146
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
147 this.overviewService.generateOverview(locale, this.artifact.getUuid(), MapUtils.toJavaEncodedString(getOverviewFilter(art.getFilter())),
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
148 renderCheckboxes(), callBack, new AsyncCallback<FixingsOverviewInfo>() {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
149 @Override
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
150 public void onFailure(final Throwable caught) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
151 GWT.log("Could not receive overview.");
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
152 SC.warn(caught.getMessage());
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
153 }
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
154
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
155 @Override
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
156 public void onSuccess(final FixingsOverviewInfo info) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
157 GWT.log("Successfully loaded overview.");
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
158 FixationPanel.this.fixInfo = info;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
159 FixationPanel.this.htmlOverview = info.getHTML();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
160 final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) FixationPanel.this.artifact;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
161 final FixFilter filter = art.getFilter();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
162 filter.setRiver(info.getRiver());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
163 if (filter.getCurrentKm() == -Double.MAX_VALUE || filter.getCurrentKm() == -1d) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
164 filter.setCurrentKm(info.getFrom());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
165 filter.setToKm(info.getTo());
3362
bea50e45f0d3 FixA: Input fields for chart navigation now use the correct i18n number formats.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2963
diff changeset
166 }
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
167 if (FixationPanel.this.kmText != null) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
168 final NumberFormat nf = NumberFormat.getDecimalFormat();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
169 try {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
170 final double d = Double.valueOf(filter.getCurrentKm());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
171 FixationPanel.this.kmText.setValue(nf.format(d));
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
172 }
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
173 catch (final NumberFormatException e) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
174 FixationPanel.this.kmText.setValue(filter.getCurrentKm());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
175 }
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
176 }
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
177 eventPane.setContents(FixationPanel.this.htmlOverview);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
178 updateChartTab(FixationPanel.this.fixInfo.getFrom());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
179 FixationPanel.this.events.setPane(eventPane);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
180 success();
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
181 }
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
182 });
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
183
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
184 this.tabs.addTab(this.events);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
185 this.tabs.addTab(this.chart);
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
186
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
187 return this.tabs;
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
188 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
189
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
190 protected Canvas createChartHelper() {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
191 final DynamicForm form = new DynamicForm();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
192 final Button lower = new Button("<<");
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
193 lower.setWidth(30);
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
194 final Button upper = new Button(">>");
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
195 upper.setWidth(30);
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
196 this.kmText = new TextItem();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
197 this.kmText.setWidth(60);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
198 this.kmText.setShowTitle(false);
3362
bea50e45f0d3 FixA: Input fields for chart navigation now use the correct i18n number formats.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2963
diff changeset
199
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
200 form.setFields(this.kmText);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
201 form.setWidth(60);
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
202 lower.addClickHandler(new ClickHandler() {
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
203 @Override
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
204 public void onClick(final ClickEvent ce) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
205 final FixFilter filter = updateChartTabLow();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
206 final NumberFormat nf = NumberFormat.getDecimalFormat();
3362
bea50e45f0d3 FixA: Input fields for chart navigation now use the correct i18n number formats.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2963
diff changeset
207 try {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
208 final double d = Double.valueOf(filter.getCurrentKm());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
209 FixationPanel.this.kmText.setValue(nf.format(d));
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
210 }
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
211 catch (final NumberFormatException e) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
212 FixationPanel.this.kmText.setValue(filter.getCurrentKm());
3362
bea50e45f0d3 FixA: Input fields for chart navigation now use the correct i18n number formats.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2963
diff changeset
213 }
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
214 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
215 });
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
216
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
217 upper.addClickHandler(new ClickHandler() {
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
218 @Override
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
219 public void onClick(final ClickEvent ce) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
220 final FixFilter filter = updateChartTabUp();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
221 final NumberFormat nf = NumberFormat.getDecimalFormat();
3362
bea50e45f0d3 FixA: Input fields for chart navigation now use the correct i18n number formats.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2963
diff changeset
222 try {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
223 final double d = Double.valueOf(filter.getCurrentKm());
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
224 FixationPanel.this.kmText.setValue(nf.format(d));
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
225 }
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
226 catch (final NumberFormatException e) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
227 FixationPanel.this.kmText.setValue(filter.getCurrentKm());
3362
bea50e45f0d3 FixA: Input fields for chart navigation now use the correct i18n number formats.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2963
diff changeset
228 }
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
229 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
230 });
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
231
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
232 this.kmText.addChangedHandler(new ChangedHandler() {
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
233 @Override
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
234 public void onChanged(final ChangedEvent ce) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
235 // TODO: get current value.
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
236 if (ce.getItem().getValue() != null) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
237 final NumberFormat nf = NumberFormat.getDecimalFormat();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
238 try {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
239 final double d = nf.parse(ce.getItem().getValue().toString());
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
240 updateChartTab(d);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
241 }
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
242 catch (final NumberFormatException nfe) {
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
243 // Do nothing.
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
244 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
245 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
246 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
247 });
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
248
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
249 final HLayout layout = new HLayout();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
250 layout.setAlign(Alignment.CENTER);
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
251
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
252 layout.addMember(lower);
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
253 layout.addMember(form);
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
254 layout.addMember(upper);
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
255 return layout;
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
256 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
257
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
258 protected void updateChartTab(double km) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
259 final Config config = Config.getInstance();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
260 final String locale = config.getLocale();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
261
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
262 final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) this.artifact;
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
263
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
264 if (this.fixInfo != null) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
265 if (km < this.fixInfo.getFrom())
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
266 km = this.fixInfo.getFrom();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
267 if (km > this.fixInfo.getTo())
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
268 km = this.fixInfo.getTo();
2884
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
269 }
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
270
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
271 final FixFilter filter = art.getFilter();
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
272
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
273 if (km < filter.getFromKm())
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
274 km = filter.getFromKm();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
275 if (km > filter.getToKm())
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
276 km = filter.getToKm();
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
277
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
278 filter.setCurrentKm(km);
2901
2fdeb239bbd2 Changed helper chart size in Fix analysis to avoid overlapping in maximized project window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2899
diff changeset
279
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
280 int hWidth = this.helperContainer.getWidth() - 12;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
281 int hHeight = this.helperContainer.getHeight() - 62;
2901
2fdeb239bbd2 Changed helper chart size in Fix analysis to avoid overlapping in maximized project window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2899
diff changeset
282
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
283 if ((int) (hHeight * 4f / 3) < hWidth) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
284 hWidth = (int) (hHeight * 4f / 3);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
285 } else {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
286 hHeight = (int) (hWidth * 3f / 4);
2901
2fdeb239bbd2 Changed helper chart size in Fix analysis to avoid overlapping in maximized project window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2899
diff changeset
287 }
2fdeb239bbd2 Changed helper chart size in Fix analysis to avoid overlapping in maximized project window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2899
diff changeset
288
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
289 String imgUrl = GWT.getModuleBaseURL();
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
290 imgUrl += "fixings-km-chart";
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
291 imgUrl += "?locale=" + locale;
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
292 imgUrl += "&filter=" + getChartFilter(filter, hWidth, hHeight);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
293
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
294 if (this.chartContainer.hasMember(this.chartImg)) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
295 this.chartImg.setWidth(hWidth);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
296 this.chartImg.setHeight(hHeight);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
297 this.chartImg.setSrc(imgUrl);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
298 } else {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
299 this.chartImg = new Img(imgUrl, hWidth, hHeight);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
300 this.chartContainer.addMember(this.chartImg);
2922
71db63f67d31 FixA: Do not throw layout away if only the km chart needs reloading.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2917
diff changeset
301 }
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
302 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
303
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
304 protected FixFilter updateChartTabLow() {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
305 final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) this.artifact;
2884
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
306
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
307 final FixFilter filter = art.getFilter();
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
308
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
309 final double curr = filter.getCurrentKm();
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
310 if (curr > filter.getFromKm()) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
311 final double newVal = (curr - 0.1) * 10;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
312 final long round = Math.round(newVal);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
313 updateChartTab(((double) round) / 10);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
314 }
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
315 return filter;
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
316 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
317
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
318 protected FixFilter updateChartTabUp() {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
319 final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) this.artifact;
2884
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
320
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
321 final FixFilter filter = art.getFilter();
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
322
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
323 final double curr = filter.getCurrentKm();
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
324 if (curr < filter.getToKm()) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
325 final double newVal = (curr + 0.1) * 10;
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
326 final long round = Math.round(newVal);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
327 updateChartTab(((double) round) / 10);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
328 }
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
329 return filter;
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
330 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
331
4568
bbd82bd8e541 flys-client: Cosmetics and warnings.
Christian Lins <christian.lins@intevation.de>
parents: 4148
diff changeset
332 @Override
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
333 public void onResized(final ResizedEvent re) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
334 final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) this.artifact;
2884
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
335
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
336 updateChartTab(art.getFilter().getCurrentKm());
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
337 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
338
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
339 private native void createCallback() /*-{
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
340 $wnd.fixationCallback = @org.dive4elements.river.client.client.ui.fixation.FixationPanel::helperCallback(ZLjava/lang/String;);
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
341 }-*/;
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
342
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
343 private static void helperCallback(final boolean checked, final String name) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
344 final String[] parts = name.split(":");
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
345 final String uuid = parts[0];
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
346 final String cid = parts[1];
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
347
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
348 final FixationPanel p = FixationPanel.getInstance(uuid);
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
349 if (p != null) {
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
350 p.setValues(cid, checked);
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
351 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
352 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
353
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
354 private static FixationPanel getInstance(final String uuid) {
2923
43e0f6d96206 FixA: Make the km chart helper panel more useful.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2922
diff changeset
355 return instances.get(uuid);
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
356 }
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
357
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
358 public abstract Canvas createWidget(DataList data);
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
359
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
360 public abstract void setValues(String cid, boolean checked);
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
361
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
362 public abstract boolean renderCheckboxes();
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
363
2537
cc5969df0490 New methods in UI providers for fixings states and minor protocol changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2526
diff changeset
364 public abstract void success();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
365
5334
b296d435fc69 Doc and whitespace fixes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4568
diff changeset
366 /** Creates JSON string from filter. */
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
367 public static String getOverviewFilter(final FixFilter filter) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
368 final String river = filter.getRiver();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
369
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
370 if (river != null && river.length() > 0) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
371 final JSONObject jfix = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
372 final JSONObject jfilter = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
373 final JSONObject jrName = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
374 final JSONString jrValue = new JSONString(river);
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
375 jrName.put("name", jrValue);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
376 jfilter.put("river", jrName);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
377 jfix.put("fixings", createFilter(filter, jfilter));
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
378 return jfix.toString();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
379 }
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
380 return "";
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
381 }
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
382
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
383 public String getChartFilter(final FixFilter filter, final int width, final int height) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
384 final String river = filter.getRiver();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
385 final double currentKm = filter.getCurrentKm();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
386 final double fromKm = filter.getFromKm();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
387 final double toKm = filter.getToKm();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
388
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
389 if (river != null && river.length() > 0 && currentKm >= fromKm && currentKm <= toKm) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
390 final JSONObject jfix = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
391 final JSONObject jfilter = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
392 final JSONObject jrName = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
393 final JSONString jrValue = new JSONString(river);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
394 final JSONObject jkm = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
395 final JSONNumber jkmValue = new JSONNumber(currentKm);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
396 final JSONObject jextent = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
397 final JSONNumber jwidth = new JSONNumber(width);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
398 final JSONNumber jheight = new JSONNumber(height);
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
399
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
400 jkm.put("value", jkmValue);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
401 jrName.put("name", jrValue);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
402 jfilter.put("river", jrName);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
403 jfilter.put("km", jkm);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
404 jextent.put("width", jwidth);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
405 jextent.put("height", jheight);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
406 jfilter.put("extent", jextent);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
407 jfix.put("fixings", createFilter(filter, jfilter));
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
408 return jfix.toString();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
409 }
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
410 return "";
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
411 }
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
412
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
413 protected static JSONObject createFilter(final FixFilter filter, final JSONObject root) {
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
414 final double fromKm = filter.getFromKm();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
415 final double toKm = filter.getToKm();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
416 final boolean hasDate = filter.hasDate();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
417
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
418 if (fromKm >= 0 && toKm >= 0 && fromKm <= toKm) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
419 final JSONObject range = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
420 final JSONObject fromtokm = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
421 final JSONNumber f = new JSONNumber(fromKm);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
422 final JSONNumber t = new JSONNumber(toKm);
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
423 fromtokm.put("from", f);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
424 fromtokm.put("to", t);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
425 root.put("range", fromtokm);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
426 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
427
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
428 final JSONObject and = new JSONObject();
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
429 if (hasDate) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
430 final long fromDate = filter.getFromDate();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
431 final long toDate = filter.getToDate();
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
432
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
433 final Date df = new Date(fromDate);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
434 final Date dt = new Date(toDate);
2884
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
435
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
436 final JSONObject daterange = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
437 final JSONString f = new JSONString(DTF.format(df));
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
438 final JSONString t = new JSONString(DTF.format(dt));
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
439
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
440 daterange.put("from", f);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
441 daterange.put("to", t);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
442 and.put("date-range", daterange);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
443 }
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
444
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
445 final int fromClass = filter.getFromClass();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
446 final int toClass = filter.getToClass();
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
447
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
448 if (fromClass >= 0 && toClass >= 0 && fromClass <= toClass) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
449 final JSONObject classrange = new JSONObject();
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
450 final JSONNumber f = new JSONNumber(fromClass);
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
451 final JSONNumber t = new JSONNumber(toClass);
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
452
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
453 classrange.put("from", f);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
454 classrange.put("to", t);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
455 and.put("sector-range", classrange);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
456 }
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
457
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
458 final int[] events = filter.getEvents();
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
459
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
460 if (events.length > 0) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
461 final StringBuilder cids = new StringBuilder();
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
462
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
463 for (int i = 0; i < events.length; i++) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
464 if (i > 0)
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
465 cids.append(' ');
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
466 cids.append(events[i]);
2884
88bca9f735c0 Implemented filter for fix analysis helper widgets.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2539
diff changeset
467 }
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
468 final JSONObject columns = new JSONObject();
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
469 columns.put("cids", new JSONString(cids.toString()));
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
470 and.put("columns", columns);
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
471 }
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
472 if (and.size() > 0) {
9072
02739b8c010d bundu progress (Klon FixationAnalysis +Vollmer funktioniert; Verzweigung neue Berechnungsart Bezugswst)
gernotbelger
parents: 8856
diff changeset
473 final JSONObject jFilter = new JSONObject();
2962
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
474 jFilter.put("and", and);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
475 root.put("filter", jFilter);
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
476 }
f14d4c668ec5 Bugfix: #698 Fix-Analysis is working in Tomcat again.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2923
diff changeset
477 return root;
2517
8f528f5ae137 Added filter object class and scrollable chart to helper panel.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2505
diff changeset
478 }
2505
87ac5c532523 First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
479 }
3861
16840d849298 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3366
diff changeset
480 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org