Source Code Cross Referenced for CategorySeriesAxisRecord.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:         * This record refers to a category or series axis and is used to specify label/tickmark frequency.
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 CategorySeriesAxisRecord extends Record {
030:            public final static short sid = 0x1020;
031:            private short field_1_crossingPoint;
032:            private short field_2_labelFrequency;
033:            private short field_3_tickMarkFrequency;
034:            private short field_4_options;
035:            private BitField valueAxisCrossing = BitFieldFactory
036:                    .getInstance(0x1);
037:            private BitField crossesFarRight = BitFieldFactory.getInstance(0x2);
038:            private BitField reversed = BitFieldFactory.getInstance(0x4);
039:
040:            public CategorySeriesAxisRecord() {
041:
042:            }
043:
044:            /**
045:             * Constructs a CategorySeriesAxis record and sets its fields appropriately.
046:             *
047:             * @param in the RecordInputstream to read the record from
048:             */
049:
050:            public CategorySeriesAxisRecord(RecordInputStream in) {
051:                super (in);
052:
053:            }
054:
055:            /**
056:             * Checks the sid matches the expected side for this record
057:             *
058:             * @param id   the expected sid.
059:             */
060:            protected void validateSid(short id) {
061:                if (id != sid) {
062:                    throw new RecordFormatException(
063:                            "Not a CategorySeriesAxis record");
064:                }
065:            }
066:
067:            protected void fillFields(RecordInputStream in) {
068:                field_1_crossingPoint = in.readShort();
069:                field_2_labelFrequency = in.readShort();
070:                field_3_tickMarkFrequency = in.readShort();
071:                field_4_options = in.readShort();
072:            }
073:
074:            public String toString() {
075:                StringBuffer buffer = new StringBuffer();
076:
077:                buffer.append("[CATSERRANGE]\n");
078:                buffer.append("    .crossingPoint        = ").append("0x")
079:                        .append(HexDump.toHex(getCrossingPoint())).append(" (")
080:                        .append(getCrossingPoint()).append(" )");
081:                buffer.append(System.getProperty("line.separator"));
082:                buffer.append("    .labelFrequency       = ").append("0x")
083:                        .append(HexDump.toHex(getLabelFrequency()))
084:                        .append(" (").append(getLabelFrequency()).append(" )");
085:                buffer.append(System.getProperty("line.separator"));
086:                buffer.append("    .tickMarkFrequency    = ").append("0x")
087:                        .append(HexDump.toHex(getTickMarkFrequency())).append(
088:                                " (").append(getTickMarkFrequency()).append(
089:                                " )");
090:                buffer.append(System.getProperty("line.separator"));
091:                buffer.append("    .options              = ").append("0x")
092:                        .append(HexDump.toHex(getOptions())).append(" (")
093:                        .append(getOptions()).append(" )");
094:                buffer.append(System.getProperty("line.separator"));
095:                buffer.append("         .valueAxisCrossing        = ").append(
096:                        isValueAxisCrossing()).append('\n');
097:                buffer.append("         .crossesFarRight          = ").append(
098:                        isCrossesFarRight()).append('\n');
099:                buffer.append("         .reversed                 = ").append(
100:                        isReversed()).append('\n');
101:
102:                buffer.append("[/CATSERRANGE]\n");
103:                return buffer.toString();
104:            }
105:
106:            public int serialize(int offset, byte[] data) {
107:                int pos = 0;
108:
109:                LittleEndian.putShort(data, 0 + offset, sid);
110:                LittleEndian.putShort(data, 2 + offset,
111:                        (short) (getRecordSize() - 4));
112:
113:                LittleEndian.putShort(data, 4 + offset + pos,
114:                        field_1_crossingPoint);
115:                LittleEndian.putShort(data, 6 + offset + pos,
116:                        field_2_labelFrequency);
117:                LittleEndian.putShort(data, 8 + offset + pos,
118:                        field_3_tickMarkFrequency);
119:                LittleEndian.putShort(data, 10 + offset + pos, field_4_options);
120:
121:                return getRecordSize();
122:            }
123:
124:            /**
125:             * Size of record (exluding 4 byte header)
126:             */
127:            public int getRecordSize() {
128:                return 4 + 2 + 2 + 2 + 2;
129:            }
130:
131:            public short getSid() {
132:                return sid;
133:            }
134:
135:            public Object clone() {
136:                CategorySeriesAxisRecord rec = new CategorySeriesAxisRecord();
137:
138:                rec.field_1_crossingPoint = field_1_crossingPoint;
139:                rec.field_2_labelFrequency = field_2_labelFrequency;
140:                rec.field_3_tickMarkFrequency = field_3_tickMarkFrequency;
141:                rec.field_4_options = field_4_options;
142:                return rec;
143:            }
144:
145:            /**
146:             * Get the crossing point field for the CategorySeriesAxis record.
147:             */
148:            public short getCrossingPoint() {
149:                return field_1_crossingPoint;
150:            }
151:
152:            /**
153:             * Set the crossing point field for the CategorySeriesAxis record.
154:             */
155:            public void setCrossingPoint(short field_1_crossingPoint) {
156:                this .field_1_crossingPoint = field_1_crossingPoint;
157:            }
158:
159:            /**
160:             * Get the label frequency field for the CategorySeriesAxis record.
161:             */
162:            public short getLabelFrequency() {
163:                return field_2_labelFrequency;
164:            }
165:
166:            /**
167:             * Set the label frequency field for the CategorySeriesAxis record.
168:             */
169:            public void setLabelFrequency(short field_2_labelFrequency) {
170:                this .field_2_labelFrequency = field_2_labelFrequency;
171:            }
172:
173:            /**
174:             * Get the tick mark frequency field for the CategorySeriesAxis record.
175:             */
176:            public short getTickMarkFrequency() {
177:                return field_3_tickMarkFrequency;
178:            }
179:
180:            /**
181:             * Set the tick mark frequency field for the CategorySeriesAxis record.
182:             */
183:            public void setTickMarkFrequency(short field_3_tickMarkFrequency) {
184:                this .field_3_tickMarkFrequency = field_3_tickMarkFrequency;
185:            }
186:
187:            /**
188:             * Get the options field for the CategorySeriesAxis record.
189:             */
190:            public short getOptions() {
191:                return field_4_options;
192:            }
193:
194:            /**
195:             * Set the options field for the CategorySeriesAxis record.
196:             */
197:            public void setOptions(short field_4_options) {
198:                this .field_4_options = field_4_options;
199:            }
200:
201:            /**
202:             * Sets the value axis crossing field value.
203:             * set true to indicate axis crosses between categories and false to cross axis midway
204:             */
205:            public void setValueAxisCrossing(boolean value) {
206:                field_4_options = valueAxisCrossing.setShortBoolean(
207:                        field_4_options, value);
208:            }
209:
210:            /**
211:             * set true to indicate axis crosses between categories and false to cross axis midway
212:             * @return  the value axis crossing field value.
213:             */
214:            public boolean isValueAxisCrossing() {
215:                return valueAxisCrossing.isSet(field_4_options);
216:            }
217:
218:            /**
219:             * Sets the crosses far right field value.
220:             * axis crosses at the far right
221:             */
222:            public void setCrossesFarRight(boolean value) {
223:                field_4_options = crossesFarRight.setShortBoolean(
224:                        field_4_options, value);
225:            }
226:
227:            /**
228:             * axis crosses at the far right
229:             * @return  the crosses far right field value.
230:             */
231:            public boolean isCrossesFarRight() {
232:                return crossesFarRight.isSet(field_4_options);
233:            }
234:
235:            /**
236:             * Sets the reversed field value.
237:             * categories are displayed in reverse order
238:             */
239:            public void setReversed(boolean value) {
240:                field_4_options = reversed.setShortBoolean(field_4_options,
241:                        value);
242:            }
243:
244:            /**
245:             * categories are displayed in reverse order
246:             * @return  the reversed field value.
247:             */
248:            public boolean isReversed() {
249:                return reversed.isSet(field_4_options);
250:            }
251:
252:        } // 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.