Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/event/shared/HandlerRegistration.java

Diff revisions: vs.
  @@ -1,53 +1,53 @@
1 - /*
2 - * Copyright 2008 Google Inc.
3 - *
4 - * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 - * use this file except in compliance with the License. You may obtain a copy of
6 - * the License at
7 - *
8 - * http://www.apache.org/licenses/LICENSE-2.0
9 - *
10 - * Unless required by applicable law or agreed to in writing, software
11 - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 - * License for the specific language governing permissions and limitations under
14 - * the License.
15 - */
16 - package com.google.gwt.gen2.event.shared;
17 -
18 - import com.google.gwt.gen2.event.shared.AbstractEvent.*;
19 -
20 - /**
21 - * HandlerRegistration instances are returned by
22 - * HandlerManager.addEventHandler() and used to remove event handler
23 - * registrations.
24 - *
25 - * @deprecated use the com.google.gwt.event.shared classes instead
26 - */
27 - @Deprecated
28 - public class HandlerRegistration {
29 -
30 - private HandlerManager manager;
31 - private EventHandler handler;
32 - private Type type;
33 -
34 - /**
35 - * Creates a new handler registration.
36 - *
37 - * @param manager the handler manager
38 - * @param type the event type
39 - * @param handler the handler
40 - */
41 - protected HandlerRegistration( HandlerManager manager, Type type, EventHandler handler ) {
42 - this.manager = manager;
43 - this.handler = handler;
44 - this.type = type;
45 - }
46 -
47 - /**
48 - * Removes the given handler from its manager.
49 - */
50 - public void removeHandler() {
51 - manager.removeHandler( type, handler );
52 - }
53 - }
1 + /*
2 + * Copyright 2008 Google Inc.
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 + * use this file except in compliance with the License. You may obtain a copy of
6 + * the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 + * License for the specific language governing permissions and limitations under
14 + * the License.
15 + */
16 + package com.google.gwt.gen2.event.shared;
17 +
18 + import com.google.gwt.gen2.event.shared.AbstractEvent.*;
19 +
20 + /**
21 + * HandlerRegistration instances are returned by
22 + * HandlerManager.addEventHandler() and used to remove event handler
23 + * registrations.
24 + *
25 + * @deprecated use the com.google.gwt.event.shared classes instead
26 + */
27 + @Deprecated
28 + public class HandlerRegistration {
29 +
30 + private HandlerManager manager;
31 + private EventHandler handler;
32 + private Type type;
33 +
34 + /**
35 + * Creates a new handler registration.
36 + *
37 + * @param manager the handler manager
38 + * @param type the event type
39 + * @param handler the handler
40 + */
41 + protected HandlerRegistration( HandlerManager manager, Type type, EventHandler handler ) {
42 + this.manager = manager;
43 + this.handler = handler;
44 + this.type = type;
45 + }
46 +
47 + /**
48 + * Removes the given handler from its manager.
49 + */
50 + public void removeHandler() {
51 + manager.removeHandler( type, handler );
52 + }
53 + }