Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java @ 660:627be3ca1ab6
code clean up in states
flys-artifacts/trunk@2068 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 07 Jun 2011 14:28:44 +0000 |
parents | a9af60c84dca |
children | 610d0e0f4f85 |
comparison
equal
deleted
inserted
replaced
659:ab43f36f4af6 | 660:627be3ca1ab6 |
---|---|
88 | 88 |
89 return select; | 89 return select; |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 @Override | |
93 protected Element[] createItems( | 94 protected Element[] createItems( |
94 XMLUtils.ElementCreator cr, | 95 XMLUtils.ElementCreator cr, |
95 Artifact artifact, | 96 Artifact artifact, |
96 String name, | 97 String name, |
97 CallContext context) | 98 CallContext context) |
113 Element maxQ = createItem( | 114 Element maxQ = createItem( |
114 cr, new String[] {"maxQ", new Double(minmaxQ[1]).toString()}); | 115 cr, new String[] {"maxQ", new Double(minmaxQ[1]).toString()}); |
115 return new Element[] { maxW, maxQ }; | 116 return new Element[] { maxW, maxQ }; |
116 } | 117 } |
117 else { | 118 else { |
118 Element stepW = createItem(cr, new String[] {"stepW", DEFAULT_STEP_W}); | 119 Element stepW = createItem( |
119 Element stepQ = createItem(cr, new String[] {"stepQ", DEFAULT_STEP_Q}); | 120 cr, new String[] {"stepW", DEFAULT_STEP_W}); |
121 Element stepQ = createItem( | |
122 cr, new String[] {"stepQ", DEFAULT_STEP_Q}); | |
120 return new Element[] { stepW, stepQ }; | 123 return new Element[] { stepW, stepQ }; |
121 } | 124 } |
122 } | 125 } |
123 | 126 |
124 | 127 |
137 | 140 |
138 return item; | 141 return item; |
139 } | 142 } |
140 | 143 |
141 | 144 |
145 @Override | |
142 protected String getUIProvider() { | 146 protected String getUIProvider() { |
143 return "wq_panel"; | 147 return "wq_panel"; |
144 } | 148 } |
145 | 149 |
146 | 150 |
303 } | 307 } |
304 else if (mode != null && mode.trim().toLowerCase().equals("q")) { | 308 else if (mode != null && mode.trim().toLowerCase().equals("q")) { |
305 return validateQ(artifact, context, from, to, step); | 309 return validateQ(artifact, context, from, to, step); |
306 } | 310 } |
307 else { | 311 else { |
308 throw new IllegalArgumentException("error_feed_invalid_wq_mode"); | 312 throw new IllegalArgumentException( |
313 "error_feed_invalid_wq_mode"); | |
309 } | 314 } |
310 } | 315 } |
311 catch (NumberFormatException nfe) { | 316 catch (NumberFormatException nfe) { |
312 throw new IllegalArgumentException("error_feed_number_format"); | 317 throw new IllegalArgumentException("error_feed_number_format"); |
313 } | 318 } |