Source Code Cross Referenced for AcroFormFieldFlags.java in  » PDF » jPod » de » intarsys » pdf » pd » 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 » PDF » jPod » de.intarsys.pdf.pd 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 2007, intarsys consulting GmbH
003:         *
004:         * Redistribution and use in source and binary forms, with or without
005:         * modification, are permitted provided that the following conditions are met:
006:         *
007:         * - Redistributions of source code must retain the above copyright notice,
008:         *   this list of conditions and the following disclaimer.
009:         *
010:         * - Redistributions in binary form must reproduce the above copyright notice,
011:         *   this list of conditions and the following disclaimer in the documentation
012:         *   and/or other materials provided with the distribution.
013:         *
014:         * - Neither the name of intarsys nor the names of its contributors may be used
015:         *   to endorse or promote products derived from this software without specific
016:         *   prior written permission.
017:         *
018:         * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
019:         * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
020:         * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
021:         * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
022:         * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
023:         * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
024:         * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
025:         * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
026:         * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
027:         * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
028:         * POSSIBILITY OF SUCH DAMAGE.
029:         */
030:        package de.intarsys.pdf.pd;
031:
032:        import java.util.Iterator;
033:
034:        /**
035:         * The flags of a field in an acrobat form.
036:         * <p>
037:         * The flags are bits of an integer.<br>
038:         * The following bits are defined (more may exist).
039:         * </p>
040:         * <ul>
041:         * <li>0: default
042:         * <li>1: Readonly
043:         * <li>2: Required
044:         * <li>3: NoExport
045:         * <li>13: Multiline
046:         * <li>14: Password
047:         * <li>15: NoToggleToOff
048:         * <li>16: Radio
049:         * <li>17: Pushbutton
050:         * <li>18: Combo
051:         * <li>19: Edit
052:         * <li>20: Sort
053:         * <li>21: FileSelect
054:         * <li>22: MulitSelect
055:         * <li>23: DoNotSpellChec
056:         * <li>24: DoNotScroll
057:         * <li>25: Comb
058:         * <li>26: RadiosInUnison
059:         * <li>27: CommitOnSelChange
060:         * <li>28: RichText
061:         * </ul>
062:         */
063:        public class AcroFormFieldFlags extends AbstractBitFlags {
064:            final public static int Bit_ReadOnly = 1; // Bit position 1
065:
066:            final public static int Bit_Required = 1 << 1; // Bit position 2
067:
068:            final public static int Bit_NoExport = 1 << 2; // Bit position 3
069:
070:            final public static int Bit_Multiline = 1 << 12;
071:
072:            final public static int Bit_Password = 1 << 13;
073:
074:            final public static int Bit_NoToggleToOff = 1 << 14;
075:
076:            final public static int Bit_Radio = 1 << 15;
077:
078:            final public static int Bit_Pushbutton = 1 << 16;
079:
080:            final public static int Bit_Combo = 1 << 17;
081:
082:            final public static int Bit_Edit = 1 << 18;
083:
084:            final public static int Bit_Sort = 1 << 19;
085:
086:            final public static int Bit_FileSelect = 1 << 20;
087:
088:            final public static int Bit_MultiSelect = 1 << 21;
089:
090:            final public static int Bit_DoNotSpellCheck = 1 << 22;
091:
092:            final public static int Bit_DoNotScroll = 1 << 23;
093:
094:            final public static int Bit_Comb = 1 << 24;
095:
096:            final public static int Bit_RadiosInUnison = 1 << 25;
097:
098:            final public static int Bit_CommitOnSelChange = 1 << 26;
099:
100:            final public static int Bit_RichText = 1 << 27;
101:
102:            private PDAcroFormField field;
103:
104:            public AcroFormFieldFlags(PDAcroFormField field) {
105:                this .field = field;
106:            }
107:
108:            public void setCombo(boolean f) {
109:                set(Bit_Combo, f);
110:            }
111:
112:            public boolean isCombo() {
113:                return isSetAnd(Bit_Combo);
114:            }
115:
116:            public boolean isEdit() {
117:                return isSetAnd(Bit_Edit);
118:            }
119:
120:            public void setEdit(boolean edit) {
121:                set(Bit_Edit, edit);
122:            }
123:
124:            public boolean isCommitOnSelChange() {
125:                return isSetAnd(Bit_CommitOnSelChange);
126:            }
127:
128:            public void setCommitOnSelChange(boolean f) {
129:                set(Bit_CommitOnSelChange, f);
130:            }
131:
132:            public void setDoNotScroll(boolean f) {
133:                set(Bit_DoNotScroll, f);
134:            }
135:
136:            public void setComb(boolean f) {
137:                set(Bit_Comb, f);
138:            }
139:
140:            public boolean isDoNotScroll() {
141:                return isSetAnd(Bit_DoNotScroll);
142:            }
143:
144:            public boolean isComb() {
145:                return isSetAnd(Bit_Comb);
146:            }
147:
148:            public boolean isMultiSelect() {
149:                return isSetAnd(Bit_MultiSelect);
150:            }
151:
152:            public void setMultiSelect(boolean multiSelect) {
153:                set(Bit_MultiSelect, multiSelect);
154:            }
155:
156:            public void setMultiline(boolean f) {
157:                set(Bit_Multiline, f);
158:            }
159:
160:            public boolean isMultiline() {
161:                return isSetAnd(Bit_Multiline);
162:            }
163:
164:            public boolean isPassword() {
165:                return isSetAnd(Bit_Password);
166:            }
167:
168:            public boolean isFileSelect() {
169:                return isSetAnd(Bit_FileSelect);
170:            }
171:
172:            public void setNoExport(boolean f) {
173:                set(Bit_NoExport, f);
174:            }
175:
176:            public boolean isNoExport() {
177:                return isSetAnd(Bit_NoExport);
178:            }
179:
180:            public boolean isNoToggleOff() {
181:                return isSetAnd(Bit_NoToggleToOff);
182:            }
183:
184:            public void setNoToggleToOff(boolean noToggleToOff) {
185:                set(Bit_NoToggleToOff, noToggleToOff);
186:            }
187:
188:            public void setPushbutton(boolean f) {
189:                set(Bit_Pushbutton, f);
190:            }
191:
192:            public boolean isPushbutton() {
193:                return isSetAnd(Bit_Pushbutton);
194:            }
195:
196:            public void setPassword(boolean f) {
197:                set(Bit_Password, f);
198:            }
199:
200:            public void setFileSelect(boolean f) {
201:                set(Bit_FileSelect, f);
202:            }
203:
204:            public void setRadio(boolean f) {
205:                set(Bit_Radio, f);
206:            }
207:
208:            public boolean isRadio() {
209:                return isSetAnd(Bit_Radio);
210:            }
211:
212:            public boolean isRadiosInUnison() {
213:                return isSetAnd(Bit_RadiosInUnison);
214:            }
215:
216:            public void setReadOnly(boolean f) {
217:                set(Bit_ReadOnly, f);
218:            }
219:
220:            public void setRequired(boolean f) {
221:                set(Bit_Required, f);
222:            }
223:
224:            public boolean isReadOnly() {
225:                return isSetAnd(Bit_ReadOnly);
226:            }
227:
228:            public boolean isRequired() {
229:                return isSetAnd(Bit_Required);
230:            }
231:
232:            public int getValue() {
233:                return getField().basicGetFieldFlags();
234:            }
235:
236:            protected PDAcroFormField getField() {
237:                return field;
238:            }
239:
240:            protected void setValue(int newFlags) {
241:                getField().basicSetFieldFlags(newFlags);
242:            }
243:
244:            /*
245:             * (non-Javadoc)
246:             * 
247:             * @see de.intarsys.pdf.pd.AbstractBitFlags#set(int, boolean)
248:             */
249:            protected void set(int bitMask, boolean flag) {
250:                super .set(bitMask, flag);
251:                if (getField().getKids() != null) {
252:                    for (Iterator i = getField().getKids().iterator(); i
253:                            .hasNext();) {
254:                        PDAcroFormField kid = (PDAcroFormField) i.next();
255:                        kid.getFieldFlags().set(bitMask, flag);
256:                    }
257:                }
258:            }
259:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.