|
@@ -1,62 +1,62 @@ |
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 |
|
- |
|
17 |
|
- |
package com.google.gwt.gen2.event.dom.client; |
18 |
|
- |
|
19 |
|
- |
import com.google.gwt.gen2.event.shared.*; |
20 |
|
- |
|
21 |
|
- |
/** |
22 |
|
- |
* This is a convenience interface that includes all focus handlers defined by |
23 |
|
- |
* the core GWT system. |
24 |
|
- |
* <p/> |
25 |
|
- |
* <br/> |
26 |
|
- |
* WARNING, PLEASE READ: As this interface is intended for developers who wish |
27 |
|
- |
* to handle all focus events in GWT, in the unlikely event that a new focus |
28 |
|
- |
* event is added, this interface will change. |
29 |
|
- |
* |
30 |
|
- |
* @deprecated use the com.google.gwt.event.dom.client classes instead |
31 |
|
- |
*/ |
32 |
|
- |
@Deprecated |
33 |
|
- |
public interface HasAllFocusHandlers extends HasFocusHandlers, |
34 |
|
- |
HasBlurHandlers { |
35 |
|
- |
/** |
36 |
|
- |
* Adaptor used to implement both {@link FocusHandler} and {@link BlurHandler} |
37 |
|
- |
* . |
38 |
|
- |
*/ |
39 |
|
- |
public abstract static class Adaptor extends HandlerAdaptor implements FocusHandler, |
40 |
|
- |
BlurHandler { |
41 |
|
- |
|
42 |
|
- |
/** |
43 |
|
- |
* Convenience method to add both focus handlers at once to an event source. |
44 |
|
- |
* |
45 |
|
- |
* @param <EventSourceType> the event source to add the handlers to. |
46 |
|
- |
* @param <EventHandlerType> |
47 |
|
- |
* @param source the event source |
48 |
|
- |
* @param handlers the focus handlers |
49 |
|
- |
*/ |
50 |
|
- |
public static <EventSourceType extends HasHandlerManager & HasAllFocusHandlers, EventHandlerType extends BlurHandler & FocusHandler> void addHandlers( |
51 |
|
- |
EventSourceType source, EventHandlerType handlers ) { |
52 |
|
- |
source.addBlurHandler( handlers ); |
53 |
|
- |
source.addFocusHandler( handlers ); |
54 |
|
- |
} |
55 |
|
- |
|
56 |
|
- |
/** |
57 |
|
- |
* Constructor. |
58 |
|
- |
*/ |
59 |
|
- |
public Adaptor() { |
60 |
|
- |
} |
61 |
|
- |
} |
62 |
|
- |
} |
|
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 |
+ |
|
|
17 |
+ |
package com.google.gwt.gen2.event.dom.client; |
|
18 |
+ |
|
|
19 |
+ |
import com.google.gwt.gen2.event.shared.*; |
|
20 |
+ |
|
|
21 |
+ |
/** |
|
22 |
+ |
* This is a convenience interface that includes all focus handlers defined by |
|
23 |
+ |
* the core GWT system. |
|
24 |
+ |
* <p/> |
|
25 |
+ |
* <br/> |
|
26 |
+ |
* WARNING, PLEASE READ: As this interface is intended for developers who wish |
|
27 |
+ |
* to handle all focus events in GWT, in the unlikely event that a new focus |
|
28 |
+ |
* event is added, this interface will change. |
|
29 |
+ |
* |
|
30 |
+ |
* @deprecated use the com.google.gwt.event.dom.client classes instead |
|
31 |
+ |
*/ |
|
32 |
+ |
@Deprecated |
|
33 |
+ |
public interface HasAllFocusHandlers extends HasFocusHandlers, |
|
34 |
+ |
HasBlurHandlers { |
|
35 |
+ |
/** |
|
36 |
+ |
* Adaptor used to implement both {@link FocusHandler} and {@link BlurHandler} |
|
37 |
+ |
* . |
|
38 |
+ |
*/ |
|
39 |
+ |
public abstract static class Adaptor extends HandlerAdaptor implements FocusHandler, |
|
40 |
+ |
BlurHandler { |
|
41 |
+ |
|
|
42 |
+ |
/** |
|
43 |
+ |
* Convenience method to add both focus handlers at once to an event source. |
|
44 |
+ |
* |
|
45 |
+ |
* @param <EventSourceType> the event source to add the handlers to. |
|
46 |
+ |
* @param <EventHandlerType> |
|
47 |
+ |
* @param source the event source |
|
48 |
+ |
* @param handlers the focus handlers |
|
49 |
+ |
*/ |
|
50 |
+ |
public static <EventSourceType extends HasHandlerManager & HasAllFocusHandlers, EventHandlerType extends BlurHandler & FocusHandler> void addHandlers( |
|
51 |
+ |
EventSourceType source, EventHandlerType handlers ) { |
|
52 |
+ |
source.addBlurHandler( handlers ); |
|
53 |
+ |
source.addFocusHandler( handlers ); |
|
54 |
+ |
} |
|
55 |
+ |
|
|
56 |
+ |
/** |
|
57 |
+ |
* Constructor. |
|
58 |
+ |
*/ |
|
59 |
+ |
public Adaptor() { |
|
60 |
+ |
} |
|
61 |
+ |
} |
|
62 |
+ |
} |