Source Code Cross Referenced for EPSheet.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » elementprocessor » impl » poi » hssf » elements » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements;
019:
020:        import org.apache.cocoon.components.elementprocessor.types.Attribute;
021:        import org.apache.cocoon.CascadingIOException;
022:        import org.apache.cocoon.components.elementprocessor.ElementProcessor;
023:        import org.apache.cocoon.components.elementprocessor.types.BooleanConverter;
024:        import org.apache.cocoon.components.elementprocessor.types.BooleanResult;
025:
026:        import java.io.IOException;
027:
028:        /**
029:         * No-op implementation of ElementProcessor to handle the "Sheet" tag
030:         *
031:         * This element contains other elements and has the following boolean
032:         * attributes:
033:         * <ul>
034:         * <li>DisplayFormulas
035:         * <li>HideZero
036:         * <li>HideGrid
037:         * <li>HideColHeader
038:         * <li>HideRowHeader
039:         * <li>DisplayOutlines
040:         * <li>OutlineSymbolsBelow
041:         * <li>OutlineSymbolsRight
042:         * </ul>
043:         *
044:         * @author Marc Johnson (marc_johnson27591@hotmail.com) 
045:         * @author Andrew C. Oliver (acoliver2@users.sourceforge.net)
046:         * @version CVS $Id: EPSheet.java 433543 2006-08-22 06:22:54Z crossley $
047:         */
048:        public class EPSheet extends BaseElementProcessor {
049:            private Sheet _sheet;
050:            private BooleanResult _display_formulas;
051:            private BooleanResult _hide_zero;
052:            private BooleanResult _hide_grid;
053:            private BooleanResult _hide_col_header;
054:            private BooleanResult _hide_row_header;
055:            private BooleanResult _display_outlines;
056:            private BooleanResult _outline_symbols_below;
057:            private BooleanResult _outline_symbols_right;
058:            private static final String _display_formulas_attribute = "DisplayFormulas";
059:            private static final String _hide_zero_attribute = "HideZero";
060:            private static final String _hide_grid_attribute = "HideGrid";
061:            private static final String _hide_col_header_attribute = "HideColHeader";
062:            private static final String _hide_row_header_attribute = "HideRowHeader";
063:            private static final String _display_outlines_attribute = "DisplayOutlines";
064:            private static final String _outline_symbols_below_attribute = "OutlineSymbolsBelow";
065:            private static final String _outline_symbols_right_attribute = "OutlineSymbolsRight";
066:
067:            /**
068:             * constructor
069:             */
070:
071:            public EPSheet() {
072:                super (null);
073:                _display_formulas = null;
074:                _hide_zero = null;
075:                _hide_grid = null;
076:                _hide_col_header = null;
077:                _hide_row_header = null;
078:                _display_outlines = null;
079:                _outline_symbols_below = null;
080:                _outline_symbols_right = null;
081:            }
082:
083:            /**
084:             * Override of Initialize() implementation
085:             * @param attributes the array of Attribute instances; may be empty, will
086:             *                  never be null
087:             * @param parent the parent ElementProcessor; may be null
088:             * @exception IOException if anything is wrong
089:             */
090:            public void initialize(final Attribute[] attributes,
091:                    final ElementProcessor parent) throws IOException {
092:                super .initialize(attributes, parent);
093:                try {
094:                    _sheet = new Sheet(getWorkbook());
095:                } catch (IOException e) {
096:                    throw e;
097:                } catch (Exception e) {
098:                    throw new CascadingIOException(e.getMessage(), e);
099:                }
100:            }
101:
102:            /**
103:             * override of endProcessing(). Reponsible for fixing style regions with
104:             * blank cells.
105:             * @exception IOException
106:             */
107:            public void endProcessing() throws IOException {
108:                _sheet.assignBlanksToRegions();
109:            }
110:
111:            /**
112:             * override of getSheet()
113:             * @return the sheet
114:             */
115:            protected Sheet getSheet() {
116:                return _sheet;
117:            }
118:
119:            /**
120:             * @return true if formulas should be displayed
121:             * @exception IOException if attribute is missing or malformed
122:             */
123:            public boolean getDisplayFormulas() throws IOException {
124:                if (_display_formulas == null) {
125:                    _display_formulas = BooleanConverter
126:                            .extractBoolean(getValue(_display_formulas_attribute));
127:                }
128:                return _display_formulas.booleanValue();
129:            }
130:
131:            /**
132:             * @return true if zeroes should be suppressed
133:             * @exception IOException if attribute is missing or malformed
134:             */
135:            public boolean getHideZero() throws IOException {
136:                if (_hide_zero == null) {
137:                    _hide_zero = BooleanConverter
138:                            .extractBoolean(getValue(_hide_zero_attribute));
139:                }
140:                return _hide_zero.booleanValue();
141:            }
142:
143:            /**
144:             * @return true if grid should be hidden
145:             * @exception IOException if attribute is missing or malformed
146:             */
147:            public boolean getHideGrid() throws IOException {
148:                if (_hide_grid == null) {
149:                    _hide_grid = BooleanConverter
150:                            .extractBoolean(getValue(_hide_grid_attribute));
151:                }
152:                return _hide_grid.booleanValue();
153:            }
154:
155:            /**
156:             * @return true if column headers should be hidden
157:             * @exception IOException if attribute is missing or malformed
158:             */
159:            public boolean getHideColHeader() throws IOException {
160:                if (_hide_col_header == null) {
161:                    _hide_col_header = BooleanConverter
162:                            .extractBoolean(getValue(_hide_col_header_attribute));
163:                }
164:                return _hide_col_header.booleanValue();
165:            }
166:
167:            /**
168:             * @return true if row headers should be hidden
169:             * @exception IOException if attribute is missing or malformed
170:             */
171:            public boolean getHideRowHeader() throws IOException {
172:                if (_hide_row_header == null) {
173:                    _hide_row_header = BooleanConverter
174:                            .extractBoolean(getValue(_hide_row_header_attribute));
175:                }
176:                return _hide_row_header.booleanValue();
177:            }
178:
179:            /**
180:             * @return true if outlines should be displayed
181:             * @exception IOException if attribute is missing or malformed
182:             */
183:            public boolean getDisplayOutlines() throws IOException {
184:                if (_display_outlines == null) {
185:                    _display_outlines = BooleanConverter
186:                            .extractBoolean(getValue(_display_outlines_attribute));
187:                }
188:                return _display_outlines.booleanValue();
189:            }
190:
191:            /**
192:             * @return true if outline symbols are below
193:             * @exception IOException if attribute is missing or malformed
194:             */
195:            public boolean getOutlineSymbolsBelow() throws IOException {
196:                if (_outline_symbols_below == null) {
197:                    _outline_symbols_below = BooleanConverter
198:                            .extractBoolean(getValue(_outline_symbols_below_attribute));
199:                }
200:                return _outline_symbols_below.booleanValue();
201:            }
202:
203:            /**
204:             * @return true if outline symbols are on the right
205:             * @exception IOException if attribute is missing or malformed
206:             */
207:            public boolean getOutlineSymbolsRight() throws IOException {
208:                if (_outline_symbols_right == null) {
209:                    _outline_symbols_right = BooleanConverter
210:                            .extractBoolean(getValue(_outline_symbols_right_attribute));
211:                }
212:                return _outline_symbols_right.booleanValue();
213:            }
214:        } // end public class EPSheet
w_ww__.___j__ava___2_s___.___co__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.