Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/event/dom/client/KeyCodeEvent.java

Diff revisions: vs.
  @@ -25,8 +25,7 @@
25 25 * @deprecated use the com.google.gwt.event.dom.client classes instead
26 26 */
27 27 @Deprecated
28 - public abstract class KeyCodeEvent extends KeyEvent
29 - {
28 + public abstract class KeyCodeEvent extends KeyEvent {
30 29
31 30 /**
32 31 * Alt key code.
  @@ -105,8 +104,7 @@
105 104 *
106 105 * @param nativeEvent the wrapped native event
107 106 */
108 - protected KeyCodeEvent( Event nativeEvent )
109 - {
107 + protected KeyCodeEvent( Event nativeEvent ) {
110 108 super( nativeEvent );
111 109 }
112 110
  @@ -115,8 +113,7 @@
115 113 *
116 114 * @return the key code
117 115 */
118 - public int getKeyCode()
119 - {
116 + public int getKeyCode() {
120 117 return getNativeEvent().getKeyCode();
121 118 }
122 119
  @@ -125,8 +122,7 @@
125 122 *
126 123 * @return is the key code alpha numeric.
127 124 */
128 - public boolean isAlphaNumeric()
129 - {
125 + public boolean isAlphaNumeric() {
130 126 int keycode = getKeyCode();
131 127 return (48 <= keycode && keycode <= 57) || (65 <= keycode && keycode <= 90);
132 128 }
  @@ -138,10 +134,8 @@
138 134 *
139 135 * @return if it is an arrow key code
140 136 */
141 - public boolean isArrowKeyCode( int code )
142 - {
143 - switch ( code )
144 - {
137 + public boolean isArrowKeyCode( int code ) {
138 + switch ( code ) {
145 139 case KeyboardListener.KEY_DOWN:
146 140 case KeyboardListener.KEY_RIGHT:
147 141 case KeyboardListener.KEY_UP:
  @@ -157,8 +151,7 @@
157 151 *
158 152 * @return whether this is a down arrow key event
159 153 */
160 - public boolean isDownKeyCode()
161 - {
154 + public boolean isDownKeyCode() {
162 155 return getKeyCode() == KEY_DOWN;
163 156 }
164 157
  @@ -167,8 +160,7 @@
167 160 *
168 161 * @return whether this is a left arrow key event
169 162 */
170 - public boolean isLeftKeyCode()
171 - {
163 + public boolean isLeftKeyCode() {
172 164 return getKeyCode() == KEY_LEFT;
173 165 }
174 166
  @@ -177,8 +169,7 @@
177 169 *
178 170 * @return whether this is a right arrow key event
179 171 */
180 - public boolean isRightKeyCode()
181 - {
172 + public boolean isRightKeyCode() {
182 173 return getKeyCode() == KEY_RIGHT;
183 174 }
184 175 }