comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacagePairWidget.java @ 1284:cdb1505a32f1

Fix messed up indentation. flys-client/trunk@2868 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 30 Sep 2011 07:49:41 +0000
parents e8bb11976c70
children d9cb362b8b34
comparison
equal deleted inserted replaced
1283:e8bb11976c70 1284:cdb1505a32f1
33 * Insert a record into a listgrid when plus-button clicked. 33 * Insert a record into a listgrid when plus-button clicked.
34 */ 34 */
35 public class DatacagePairWidget 35 public class DatacagePairWidget
36 extends VLayout 36 extends VLayout
37 { 37 {
38 protected FLYSConstants messages = 38 protected FLYSConstants messages =
39 GWT.create(FLYSConstants.class); 39 GWT.create(FLYSConstants.class);
40 40
41 /** The "remote" ListGrid to insert data to when add-button is clicked. */ 41 /** The "remote" ListGrid to insert data to when add-button is clicked. */
42 protected ListGrid grid; 42 protected ListGrid grid;
43 43
44 /** First attribute-name for StringPairRecord. */ 44 /** First attribute-name for StringPairRecord. */
45 protected static final String ATTRIBUTE_FIRST = "first"; 45 protected static final String ATTRIBUTE_FIRST = "first";
46 46
47 /** Second attribute-name for StringPairRecord. */ 47 /** Second attribute-name for StringPairRecord. */
48 protected static final String ATTRIBUTE_SECOND = "second"; 48 protected static final String ATTRIBUTE_SECOND = "second";
49 49
50 /** First (upper) DataCage Grid. */ 50 /** First (upper) DataCage Grid. */
51 protected DatacageWidget firstDatacageWidget; 51 protected DatacageWidget firstDatacageWidget;
52 52
53 /** Second (lower) DataCage Grid. */ 53 /** Second (lower) DataCage Grid. */
54 protected DatacageWidget secondDatacageWidget; 54 protected DatacageWidget secondDatacageWidget;
55 55
56 56
57 /** 57 /**
58 * Two strings to be displayed in a GridList, derived from two 58 * Two strings to be displayed in a GridList, derived from two
59 * Recommendations. 59 * Recommendations.
60 */ 60 */
61 protected class RecommendationPairRecord extends ListGridRecord { 61 protected class RecommendationPairRecord extends ListGridRecord {
62 Recommendation first; 62 Recommendation first;
63 Recommendation second; 63 Recommendation second;
64 String firstName; 64 String firstName;
65 String secondName; 65 String secondName;
66 66
67 public RecommendationPairRecord() { 67 public RecommendationPairRecord() {
68 }
69
70 public RecommendationPairRecord(String firstName,
71 Recommendation first,
72 String secondName,
73 Recommendation second)
74 {
75 setFirst(first, firstName);
76 setSecond(second, secondName);
77 }
78
79
80 public void setFirst(Recommendation first, String name) {
81 this.first = first;
82 this.firstName = name;
83 setAttribute(ATTRIBUTE_FIRST, name);
84 }
85
86
87 public void setSecond(Recommendation second, String name) {
88 this.second = second;
89 this.secondName = name;
90 setAttribute(ATTRIBUTE_SECOND, name);
91 }
92
93 public Recommendation getFirst() {return first;}
94 public Recommendation getSecond() {return second;}
95 public String getFirstName() {return firstName;}
96 public String getSecondName() {return secondName;}
68 } 97 }
69 98
70 public RecommendationPairRecord(String firstName, 99
71 Recommendation first, 100 /**
72 String secondName, 101 *
73 Recommendation second) 102 * @param artifact Artifact to query datacage with.
74 { 103 * @param user User to query datacage with.
75 setFirst(first, firstName); 104 * @param outs outs to query datacage with.
76 setSecond(second, secondName); 105 * @param grid Grid into which to insert selection of pairs.
77 } 106 */
78 107 public DatacagePairWidget(Artifact artifact,
79
80 public void setFirst(Recommendation first, String name) {
81 this.first = first;
82 this.firstName = name;
83 setAttribute(ATTRIBUTE_FIRST, name);
84 }
85
86
87 public void setSecond(Recommendation second, String name) {
88 this.second = second;
89 this.secondName = name;
90 setAttribute(ATTRIBUTE_SECOND, name);
91 }
92
93 public Recommendation getFirst() {return first;}
94 public Recommendation getSecond() {return second;}
95 public String getFirstName() {return firstName;}
96 public String getSecondName() {return secondName;}
97 }
98
99
100 /**
101 *
102 * @param artifact Artifact to query datacage with.
103 * @param user User to query datacage with.
104 * @param outs outs to query datacage with.
105 * @param grid Grid into which to insert selection of pairs.
106 */
107 public DatacagePairWidget(Artifact artifact,
108 User user, 108 User user,
109 String outs, 109 String outs,
110 ListGrid grid) { 110 ListGrid grid) {
111 this.grid = grid; 111 this.grid = grid;
112 112

http://dive4elements.wald.intevation.org