Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacagePairWidget.java @ 1298:b0ed67cb5197
Minor refactoring, improved displayed Strings in W-Diff branch.
flys-client/trunk@2920 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 10 Oct 2011 10:02:16 +0000 |
parents | d9cb362b8b34 |
children | 2fa7ed1ac7cf |
comparison
equal
deleted
inserted
replaced
1297:887eb0cd7dfc | 1298:b0ed67cb5197 |
---|---|
33 GWT.create(FLYSConstants.class); | 33 GWT.create(FLYSConstants.class); |
34 | 34 |
35 /** The "remote" ListGrid to insert data to when add-button is clicked. */ | 35 /** The "remote" ListGrid to insert data to when add-button is clicked. */ |
36 protected ListGrid grid; | 36 protected ListGrid grid; |
37 | 37 |
38 /** First attribute-name for StringPairRecord. */ | |
39 protected static final String ATTRIBUTE_FIRST = "first"; | |
40 | |
41 /** Second attribute-name for StringPairRecord. */ | |
42 protected static final String ATTRIBUTE_SECOND = "second"; | |
43 | |
44 /** First (upper) DataCage Grid. */ | 38 /** First (upper) DataCage Grid. */ |
45 protected DatacageWidget firstDatacageWidget; | 39 protected DatacageWidget firstDatacageWidget; |
46 | 40 |
47 /** Second (lower) DataCage Grid. */ | 41 /** Second (lower) DataCage Grid. */ |
48 protected DatacageWidget secondDatacageWidget; | 42 protected DatacageWidget secondDatacageWidget; |
49 | 43 |
50 | |
51 /** | |
52 * Two strings to be displayed in a GridList, derived from two | |
53 * Recommendations. | |
54 */ | |
55 protected class RecommendationPairRecord extends ListGridRecord { | |
56 Recommendation first; | |
57 Recommendation second; | |
58 String firstName; | |
59 String secondName; | |
60 | |
61 public RecommendationPairRecord() { | |
62 } | |
63 | |
64 public RecommendationPairRecord(String firstName, | |
65 Recommendation first, | |
66 String secondName, | |
67 Recommendation second) | |
68 { | |
69 setFirst(first, firstName); | |
70 setSecond(second, secondName); | |
71 } | |
72 | |
73 | |
74 public void setFirst(Recommendation first, String name) { | |
75 this.first = first; | |
76 this.firstName = name; | |
77 setAttribute(ATTRIBUTE_FIRST, name); | |
78 } | |
79 | |
80 | |
81 public void setSecond(Recommendation second, String name) { | |
82 this.second = second; | |
83 this.secondName = name; | |
84 setAttribute(ATTRIBUTE_SECOND, name); | |
85 } | |
86 | |
87 public Recommendation getFirst() {return first;} | |
88 public Recommendation getSecond() {return second;} | |
89 public String getFirstName() {return firstName;} | |
90 public String getSecondName() {return secondName;} | |
91 } | |
92 | |
93 | 44 |
94 /** | 45 /** |
95 * | 46 * |
96 * @param artifact Artifact to query datacage with. | 47 * @param artifact Artifact to query datacage with. |
97 * @param user User to query datacage with. | 48 * @param user User to query datacage with. |