Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DefaultDatacageTwinPanelInfo.java @ 9220:e3c2ae1887e8
Allow to filter contents of datacage on client side.
Allow to override column label of datacage
Some code cleanup
author | gernotbelger |
---|---|
date | Wed, 04 Jul 2018 12:00:51 +0200 |
parents | 8d1df8639563 |
children |
comparison
equal
deleted
inserted
replaced
9219:8642a76f22be | 9220:e3c2ae1887e8 |
---|---|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde | 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
2 * Software engineering by | 2 * Software engineering by |
3 * Björnsen Beratende Ingenieure GmbH | 3 * Björnsen Beratende Ingenieure GmbH |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | 4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt |
5 * | 5 * |
6 * This file is Free Software under the GNU AGPL (>=v3) | 6 * This file is Free Software under the GNU AGPL (>=v3) |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | 7 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
8 * documentation coming with Dive4Elements River for details. | 8 * documentation coming with Dive4Elements River for details. |
11 | 11 |
12 import org.dive4elements.river.client.client.ui.DatacageTwinPanel.IDatacageTwinPanelInfo; | 12 import org.dive4elements.river.client.client.ui.DatacageTwinPanel.IDatacageTwinPanelInfo; |
13 import org.dive4elements.river.client.shared.model.Recommendation; | 13 import org.dive4elements.river.client.shared.model.Recommendation; |
14 | 14 |
15 /** | 15 /** |
16 * This info implementation overwrites the real factory of the recommendation with a fixed value. | 16 * This info implementation overwrites the real factory of the recommendation with a fixed value. |
17 * Evil, but this is how it is done in the current code. | 17 * Evil, but this is how it is done in the current code. |
18 * | 18 * |
19 * @author Gernot Belger | 19 * @author Gernot Belger |
20 */ | 20 */ |
21 public final class DefaultDatacageTwinPanelInfo implements IDatacageTwinPanelInfo { | 21 public final class DefaultDatacageTwinPanelInfo implements IDatacageTwinPanelInfo { |
22 | 22 |
23 private final String factory; | 23 private final String factory; |
24 private final String outs; | 24 private final String outs; |
25 private final String columnLabel; | |
25 | 26 |
26 public DefaultDatacageTwinPanelInfo(final String factory, final String outs) { | 27 public DefaultDatacageTwinPanelInfo(final String columnLabel, final String factory, final String outs) { |
27 this.factory = factory; | 28 this.columnLabel = columnLabel; |
28 this.outs = outs; | 29 this.factory = factory; |
29 } | 30 this.outs = outs; |
30 | 31 } |
31 @Override | |
32 public String getFactory(final String originalFactory) { | |
33 return this.factory; | |
34 } | |
35 | |
36 @Override | |
37 public String getDataStringFactory(final Recommendation recommendation) { | |
38 return this.factory; | |
39 } | |
40 | 32 |
41 @Override | 33 @Override |
42 public void adjustRecommendation(final Recommendation recommendation) { | 34 public String getFactory(final String originalFactory) { |
35 return this.factory; | |
36 } | |
37 | |
38 @Override | |
39 public String getDataStringFactory(final Recommendation recommendation) { | |
40 return this.factory; | |
41 } | |
42 | |
43 @Override | |
44 public void adjustRecommendation(final Recommendation recommendation) { | |
43 recommendation.setFactory(this.factory); | 45 recommendation.setFactory(this.factory); |
44 } | 46 } |
45 | 47 |
46 @Override | 48 @Override |
47 public String getOuts() { | 49 public String getColumnLabel() { |
48 return this.outs; | 50 return this.columnLabel; |
49 } | 51 } |
52 | |
53 @Override | |
54 public String getOuts() { | |
55 return this.outs; | |
56 } | |
50 } | 57 } |