Source Code Cross Referenced for SheetPropertiesRecord.java in  » Collaboration » poi-3.0.2-beta2 » org » apache » poi » hssf » record » 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 » Collaboration » poi 3.0.2 beta2 » org.apache.poi.hssf.record 
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.poi.hssf.record;
019:
020:        import org.apache.poi.util.*;
021:
022:        /**
023:         * Describes a chart sheet properties record.
024:         * NOTE: This source is automatically generated please do not modify this file.  Either subclass or
025:         *       remove the record in src/records/definitions.
026:
027:         * @author Glen Stampoultzis (glens at apache.org)
028:         */
029:        public class SheetPropertiesRecord extends Record {
030:            public final static short sid = 0x1044;
031:            private short field_1_flags;
032:            private BitField chartTypeManuallyFormatted = BitFieldFactory
033:                    .getInstance(0x1);
034:            private BitField plotVisibleOnly = BitFieldFactory.getInstance(0x2);
035:            private BitField doNotSizeWithWindow = BitFieldFactory
036:                    .getInstance(0x4);
037:            private BitField defaultPlotDimensions = BitFieldFactory
038:                    .getInstance(0x8);
039:            private BitField autoPlotArea = BitFieldFactory.getInstance(0x10);
040:            private byte field_2_empty;
041:            public final static byte EMPTY_NOT_PLOTTED = 0;
042:            public final static byte EMPTY_ZERO = 1;
043:            public final static byte EMPTY_INTERPOLATED = 2;
044:
045:            public SheetPropertiesRecord() {
046:
047:            }
048:
049:            /**
050:             * Constructs a SheetProperties record and sets its fields appropriately.
051:             *
052:             * @param in the RecordInputstream to read the record from
053:             */
054:
055:            public SheetPropertiesRecord(RecordInputStream in) {
056:                super (in);
057:
058:            }
059:
060:            /**
061:             * Checks the sid matches the expected side for this record
062:             *
063:             * @param id   the expected sid.
064:             */
065:            protected void validateSid(short id) {
066:                if (id != sid) {
067:                    throw new RecordFormatException(
068:                            "Not a SheetProperties record");
069:                }
070:            }
071:
072:            protected void fillFields(RecordInputStream in) {
073:                field_1_flags = in.readShort();
074:                field_2_empty = in.readByte();
075:            }
076:
077:            public String toString() {
078:                StringBuffer buffer = new StringBuffer();
079:
080:                buffer.append("[SHTPROPS]\n");
081:                buffer.append("    .flags                = ").append("0x")
082:                        .append(HexDump.toHex(getFlags())).append(" (").append(
083:                                getFlags()).append(" )");
084:                buffer.append(System.getProperty("line.separator"));
085:                buffer.append("         .chartTypeManuallyFormatted     = ")
086:                        .append(isChartTypeManuallyFormatted()).append('\n');
087:                buffer.append("         .plotVisibleOnly          = ").append(
088:                        isPlotVisibleOnly()).append('\n');
089:                buffer.append("         .doNotSizeWithWindow      = ").append(
090:                        isDoNotSizeWithWindow()).append('\n');
091:                buffer.append("         .defaultPlotDimensions     = ").append(
092:                        isDefaultPlotDimensions()).append('\n');
093:                buffer.append("         .autoPlotArea             = ").append(
094:                        isAutoPlotArea()).append('\n');
095:                buffer.append("    .empty                = ").append("0x")
096:                        .append(HexDump.toHex(getEmpty())).append(" (").append(
097:                                getEmpty()).append(" )");
098:                buffer.append(System.getProperty("line.separator"));
099:
100:                buffer.append("[/SHTPROPS]\n");
101:                return buffer.toString();
102:            }
103:
104:            public int serialize(int offset, byte[] data) {
105:                int pos = 0;
106:
107:                LittleEndian.putShort(data, 0 + offset, sid);
108:                LittleEndian.putShort(data, 2 + offset,
109:                        (short) (getRecordSize() - 4));
110:
111:                LittleEndian.putShort(data, 4 + offset + pos, field_1_flags);
112:                data[6 + offset + pos] = field_2_empty;
113:
114:                return getRecordSize();
115:            }
116:
117:            /**
118:             * Size of record (exluding 4 byte header)
119:             */
120:            public int getRecordSize() {
121:                return 4 + 2 + 1;
122:            }
123:
124:            public short getSid() {
125:                return sid;
126:            }
127:
128:            public Object clone() {
129:                SheetPropertiesRecord rec = new SheetPropertiesRecord();
130:
131:                rec.field_1_flags = field_1_flags;
132:                rec.field_2_empty = field_2_empty;
133:                return rec;
134:            }
135:
136:            /**
137:             * Get the flags field for the SheetProperties record.
138:             */
139:            public short getFlags() {
140:                return field_1_flags;
141:            }
142:
143:            /**
144:             * Set the flags field for the SheetProperties record.
145:             */
146:            public void setFlags(short field_1_flags) {
147:                this .field_1_flags = field_1_flags;
148:            }
149:
150:            /**
151:             * Get the empty field for the SheetProperties record.
152:             *
153:             * @return  One of 
154:             *        EMPTY_NOT_PLOTTED
155:             *        EMPTY_ZERO
156:             *        EMPTY_INTERPOLATED
157:             */
158:            public byte getEmpty() {
159:                return field_2_empty;
160:            }
161:
162:            /**
163:             * Set the empty field for the SheetProperties record.
164:             *
165:             * @param field_2_empty
166:             *        One of 
167:             *        EMPTY_NOT_PLOTTED
168:             *        EMPTY_ZERO
169:             *        EMPTY_INTERPOLATED
170:             */
171:            public void setEmpty(byte field_2_empty) {
172:                this .field_2_empty = field_2_empty;
173:            }
174:
175:            /**
176:             * Sets the chart type manually formatted field value.
177:             * Has the chart type been manually formatted?
178:             */
179:            public void setChartTypeManuallyFormatted(boolean value) {
180:                field_1_flags = chartTypeManuallyFormatted.setShortBoolean(
181:                        field_1_flags, value);
182:            }
183:
184:            /**
185:             * Has the chart type been manually formatted?
186:             * @return  the chart type manually formatted field value.
187:             */
188:            public boolean isChartTypeManuallyFormatted() {
189:                return chartTypeManuallyFormatted.isSet(field_1_flags);
190:            }
191:
192:            /**
193:             * Sets the plot visible only field value.
194:             * Only show visible cells on the chart.
195:             */
196:            public void setPlotVisibleOnly(boolean value) {
197:                field_1_flags = plotVisibleOnly.setShortBoolean(field_1_flags,
198:                        value);
199:            }
200:
201:            /**
202:             * Only show visible cells on the chart.
203:             * @return  the plot visible only field value.
204:             */
205:            public boolean isPlotVisibleOnly() {
206:                return plotVisibleOnly.isSet(field_1_flags);
207:            }
208:
209:            /**
210:             * Sets the do not size with window field value.
211:             * Do not size the chart when the window changes size
212:             */
213:            public void setDoNotSizeWithWindow(boolean value) {
214:                field_1_flags = doNotSizeWithWindow.setShortBoolean(
215:                        field_1_flags, value);
216:            }
217:
218:            /**
219:             * Do not size the chart when the window changes size
220:             * @return  the do not size with window field value.
221:             */
222:            public boolean isDoNotSizeWithWindow() {
223:                return doNotSizeWithWindow.isSet(field_1_flags);
224:            }
225:
226:            /**
227:             * Sets the default plot dimensions field value.
228:             * Indicates that the default area dimensions should be used.
229:             */
230:            public void setDefaultPlotDimensions(boolean value) {
231:                field_1_flags = defaultPlotDimensions.setShortBoolean(
232:                        field_1_flags, value);
233:            }
234:
235:            /**
236:             * Indicates that the default area dimensions should be used.
237:             * @return  the default plot dimensions field value.
238:             */
239:            public boolean isDefaultPlotDimensions() {
240:                return defaultPlotDimensions.isSet(field_1_flags);
241:            }
242:
243:            /**
244:             * Sets the auto plot area field value.
245:             * ??
246:             */
247:            public void setAutoPlotArea(boolean value) {
248:                field_1_flags = autoPlotArea.setShortBoolean(field_1_flags,
249:                        value);
250:            }
251:
252:            /**
253:             * ??
254:             * @return  the auto plot area field value.
255:             */
256:            public boolean isAutoPlotArea() {
257:                return autoPlotArea.isSet(field_1_flags);
258:            }
259:
260:        } // END OF CLASS
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.