Source Code Cross Referenced for RtfPageNumber.java in  » Graphic-Library » fop » org » apache » fop » render » rtf » rtflib » rtfdoc » 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.render.rtf.rtflib.rtfdoc 
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: RtfPageNumber.java 426576 2006-07-28 15:44:37Z jeremias $ */
019:
020:        package org.apache.fop.render.rtf.rtflib.rtfdoc;
021:
022:        /*
023:         * This file is part of the RTF library of the FOP project, which was originally
024:         * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
025:         * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
026:         * the FOP project.
027:         */
028:
029:        import java.io.Writer;
030:        import java.io.IOException;
031:
032:        /**
033:         * @author Christopher Scott, scottc@westinghouse.com
034:         */
035:        public class RtfPageNumber extends RtfContainer {
036:            /* RtfText attributes: fields
037:               must be carefull of group markings and star control
038:               ie page field:
039:                   "{\field {\*\fldinst {PAGE}} {\fldrslt}}"
040:             */
041:
042:            /** constant for field */
043:            public static final String RTF_FIELD = "field";
044:            /** constant for field on page */
045:            public static final String RTF_FIELD_PAGE = "fldinst { PAGE }";
046:            /** constant for field result */
047:            public static final String RTF_FIELD_RESULT = "fldrslt";
048:
049:            /** Create an RTF paragraph as a child of given container with default attributes */
050:            RtfPageNumber(IRtfPageNumberContainer parent, Writer w)
051:                    throws IOException {
052:                super ((RtfContainer) parent, w);
053:            }
054:
055:            /** Create an RTF page number as a child of given container with given attributes */
056:            RtfPageNumber(RtfContainer parent, Writer w, RtfAttributes attrs)
057:                    throws IOException {
058:                // Adds the attributes of the parent paragraph
059:                super (parent, w, attrs);
060:            }
061:
062:            /** Create an RTF page number as a child of given paragraph,
063:             *  copying the paragraph attributes
064:             */
065:            RtfPageNumber(RtfParagraph parent, Writer w) throws IOException {
066:                // Adds the attributes of the parent paragraph
067:                super ((RtfContainer) parent, w, parent.attrib);
068:
069:                // copy parent's text attributes
070:                if (parent.getTextAttributes() != null) {
071:                    attrib.set(parent.getTextAttributes());
072:                }
073:            }
074:
075:            /**
076:             * Write our attributes and content
077:             * @throws IOException for I/O problems
078:             */
079:            protected void writeRtfContent() throws IOException {
080:                /*
081:                writeGroupMark(true);
082:                writeControlWord(RTF_FIELD);
083:                writeGroupMark(true);
084:                writeAttributes(attrib, RtfText.ATTR_NAMES); // Added by Boris Poudérous
085:                writeStarControlWord(RTF_FIELD_PAGE);
086:                writeGroupMark(false);
087:                writeGroupMark(true);
088:                writeControlWord(RTF_FIELD_RESULT);
089:                writeGroupMark(false);
090:                writeGroupMark(false);
091:                 */
092:                writeGroupMark(true);
093:                writeAttributes(attrib, RtfText.ATTR_NAMES);
094:                writeControlWord("chpgn");
095:                writeGroupMark(false);
096:            }
097:
098:            /**
099:             * @return true if this element would generate no "useful" RTF content
100:             */
101:            public boolean isEmpty() {
102:                return false;
103:            }
104:        }
w_w___w__.___j___a__v_a_2s.co__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.