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.comp.html;
15:
16: import org.itsnat.core.html.ItsNatHTMLDocument;
17: import org.itsnat.comp.html.ItsNatHTMLElementComponent;
18: import org.itsnat.comp.html.ui.ItsNatHTMLElementComponentUI;
19: import org.itsnat.impl.core.html.ItsNatHTMLDocumentImpl;
20: import org.itsnat.comp.html.ItsNatHTMLComponentManager;
21: import org.itsnat.core.NameValue;
22: import org.itsnat.impl.comp.ItsNatElementComponentImpl;
23: import org.w3c.dom.html.HTMLElement;
24:
25: /**
26: *
27: * @author jmarranz
28: */
29: public abstract class ItsNatHTMLElementComponentImpl extends
30: ItsNatElementComponentImpl implements
31: ItsNatHTMLElementComponent {
32:
33: /**
34: * Creates a new instance of ItsNatHTMLElementComponentImpl
35: */
36: public ItsNatHTMLElementComponentImpl(HTMLElement node,
37: NameValue[] artifacts,
38: ItsNatHTMLComponentManagerImpl componentMgr) {
39: super (node, artifacts, componentMgr);
40: }
41:
42: public Class getStructureClass() {
43: // Ninguno de los componentes hijos usa estructura a medida, ni siquiera
44: // los <select> pues la estructura es rígida incluyendo <option> que
45: // sólo admite texto como hijo
46: return null;
47: }
48:
49: public Object createDefaultStructure() {
50: return null;
51: }
52:
53: public ItsNatHTMLComponentManagerImpl getItsNatHTMLComponentManagerImpl() {
54: return (ItsNatHTMLComponentManagerImpl) componentMgr;
55: }
56:
57: public ItsNatHTMLComponentManager getItsNatHTMLComponentManager() {
58: return getItsNatHTMLComponentManagerImpl();
59: }
60:
61: public ItsNatHTMLElementComponentUI getItsNatHTMLElementComponentUI() {
62: return (ItsNatHTMLElementComponentUI) compUI;
63: }
64:
65: public ItsNatHTMLDocumentImpl getItsNatHTMLDocumentImpl() {
66: return getItsNatHTMLComponentManagerImpl()
67: .getItsNatHTMLDocumentImpl();
68: }
69:
70: public ItsNatHTMLDocument getItsNatHTMLDocument() {
71: return getItsNatHTMLDocumentImpl();
72: }
73:
74: public HTMLElement getHTMLElement() {
75: return (HTMLElement) getNode();
76: }
77: }
|