1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.googlecode.mgwt.dom.client.event.mouse;
17
18 import java.util.LinkedList;
19
20 import com.google.gwt.event.shared.HandlerRegistration;
21
22
23
24
25
26
27
28
29 public class HandlerRegistrationCollection implements HandlerRegistration, com.google.web.bindery.event.shared.HandlerRegistration {
30
31 private LinkedList<com.google.web.bindery.event.shared.HandlerRegistration> collectedHandlers = new LinkedList<com.google.web.bindery.event.shared.HandlerRegistration>();
32
33
34
35
36 public HandlerRegistrationCollection() {
37
38 }
39
40
41
42
43
44
45 public void addHandlerRegistration(HandlerRegistration handlerRegistration) {
46 collectedHandlers.add(handlerRegistration);
47 }
48
49 public void addHandlerRegistration(com.google.web.bindery.event.shared.HandlerRegistration handlerRegistration) {
50 collectedHandlers.add(handlerRegistration);
51 }
52
53
54
55
56
57
58 @Override
59 public void removeHandler() {
60 for (com.google.web.bindery.event.shared.HandlerRegistration handlerRegistration : collectedHandlers) {
61 handlerRegistration.removeHandler();
62 }
63 collectedHandlers.clear();
64
65 }
66
67 }