litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/nonpublic/external/EventDelegateAdaptor.java
|
@@ -19,16 +19,14 @@ |
19 |
19 |
|
import com.google.gwt.user.client.*; |
20 |
20 |
|
import com.google.gwt.user.client.ui.*; |
21 |
21 |
|
|
22 |
|
- |
public abstract class EventDelegateAdaptor implements EventDelegate |
23 |
|
- |
{ |
|
22 |
+ |
public abstract class EventDelegateAdaptor implements EventDelegate { |
24 |
23 |
|
private final int m_eventBits; |
25 |
24 |
|
|
26 |
25 |
|
/** |
27 |
26 |
|
* Default constructor for convienence. Subclasses must override |
28 |
27 |
|
* {@link #getEventBits()} if they want to process events. |
29 |
28 |
|
*/ |
30 |
|
- |
public EventDelegateAdaptor() |
31 |
|
- |
{ |
|
29 |
+ |
public EventDelegateAdaptor() { |
32 |
30 |
|
m_eventBits = 0; |
33 |
31 |
|
} |
34 |
32 |
|
|
|
@@ -39,8 +37,7 @@ |
39 |
37 |
|
* |
40 |
38 |
|
* @see Event |
41 |
39 |
|
*/ |
42 |
|
- |
public EventDelegateAdaptor( int eventBits ) |
43 |
|
- |
{ |
|
40 |
+ |
public EventDelegateAdaptor( int eventBits ) { |
44 |
41 |
|
m_eventBits = eventBits; |
45 |
42 |
|
} |
46 |
43 |
|
|
|
@@ -49,10 +46,8 @@ |
49 |
46 |
|
* @see asquare.gwt.tk.client.ui.behavior.EventDelegate#onBrowserEvent(com.google.gwt.user.client.ui.Widget, com.google.gwt.user.client.Event) |
50 |
47 |
|
*/ |
51 |
48 |
|
@Override |
52 |
|
- |
public void onBrowserEvent( Widget widget, Event event ) |
53 |
|
- |
{ |
54 |
|
- |
if ( !doBrowserEvent( widget, event ) ) |
55 |
|
- |
{ |
|
49 |
+ |
public void onBrowserEvent( Widget widget, Event event ) { |
|
50 |
+ |
if ( !doBrowserEvent( widget, event ) ) { |
56 |
51 |
|
DOM.eventPreventDefault( event ); |
57 |
52 |
|
DOM.eventCancelBubble( event, true ); |
58 |
53 |
|
} |
|
@@ -64,8 +59,7 @@ |
64 |
59 |
|
* |
65 |
60 |
|
* @return false to cancel the event |
66 |
61 |
|
*/ |
67 |
|
- |
protected boolean doBrowserEvent( Widget widget, Event event ) |
68 |
|
- |
{ |
|
62 |
+ |
protected boolean doBrowserEvent( Widget widget, Event event ) { |
69 |
63 |
|
return true; |
70 |
64 |
|
} |
71 |
65 |
|
|
|
@@ -74,8 +68,7 @@ |
74 |
68 |
|
* Override in subclass if using the default constructor. |
75 |
69 |
|
*/ |
76 |
70 |
|
@Override |
77 |
|
- |
public int getEventBits() |
78 |
|
- |
{ |
|
71 |
+ |
public int getEventBits() { |
79 |
72 |
|
return m_eventBits; |
80 |
73 |
|
} |
81 |
74 |
|
} |