Source Code Cross Referenced for ItsNatListBasedUIImpl.java in  » Ajax » ItsNat » org » itsnat » impl » comp » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » ItsNat » org.itsnat.impl.comp.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:          ItsNat Java Web Application Framework
003:          Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
004:          Author: Jose Maria Arranz Santamaria
005:
006:          This program is free software: you can redistribute it and/or modify
007:          it under the terms of the GNU Affero General Public License as published by
008:          the Free Software Foundation, either version 3 of the License, or
009:          (at your option) any later version. See the GNU Affero General Public 
010:          License for more details. See the copy of the GNU Affero General Public License
011:          included in this program. If not, see <http://www.gnu.org/licenses/>.
012:         */
013:
014:        package org.itsnat.impl.comp.ui;
015:
016:        import org.itsnat.comp.ItsNatList;
017:        import org.itsnat.comp.ItsNatListCellRenderer;
018:        import org.itsnat.comp.ui.ItsNatListCellUI;
019:        import org.itsnat.comp.ui.ItsNatListUI;
020:        import org.itsnat.core.ItsNatException;
021:        import org.itsnat.impl.comp.ItsNatElementComponentImpl;
022:        import org.itsnat.impl.core.domutil.ElementListImpl;
023:        import org.itsnat.impl.core.domutil.ListElementInfoMasterImpl;
024:        import org.w3c.dom.Element;
025:        import org.w3c.dom.Node;
026:
027:        /**
028:         *
029:         * @author jmarranz
030:         */
031:        public abstract class ItsNatListBasedUIImpl extends
032:                ItsNatElementComponentUIImpl {
033:            protected ElementListImpl elementList;
034:
035:            /**
036:             * Creates a new instance of ItsNatListBasedUIImpl
037:             */
038:            public ItsNatListBasedUIImpl(ItsNatElementComponentImpl parentComp) {
039:                super (parentComp);
040:            }
041:
042:            public void setNewElementValueAt(int index, Object anObject,
043:                    Element optionElem) {
044:                // Está siendo creado el objeto, por tanto no está seleccionado por defecto (y del foco no nos ocupamos: false)
045:                setElementValueAt(index, anObject, false, false, optionElem,
046:                        true);
047:            }
048:
049:            public abstract Element getContentElementAt(int index);
050:
051:            protected Element getContentElementAtBase(int index) {
052:                Element optionElem = getElementAt(index);
053:                if (optionElem == null)
054:                    return null;
055:                return getContentElementAt(index, optionElem);
056:            }
057:
058:            public abstract Element getContentElementAt(int index,
059:                    Element optionElem);
060:
061:            public abstract void setElementValueAt(int index, Object anObject,
062:                    boolean isSelected, boolean cellHasFocus,
063:                    Element optionElem, boolean isNew);
064:
065:            public abstract void setElementValueAt(int index, Object anObject,
066:                    boolean isSelected, boolean cellHasFocus);
067:
068:            protected void setElementValueAtBase(int index, Object anObject,
069:                    boolean isSelected, boolean cellHasFocus) {
070:                Element optionElem = getElementAt(index);
071:                if (optionElem == null)
072:                    throw new ItsNatException("Index out of bounds: " + index);
073:                setElementValueAt(index, anObject, isSelected, cellHasFocus,
074:                        optionElem, false);
075:            }
076:
077:            public abstract boolean isEmpty();
078:
079:            protected boolean isEmptyBase() {
080:                return elementList.isEmpty();
081:            }
082:
083:            public abstract int getLength();
084:
085:            protected int getLengthBase() {
086:                return elementList.getLength();
087:            }
088:
089:            public abstract void setLength(int len);
090:
091:            protected void setLengthBase(int len) {
092:                elementList.setLength(len);
093:            }
094:
095:            public abstract Element getElementAt(int index);
096:
097:            protected Element getElementAtBase(int index) {
098:                return elementList.getElementAt(index);
099:            }
100:
101:            public abstract ItsNatListBasedCellUIImpl createItsNatListCellUI(
102:                    ListElementInfoMasterImpl elementInfo);
103:
104:            public ItsNatListBasedCellUIImpl getItsNatListBasedCellUI(
105:                    ListElementInfoMasterImpl elementInfo) {
106:                if (elementInfo == null)
107:                    return null;
108:
109:                ItsNatListBasedCellUIImpl elementUI = (ItsNatListBasedCellUIImpl) elementInfo
110:                        .getAuxObject();
111:                if (elementUI == null) {
112:                    elementUI = createItsNatListCellUI(elementInfo);
113:                    elementInfo.setAuxObject(elementUI);
114:                }
115:                return elementUI;
116:            }
117:
118:            public ItsNatListBasedCellUIImpl getItsNatListBasedCellUIAt(
119:                    int index) {
120:                ListElementInfoMasterImpl elemInfo = (ListElementInfoMasterImpl) elementList
121:                        .getListElementInfoAt(index);
122:                return getItsNatListBasedCellUI(elemInfo);
123:            }
124:
125:            public ItsNatListBasedCellUIImpl getItsNatListBasedCellUIFromNode(
126:                    Node node) {
127:                ListElementInfoMasterImpl elemInfo = (ListElementInfoMasterImpl) elementList
128:                        .getListElementInfoFromNode(node);
129:                return getItsNatListBasedCellUI(elemInfo);
130:            }
131:
132:            public abstract Element insertElementAt(int index, Object anObject);
133:
134:            protected Element insertElementAtBase(int index, Object anObject) {
135:                Element newElem = elementList.insertElementAt(index);
136:                setNewElementValueAt(index, anObject, newElem);
137:                return newElem;
138:            }
139:
140:            public abstract Element removeElementAt(int index);
141:
142:            protected Element removeElementAtBase(int index) {
143:                return elementList.removeElementAt(index);
144:            }
145:
146:            public abstract void removeElementRange(int fromIndex, int toIndex);
147:
148:            protected void removeElementRangeBase(int fromIndex, int toIndex) {
149:                elementList.removeElementRange(fromIndex, toIndex);
150:            }
151:
152:            public abstract void removeAllElements();
153:
154:            protected void removeAllElementsBase() {
155:                elementList.removeAllElements();
156:            }
157:
158:            public abstract boolean isUsePatternMarkupToRender();
159:
160:            protected boolean isUsePatternMarkupToRenderBase() {
161:                return elementList.isUsePatternMarkupToRender();
162:            }
163:
164:            public abstract void setUsePatternMarkupToRender(boolean value);
165:
166:            protected void setUsePatternMarkupToRenderBase(boolean value) {
167:                elementList.setUsePatternMarkupToRender(value);
168:            }
169:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.