Source Code Cross Referenced for Leader.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: Leader.java 554094 2007-07-07 00:04:25Z adelmelle $ */
019:
020:        package org.apache.fop.fo.flow;
021:
022:        import org.apache.fop.apps.FOPException;
023:        import org.apache.fop.datatypes.Length;
024:        import org.apache.fop.fo.FONode;
025:        import org.apache.fop.fo.PropertyList;
026:        import org.apache.fop.fo.properties.CommonRelativePosition;
027:        import org.apache.fop.fo.properties.KeepProperty;
028:        import org.apache.fop.fo.properties.LengthRangeProperty;
029:        import org.apache.fop.fo.properties.SpaceProperty;
030:
031:        /**
032:         * Class modelling fo:leader object.
033:         * The main property of fo:leader is leader-pattern.
034:         * The following patterns are treated: rule, space, dots and use-content.
035:         * @todo implement validateChildNode()
036:         */
037:        public class Leader extends InlineLevel {
038:            // The value of properties relevant for fo:leader.
039:            // See also superclass InlineLevel
040:            private Length alignmentAdjust;
041:            private int alignmentBaseline;
042:            private Length baselineShift;
043:            private int dominantBaseline;
044:            private int leaderAlignment;
045:            private LengthRangeProperty leaderLength;
046:            private int leaderPattern;
047:            private Length leaderPatternWidth;
048:            private int ruleStyle;
049:            private Length ruleThickness;
050:
051:            // private ToBeImplementedProperty letterSpacing;
052:            // private ToBeImplementedProperty textShadow;
053:            // Unused but valid items, commented out for performance:
054:            //     private CommonRelativePosition commonRelativePosition;
055:            //     private Length textDepth;
056:            //     private Length textAltitude;
057:            //     private KeepProperty keepWithNext;
058:            //     private KeepProperty keepWithPrevious;
059:            //     private SpaceProperty wordSpacing;
060:            // End of property values
061:
062:            /**
063:             * @param parent FONode that is the parent of this object
064:             */
065:            public Leader(FONode parent) {
066:                super (parent);
067:            }
068:
069:            /**
070:             * @see org.apache.fop.fo.FObj#bind(PropertyList)
071:             */
072:            public void bind(PropertyList pList) throws FOPException {
073:                super .bind(pList);
074:                alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
075:                alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
076:                baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
077:                dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
078:                leaderAlignment = pList.get(PR_LEADER_ALIGNMENT).getEnum();
079:                leaderLength = pList.get(PR_LEADER_LENGTH).getLengthRange();
080:                leaderPattern = pList.get(PR_LEADER_PATTERN).getEnum();
081:                leaderPatternWidth = pList.get(PR_LEADER_PATTERN_WIDTH)
082:                        .getLength();
083:                switch (leaderPattern) {
084:                case EN_SPACE:
085:                    // use Space
086:                    break;
087:                case EN_RULE:
088:                    // the following properties only apply
089:                    // for leader-pattern = "rule"
090:                    ruleStyle = pList.get(PR_RULE_STYLE).getEnum();
091:                    ruleThickness = pList.get(PR_RULE_THICKNESS).getLength();
092:                    break;
093:                case EN_DOTS:
094:                    break;
095:                case EN_USECONTENT:
096:                    // use inline layout manager to create inline areas
097:                    // add the inline parent multiple times until leader full
098:                    break;
099:                default:
100:                    throw new RuntimeException("Invalid leader pattern: "
101:                            + leaderPattern);
102:                }
103:                // letterSpacing = pList.get(PR_LETTER_SPACING);
104:                // textShadow = pList.get(PR_TEXT_SHADOW);
105:            }
106:
107:            /**
108:             * @return the "rule-style" property.
109:             */
110:            public int getRuleStyle() {
111:                return ruleStyle;
112:            }
113:
114:            /**
115:             * @return the "rule-thickness" property.
116:             */
117:            public Length getRuleThickness() {
118:                return ruleThickness;
119:            }
120:
121:            /**
122:             * @return the "leader-alignment" property.
123:             */
124:            public int getLeaderAlignment() {
125:                return leaderAlignment;
126:            }
127:
128:            /**
129:             * @return the "leader-length" property.
130:             */
131:            public LengthRangeProperty getLeaderLength() {
132:                return leaderLength;
133:            }
134:
135:            /**
136:             * @return the "leader-pattern" property.
137:             */
138:            public int getLeaderPattern() {
139:                return leaderPattern;
140:            }
141:
142:            /**
143:             * @return the "leader-pattern-width" property.
144:             */
145:            public Length getLeaderPatternWidth() {
146:                return leaderPatternWidth;
147:            }
148:
149:            /**
150:             * @return the "alignment-adjust" property
151:             */
152:            public Length getAlignmentAdjust() {
153:                return alignmentAdjust;
154:            }
155:
156:            /**
157:             * @return the "alignment-baseline" property
158:             */
159:            public int getAlignmentBaseline() {
160:                return alignmentBaseline;
161:            }
162:
163:            /**
164:             * @return the "baseline-shift" property
165:             */
166:            public Length getBaselineShift() {
167:                return baselineShift;
168:            }
169:
170:            /**
171:             * @return the "dominant-baseline" property
172:             */
173:            public int getDominantBaseline() {
174:                return dominantBaseline;
175:            }
176:
177:            /** @see org.apache.fop.fo.FONode#getLocalName() */
178:            public String getLocalName() {
179:                return "leader";
180:            }
181:
182:            /**
183:             * @see org.apache.fop.fo.FObj#getNameId()
184:             */
185:            public int getNameId() {
186:                return FO_LEADER;
187:            }
188:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.