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;
15:
16: import org.itsnat.core.ItsNatException;
17: import org.itsnat.impl.core.ItsNatServletRequestImpl;
18: import org.itsnat.impl.core.event.EventInternal;
19: import org.itsnat.impl.core.listener.DOMBasedEventListenerWrapperImpl;
20:
21: /**
22: *
23: * @author jmarranz
24: */
25: public abstract class DOMBasedEventImpl extends NormalEventImpl
26: implements EventInternal {
27: protected boolean stopPropagation = false;
28: protected boolean preventDefault = false;
29:
30: /**
31: * Creates a new instance of DOMBasedEventImpl
32: */
33: public DOMBasedEventImpl(
34: DOMBasedEventListenerWrapperImpl listenerWrapper,
35: ItsNatServletRequestImpl request) {
36: super (listenerWrapper, request);
37: }
38:
39: public void checkInitializedEvent() {
40: // No lo crea el programador, siempre estará correctamente iniciado
41: }
42:
43: public void initEvent(String eventTypeArg, boolean canBubbleArg,
44: boolean cancelableArg) {
45: throw new ItsNatException("Not implemented");
46: }
47:
48: public void stopPropagation() {
49: this .stopPropagation = true;
50: }
51:
52: public boolean getStopPropagation() {
53: return stopPropagation;
54: }
55:
56: public void preventDefault() {
57: this .preventDefault = true;
58: }
59:
60: public boolean getPreventDefault() {
61: return preventDefault;
62: }
63: }
|