Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java @ 4381:80f5d1f2d4fd
Converting from list to array doesn't make sence here
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 02 Nov 2012 15:55:51 +0100 |
parents | 51ed89b754ae |
children | d5f5bdaca316 |
comparison
equal
deleted
inserted
replaced
4380:19754e5227c8 | 4381:80f5d1f2d4fd |
---|---|
92 | 92 |
93 @Override | 93 @Override |
94 public void toLoad(ToLoad toLoad) { | 94 public void toLoad(ToLoad toLoad) { |
95 destroy(); | 95 destroy(); |
96 List<Recommendation> recs = toLoad.toRecommendations(); | 96 List<Recommendation> recs = toLoad.toRecommendations(); |
97 loadArtifacts(recs.toArray(new Recommendation[recs.size()])); | 97 loadArtifacts(recs); |
98 } | 98 } |
99 | 99 |
100 | 100 |
101 @Override | 101 @Override |
102 public void onDoubleClick(ToLoad toLoad) { | 102 public void onDoubleClick(ToLoad toLoad) { |
103 destroy(); | 103 destroy(); |
104 List<Recommendation> recs = toLoad.toRecommendations(); | 104 List<Recommendation> recs = toLoad.toRecommendations(); |
105 loadArtifacts(recs.toArray(new Recommendation[recs.size()])); | 105 loadArtifacts(recs); |
106 } | 106 } |
107 | 107 |
108 | 108 |
109 @Override | 109 @Override |
110 public void addRedrawRequestHandler(RedrawRequestHandler handler) { | 110 public void addRedrawRequestHandler(RedrawRequestHandler handler) { |
155 handler.onRedrawRequest(evt); | 155 handler.onRedrawRequest(evt); |
156 } | 156 } |
157 } | 157 } |
158 | 158 |
159 | 159 |
160 protected void loadArtifacts(Recommendation[] recommendations) { | 160 protected void loadArtifacts(List<Recommendation> recommendations) { |
161 Config cfg = Config.getInstance(); | 161 Config cfg = Config.getInstance(); |
162 | 162 |
163 final Collection collection = view.getCollection(); | 163 final Collection collection = view.getCollection(); |
164 final Artifact masterArtifact = view.getArtifact(); | 164 final Artifact masterArtifact = view.getArtifact(); |
165 final String locale = cfg.getLocale(); | 165 final String locale = cfg.getLocale(); |
166 | 166 |
167 this.inProgress = recommendations.length; | 167 this.inProgress = recommendations.size(); |
168 | 168 |
169 for (final Recommendation recommendation: recommendations) { | 169 for (final Recommendation recommendation: recommendations) { |
170 // XXX: UGLY! If no reference artifact given use uuid of | 170 // XXX: UGLY! If no reference artifact given use uuid of |
171 // current artifact as reference. | 171 // current artifact as reference. |
172 if (recommendation.getMasterArtifact() == null) { | 172 if (recommendation.getMasterArtifact() == null) { |