Source Code Cross Referenced for PDAppearanceCharacteristics.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 de.intarsys.pdf.cos.COSBasedObject;
033:        import de.intarsys.pdf.cos.COSName;
034:        import de.intarsys.pdf.cos.COSObject;
035:        import de.intarsys.pdf.cos.COSStream;
036:
037:        /**
038:         * More details on the appearance of an annotation.
039:         * 
040:         */
041:        public class PDAppearanceCharacteristics extends PDObject {
042:            /**
043:             * The meta class implementation
044:             */
045:            static public class MetaClass extends PDObject.MetaClass {
046:                protected MetaClass(Class instanceClass) {
047:                    super (instanceClass);
048:                }
049:
050:                protected COSBasedObject doCreateCOSBasedObject(COSObject object) {
051:                    return new PDAppearanceCharacteristics(object);
052:                }
053:
054:                protected boolean isIndirect() {
055:                    return false;
056:                }
057:            }
058:
059:            static public final COSName DK_AC = COSName.constant("AC"); //$NON-NLS-1$ 
060:
061:            static public final COSName DK_BC = COSName.constant("BC"); //$NON-NLS-1$ 
062:
063:            static public final COSName DK_BG = COSName.constant("BG"); //$NON-NLS-1$ 
064:
065:            static public final COSName DK_CA = COSName.constant("CA"); //$NON-NLS-1$ 
066:
067:            static public final COSName DK_I = COSName.constant("I"); //$NON-NLS-1$ 
068:
069:            static public final COSName DK_IF = COSName.constant("IF"); //$NON-NLS-1$
070:
071:            static public final COSName DK_IX = COSName.constant("IX"); //$NON-NLS-1$
072:
073:            static public final COSName DK_R = COSName.constant("R"); //$NON-NLS-1$
074:
075:            static public final COSName DK_RC = COSName.constant("RC"); //$NON-NLS-1$
076:
077:            static public final COSName DK_RI = COSName.constant("RI"); //$NON-NLS-1$
078:
079:            static public final int TP_CAPTION_ONLY = 0;
080:
081:            static public final int TP_ICON_ONLY = 1;
082:
083:            static public final int TP_CAPTION_BELOW_ICON = 2;
084:
085:            static public final int TP_CAPTION_ABOVE_ICON = 3;
086:
087:            static public final int TP_CAPTION_RIGHT_OF_ICON = 4;
088:
089:            static public final int TP_CAPTION_LEFT_OF_ICON = 5;
090:
091:            static public final int TP_CAPTION_OVERLAIS_ICON = 6;
092:
093:            /**
094:             * The name for the caption entry.
095:             * <p>
096:             * The name could have following values (not complete):
097:             * </p>
098:             * <ul>
099:             * <li>0: No icon, caption only
100:             * <li>1: No caption; icon only
101:             * <li>2: Caption below the icon
102:             * <li>3: Caption above the icon
103:             * <li>4: Caption to the right of the icon
104:             * <li>5: Caption to the left of the icon
105:             * <li>6: Caption overlaid directly on the icon
106:             * </ul>
107:             */
108:            static public final COSName DK_TP = COSName.constant("TP"); //$NON-NLS-1$
109:
110:            /** The meta class instance */
111:            static public final MetaClass META = new MetaClass(MetaClass.class
112:                    .getDeclaringClass());
113:
114:            protected PDAppearanceCharacteristics(COSObject object) {
115:                super (object);
116:            }
117:
118:            public float[] getBackgroundColor() {
119:                return getFieldFixedArray(DK_BG, null);
120:            }
121:
122:            public float[] getBorderColor() {
123:                return getFieldFixedArray(DK_BC, null);
124:            }
125:
126:            public String getDownCaption() {
127:                return getFieldString(DK_AC, null);
128:            }
129:
130:            public COSStream cosGetDownIcon() {
131:                return cosGetField(DK_IX).asStream();
132:            }
133:
134:            public PDIconFit getIconFit() {
135:                COSObject cosObject = cosGetField(DK_IF);
136:                if (cosObject.isNull()) {
137:                    return null;
138:                }
139:                return (PDIconFit) PDIconFit.META.createFromCos(cosObject);
140:            }
141:
142:            public String getNormalCaption() {
143:                return getFieldString(DK_CA, null);
144:            }
145:
146:            public COSStream cosGetNormalIcon() {
147:                return cosGetField(DK_I).asStream();
148:            }
149:
150:            public int getTextPosition() {
151:                return getFieldInt(DK_TP, TP_CAPTION_ONLY);
152:            }
153:
154:            public String getRolloverCaption() {
155:                return getFieldString(DK_RC, null);
156:            }
157:
158:            public COSStream cosGetRolloverIcon() {
159:                return cosGetField(DK_RI).asStream();
160:            }
161:
162:            public int getRotation() {
163:                return getFieldInt(DK_R, 0);
164:            }
165:
166:            public void setBackgroundColor(float[] newBackgroundColor) {
167:                setFieldFixedArray(DK_BG, newBackgroundColor);
168:            }
169:
170:            public void setBorderColor(float[] newBorderColor) {
171:                setFieldFixedArray(DK_BC, newBorderColor);
172:            }
173:
174:            public void setDownCaption(String newDownCaption) {
175:                setFieldString(DK_AC, newDownCaption);
176:            }
177:
178:            public COSStream cosSetDownIcon(COSStream newDownIcon) {
179:                return cosSetField(DK_IX, newDownIcon).asStream();
180:            }
181:
182:            public void setIconFit(PDIconFit newIconFit) {
183:                setFieldObject(DK_IF, newIconFit);
184:            }
185:
186:            public void setNormalCaption(String newNormalCaption) {
187:                setFieldString(DK_CA, newNormalCaption);
188:            }
189:
190:            public COSStream cosSetNormalIcon(COSStream newNormalIcon) {
191:                return cosSetField(DK_I, newNormalIcon).asStream();
192:            }
193:
194:            public void setTextPosition(int newPositionTextIcon) {
195:                if (newPositionTextIcon != TP_CAPTION_ONLY) { // default
196:                    setFieldInt(DK_TP, newPositionTextIcon);
197:                } else {
198:                    cosRemoveField(DK_TP);
199:                }
200:            }
201:
202:            public void setRolloverCaption(String newRolloverCaption) {
203:                setFieldString(DK_RC, newRolloverCaption);
204:            }
205:
206:            public COSStream cosSetRolloverIcon(COSStream newRolloverIcon) {
207:                return cosSetField(DK_RI, newRolloverIcon).asStream();
208:            }
209:
210:            public void setRotation(int newRotation) {
211:                if (newRotation != 0) {
212:                    setFieldInt(DK_R, newRotation);
213:                } else {
214:                    cosRemoveField(DK_R);
215:                }
216:            }
217:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.