litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/event/dom/client/MouseEvent.java
|
@@ -26,14 +26,12 @@ |
26 |
26 |
|
* @deprecated use the com.google.gwt.event.dom.client classes instead |
27 |
27 |
|
*/ |
28 |
28 |
|
@Deprecated |
29 |
|
- |
public abstract class MouseEvent<T extends EventHandler> extends DomEvent |
30 |
|
- |
{ |
|
29 |
+ |
public abstract class MouseEvent<T extends EventHandler> extends DomEvent { |
31 |
30 |
|
|
32 |
31 |
|
/** |
33 |
32 |
|
* The native Dom button codes. |
34 |
33 |
|
*/ |
35 |
|
- |
public enum Button |
36 |
|
- |
{ |
|
34 |
+ |
public enum Button { |
37 |
35 |
|
/** |
38 |
36 |
|
* Left button. |
39 |
37 |
|
*/ |
|
@@ -54,10 +52,8 @@ |
54 |
52 |
|
* |
55 |
53 |
|
* @return which button |
56 |
54 |
|
*/ |
57 |
|
- |
public static Button valueOf( int buttonCode ) |
58 |
|
- |
{ |
59 |
|
- |
switch ( buttonCode ) |
60 |
|
- |
{ |
|
55 |
+ |
public static Button valueOf( int buttonCode ) { |
|
56 |
+ |
switch ( buttonCode ) { |
61 |
57 |
|
case Event.BUTTON_LEFT: |
62 |
58 |
|
return LEFT; |
63 |
59 |
|
case Event.BUTTON_RIGHT: |
|
@@ -70,8 +66,7 @@ |
70 |
66 |
|
} |
71 |
67 |
|
} |
72 |
68 |
|
|
73 |
|
- |
MouseEvent( Event e ) |
74 |
|
- |
{ |
|
69 |
+ |
MouseEvent( Event e ) { |
75 |
70 |
|
super( e ); |
76 |
71 |
|
} |
77 |
72 |
|
|
|
@@ -80,8 +75,7 @@ |
80 |
75 |
|
* |
81 |
76 |
|
* @return gets the button value. |
82 |
77 |
|
*/ |
83 |
|
- |
public Button getButton() |
84 |
|
- |
{ |
|
78 |
+ |
public Button getButton() { |
85 |
79 |
|
return Button.valueOf( getNativeEvent().getButton() ); |
86 |
80 |
|
} |
87 |
81 |
|
|
|
@@ -90,8 +84,7 @@ |
90 |
84 |
|
* |
91 |
85 |
|
* @return the mouse x-position |
92 |
86 |
|
*/ |
93 |
|
- |
public int getClientX() |
94 |
|
- |
{ |
|
87 |
+ |
public int getClientX() { |
95 |
88 |
|
return getNativeEvent().getClientX(); |
96 |
89 |
|
} |
97 |
90 |
|
|
|
@@ -100,8 +93,7 @@ |
100 |
93 |
|
* |
101 |
94 |
|
* @return the mouse y-position |
102 |
95 |
|
*/ |
103 |
|
- |
public int getClientY() |
104 |
|
- |
{ |
|
96 |
+ |
public int getClientY() { |
105 |
97 |
|
return getNativeEvent().getClientY(); |
106 |
98 |
|
} |
107 |
99 |
|
|
|
@@ -110,8 +102,7 @@ |
110 |
102 |
|
* |
111 |
103 |
|
* @return the mouse x-position |
112 |
104 |
|
*/ |
113 |
|
- |
public int getScreenX() |
114 |
|
- |
{ |
|
105 |
+ |
public int getScreenX() { |
115 |
106 |
|
return getNativeEvent().getScreenX(); |
116 |
107 |
|
} |
117 |
108 |
|
|
|
@@ -120,8 +111,7 @@ |
120 |
111 |
|
* |
121 |
112 |
|
* @return the mouse y-position |
122 |
113 |
|
*/ |
123 |
|
- |
public int getScreenY() |
124 |
|
- |
{ |
|
114 |
+ |
public int getScreenY() { |
125 |
115 |
|
return getNativeEvent().getScreenY(); |
126 |
116 |
|
} |
127 |
117 |
|
|
|
@@ -130,8 +120,7 @@ |
130 |
120 |
|
* |
131 |
121 |
|
* @return whether the alt key is down |
132 |
122 |
|
*/ |
133 |
|
- |
public boolean isAltKeyDown() |
134 |
|
- |
{ |
|
123 |
+ |
public boolean isAltKeyDown() { |
135 |
124 |
|
return getNativeEvent().getAltKey(); |
136 |
125 |
|
} |
137 |
126 |
|
|
|
@@ -140,8 +129,7 @@ |
140 |
129 |
|
* |
141 |
130 |
|
* @return whether the control key is down |
142 |
131 |
|
*/ |
143 |
|
- |
public boolean isControlKeyDown() |
144 |
|
- |
{ |
|
132 |
+ |
public boolean isControlKeyDown() { |
145 |
133 |
|
return getNativeEvent().getCtrlKey(); |
146 |
134 |
|
} |
147 |
135 |
|
|
|
@@ -150,8 +138,7 @@ |
150 |
138 |
|
* |
151 |
139 |
|
* @return whether the meta key is down |
152 |
140 |
|
*/ |
153 |
|
- |
public boolean isMetaKeyDown() |
154 |
|
- |
{ |
|
141 |
+ |
public boolean isMetaKeyDown() { |
155 |
142 |
|
return getNativeEvent().getMetaKey(); |
156 |
143 |
|
} |
157 |
144 |
|
|
|
@@ -160,8 +147,7 @@ |
160 |
147 |
|
* |
161 |
148 |
|
* @return whether the shift key is down |
162 |
149 |
|
*/ |
163 |
|
- |
public boolean isShiftKeyDown() |
164 |
|
- |
{ |
|
150 |
+ |
public boolean isShiftKeyDown() { |
165 |
151 |
|
return getNativeEvent().getShiftKey(); |
166 |
152 |
|
} |
167 |
153 |
|
} |