01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.impl.core.event.client2serv.dom.w3c;
15:
16: import org.itsnat.core.event.KeyEvent;
17: import org.itsnat.core.ItsNatException;
18: import org.itsnat.impl.core.ItsNatServletRequestImpl;
19: import org.itsnat.impl.core.listener.dom.DOMEventListenerWrapperImpl;
20: import org.w3c.dom.views.AbstractView;
21:
22: /**
23: *
24: * @author jmarranz
25: */
26: public class W3CKeyEventImpl extends W3CUIEventImpl implements KeyEvent {
27:
28: /**
29: * Creates a new instance of W3CKeyEventImpl
30: */
31: public W3CKeyEventImpl(DOMEventListenerWrapperImpl listenerWrapper,
32: ItsNatServletRequestImpl request) {
33: super (listenerWrapper, request);
34: }
35:
36: public void initKeyEvent(String typeArg, boolean canBubbleArg,
37: boolean cancelableArg, AbstractView viewArg,
38: boolean ctrlKeyArg, boolean altKeyArg, boolean shiftKeyArg,
39: boolean metaKeyArg, long keyCodeArg, long charCodeArg) {
40: throw new ItsNatException("Not implemented");
41: }
42:
43: public boolean getAltKey() {
44: return getDOMEventParamBoolean("altKey");
45: }
46:
47: public long getCharCode() {
48: return getDOMEventParamLong("charCode");
49: }
50:
51: public boolean getCtrlKey() {
52: return getDOMEventParamBoolean("ctrlKey");
53: }
54:
55: public long getKeyCode() {
56: return getDOMEventParamLong("keyCode");
57: }
58:
59: public boolean getMetaKey() {
60: return getDOMEventParamBoolean("metaKey");
61: }
62:
63: public boolean getShiftKey() {
64: return getDOMEventParamBoolean("shiftKey");
65: }
66:
67: }
|