Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java @ 1267:07aa1f504491
Bugfix: #323 A double click in the datacage widget triggers the DatacageDoubleClickHandler.onDoubleClick() method of all registered handlers.
flys-client/trunk@2820 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 26 Sep 2011 09:08:47 +0000 |
parents | 4668357b255e |
children | 7fc8b2a81463 |
comparison
equal
deleted
inserted
replaced
1266:ff012a9d9d1d | 1267:07aa1f504491 |
---|---|
11 | 11 |
12 import de.intevation.flys.client.client.Config; | 12 import de.intevation.flys.client.client.Config; |
13 import de.intevation.flys.client.client.FLYSConstants; | 13 import de.intevation.flys.client.client.FLYSConstants; |
14 | 14 |
15 import de.intevation.flys.client.client.event.DatacageHandler; | 15 import de.intevation.flys.client.client.event.DatacageHandler; |
16 import de.intevation.flys.client.client.event.DatacageDoubleClickHandler; | |
16 import de.intevation.flys.client.client.event.HasRedrawRequestHandlers; | 17 import de.intevation.flys.client.client.event.HasRedrawRequestHandlers; |
17 import de.intevation.flys.client.client.event.RedrawRequestHandler; | 18 import de.intevation.flys.client.client.event.RedrawRequestHandler; |
18 import de.intevation.flys.client.client.event.RedrawRequestEvent; | 19 import de.intevation.flys.client.client.event.RedrawRequestEvent; |
19 import de.intevation.flys.client.client.event.RedrawRequestEvent.Type; | 20 import de.intevation.flys.client.client.event.RedrawRequestEvent.Type; |
20 | 21 |
32 import de.intevation.flys.client.shared.model.Recommendation; | 33 import de.intevation.flys.client.shared.model.Recommendation; |
33 | 34 |
34 | 35 |
35 public class DatacageWindow | 36 public class DatacageWindow |
36 extends Window | 37 extends Window |
37 implements DatacageHandler, HasRedrawRequestHandlers | 38 implements DatacageHandler, |
39 DatacageDoubleClickHandler, | |
40 HasRedrawRequestHandlers | |
38 { | 41 { |
39 protected FLYSConstants messages = | 42 protected FLYSConstants messages = |
40 GWT.create(FLYSConstants.class); | 43 GWT.create(FLYSConstants.class); |
41 | 44 |
42 protected LoadArtifactServiceAsync loadService = | 45 protected LoadArtifactServiceAsync loadService = |
62 setWidth(400); | 65 setWidth(400); |
63 setHeight(500); | 66 setHeight(500); |
64 | 67 |
65 DatacageWidget dw = new DatacageWidget(artifact, user, outs); | 68 DatacageWidget dw = new DatacageWidget(artifact, user, outs); |
66 dw.addDatacageHandler(this); | 69 dw.addDatacageHandler(this); |
70 dw.addDatacageDoubleClickHandler(this); | |
67 | 71 |
68 addItem(dw); | 72 addItem(dw); |
69 | 73 |
70 String river = findRiver(artifact); | 74 String river = findRiver(artifact); |
71 // TODO: i18n | 75 // TODO: i18n |
79 } | 83 } |
80 | 84 |
81 | 85 |
82 @Override | 86 @Override |
83 public void toLoad(ToLoad toLoad) { | 87 public void toLoad(ToLoad toLoad) { |
88 destroy(); | |
89 List<Recommendation> recs = toLoad.toRecommendations(); | |
90 loadArtifacts(recs.toArray(new Recommendation[recs.size()])); | |
91 } | |
92 | |
93 | |
94 @Override | |
95 public void onDoubleClick(ToLoad toLoad) { | |
84 destroy(); | 96 destroy(); |
85 List<Recommendation> recs = toLoad.toRecommendations(); | 97 List<Recommendation> recs = toLoad.toRecommendations(); |
86 loadArtifacts(recs.toArray(new Recommendation[recs.size()])); | 98 loadArtifacts(recs.toArray(new Recommendation[recs.size()])); |
87 } | 99 } |
88 | 100 |