Source Code Cross Referenced for PageNumber.java in  » Graphic-Library » fop » org » apache » fop » fo » flow » 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 » Graphic Library » fop » org.apache.fop.fo.flow 
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:        /* $Id: PageNumber.java 554094 2007-07-07 00:04:25Z adelmelle $ */
019:
020:        package org.apache.fop.fo.flow;
021:
022:        import java.awt.Color;
023:
024:        import org.xml.sax.Locator;
025:
026:        import org.apache.fop.apps.FOPException;
027:        import org.apache.fop.datatypes.Length;
028:        import org.apache.fop.fo.Constants;
029:        import org.apache.fop.fo.FONode;
030:        import org.apache.fop.fo.FObj;
031:        import org.apache.fop.fo.PropertyList;
032:        import org.apache.fop.fo.ValidationException;
033:        import org.apache.fop.fo.properties.CommonAccessibility;
034:        import org.apache.fop.fo.properties.CommonAural;
035:        import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
036:        import org.apache.fop.fo.properties.CommonFont;
037:        import org.apache.fop.fo.properties.CommonMarginInline;
038:        import org.apache.fop.fo.properties.CommonRelativePosition;
039:        import org.apache.fop.fo.properties.CommonTextDecoration;
040:        import org.apache.fop.fo.properties.KeepProperty;
041:        import org.apache.fop.fo.properties.SpaceProperty;
042:
043:        /**
044:         * Class modelling the fo:page-number object.
045:         */
046:        public class PageNumber extends FObj {
047:            // The value of properties relevant for fo:page-number.
048:            private CommonBorderPaddingBackground commonBorderPaddingBackground;
049:            private CommonFont commonFont;
050:            private Length alignmentAdjust;
051:            private int alignmentBaseline;
052:            private Length baselineShift;
053:            private int dominantBaseline;
054:            // private ToBeImplementedProperty letterSpacing;
055:            private SpaceProperty lineHeight;
056:            /** Holds the text decoration values. May be null */
057:            private CommonTextDecoration textDecoration;
058:            // private ToBeImplementedProperty textShadow;
059:            // Unused but valid items, commented out for performance:
060:            //     private CommonAccessibility commonAccessibility;
061:            //     private CommonAural commonAural;
062:            //     private CommonMarginInline commonMarginInline;
063:            //     private CommonRelativePosition commonRelativePosition;
064:            //     private KeepProperty keepWithNext;
065:            //     private KeepProperty keepWithPrevious;
066:            //     private int scoreSpaces;
067:            //     private Length textAltitude;
068:            //     private Length textDepth;
069:            //     private int textTransform;
070:            //     private int visibility;
071:            //     private SpaceProperty wordSpacing;
072:            //     private int wrapOption;
073:            //  End of property values
074:
075:            // Properties which are not explicitely listed but are still applicable 
076:            private Color color;
077:
078:            /**
079:             * @param parent FONode that is the parent of this object
080:             */
081:            public PageNumber(FONode parent) {
082:                super (parent);
083:            }
084:
085:            /**
086:             * @see org.apache.fop.fo.FObj#bind(PropertyList)
087:             */
088:            public void bind(PropertyList pList) throws FOPException {
089:                super .bind(pList);
090:                commonBorderPaddingBackground = pList
091:                        .getBorderPaddingBackgroundProps();
092:                commonFont = pList.getFontProps();
093:                alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
094:                alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
095:                baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
096:                dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
097:                // letterSpacing = pList.get(PR_LETTER_SPACING);
098:                lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
099:                textDecoration = pList.getTextDecorationProps();
100:                // textShadow = pList.get(PR_TEXT_SHADOW);
101:
102:                // implicit properties
103:                color = pList.get(Constants.PR_COLOR).getColor(getUserAgent());
104:            }
105:
106:            /**
107:             * @see org.apache.fop.fo.FONode#startOfNode
108:             */
109:            protected void startOfNode() throws FOPException {
110:                super .startOfNode();
111:                getFOEventHandler().startPageNumber(this );
112:            }
113:
114:            /**
115:             * @see org.apache.fop.fo.FONode#endOfNode
116:             */
117:            protected void endOfNode() throws FOPException {
118:                getFOEventHandler().endPageNumber(this );
119:            }
120:
121:            /**
122:             * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
123:             * XSL Content Model: empty
124:             */
125:            protected void validateChildNode(Locator loc, String nsURI,
126:                    String localName) throws ValidationException {
127:                invalidChildError(loc, nsURI, localName);
128:            }
129:
130:            /** @return the Common Font Properties. */
131:            public CommonFont getCommonFont() {
132:                return commonFont;
133:            }
134:
135:            /** @return the "color" property. */
136:            public Color getColor() {
137:                return color;
138:            }
139:
140:            /** @return the Common Border, Padding, and Background Properties. */
141:            public CommonBorderPaddingBackground getCommonBorderPaddingBackground() {
142:                return commonBorderPaddingBackground;
143:            }
144:
145:            /** @return the "text-decoration" property. */
146:            public CommonTextDecoration getTextDecoration() {
147:                return textDecoration;
148:            }
149:
150:            /**
151:             * @return the "alignment-adjust" property
152:             */
153:            public Length getAlignmentAdjust() {
154:                return alignmentAdjust;
155:            }
156:
157:            /**
158:             * @return the "alignment-baseline" property
159:             */
160:            public int getAlignmentBaseline() {
161:                return alignmentBaseline;
162:            }
163:
164:            /**
165:             * @return the "baseline-shift" property
166:             */
167:            public Length getBaselineShift() {
168:                return baselineShift;
169:            }
170:
171:            /**
172:             * @return the "dominant-baseline" property
173:             */
174:            public int getDominantBaseline() {
175:                return dominantBaseline;
176:            }
177:
178:            /**
179:             * @return the "line-height" property
180:             */
181:            public SpaceProperty getLineHeight() {
182:                return lineHeight;
183:            }
184:
185:            /** @see org.apache.fop.fo.FONode#getLocalName() */
186:            public String getLocalName() {
187:                return "page-number";
188:            }
189:
190:            /** @see org.apache.fop.fo.FObj#getNameId() */
191:            public int getNameId() {
192:                return FO_PAGE_NUMBER;
193:            }
194:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.