Source Code Cross Referenced for PageFooter.java in  » Report » pentaho-report » org » jfree » report » 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 » Report » pentaho report » org.jfree.report 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * ===========================================
003:         * JFreeReport : a free Java reporting library
004:         * ===========================================
005:         *
006:         * Project Info:  http://reporting.pentaho.org/
007:         *
008:         * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
009:         *
010:         * This library is free software; you can redistribute it and/or modify it under the terms
011:         * of the GNU Lesser General Public License as published by the Free Software Foundation;
012:         * either version 2.1 of the License, or (at your option) any later version.
013:         *
014:         * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
015:         * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016:         * See the GNU Lesser General Public License for more details.
017:         *
018:         * You should have received a copy of the GNU Lesser General Public License along with this
019:         * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020:         * Boston, MA 02111-1307, USA.
021:         *
022:         * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
023:         * in the United States and other countries.]
024:         *
025:         * ------------
026:         * PageFooter.java
027:         * ------------
028:         * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
029:         */package org.jfree.report;
030:
031:        import org.jfree.report.style.BandStyleKeys;
032:
033:        /**
034:         * A report band that appears at the bottom of every page. The page-footer is the last band that is printed on a page.
035:         * There is an option to suppress the page footer on the first page, and another option does the same for the last page.
036:         * If the footer is marked sticky, the footer will even be printed for all sub-report pages.
037:         * <p/>
038:         * A page header or footer cannot have subreports.
039:         *
040:         * @author David Gilbert
041:         */
042:        public class PageFooter extends Band implements  RootLevelBand {
043:            /**
044:             * A empty array defined here for performance reasons.
045:             */
046:            private static final SubReport[] EMPTY_REPORTS = new SubReport[0];
047:
048:            /**
049:             * Constructs a page footer containing no elements.
050:             */
051:            public PageFooter() {
052:            }
053:
054:            /**
055:             * Constructs a page footer containing no elements.
056:             *
057:             * @param onFirstPage defines, whether the page header will be printed on the first page
058:             * @param onLastPage  defines, whether the page footer will be printed on the last page.
059:             */
060:            public PageFooter(final boolean onFirstPage,
061:                    final boolean onLastPage) {
062:                super ();
063:                setDisplayOnFirstPage(onFirstPage);
064:                setDisplayOnLastPage(onLastPage);
065:            }
066:
067:            /**
068:             * Returns true if the footer should be shown on page 1, and false otherwise.
069:             *
070:             * @return true or false.
071:             */
072:            public boolean isDisplayOnFirstPage() {
073:                return getStyle().getBooleanStyleProperty(
074:                        BandStyleKeys.DISPLAY_ON_FIRSTPAGE, false);
075:            }
076:
077:            /**
078:             * Defines whether the footer should be shown on the first page.
079:             *
080:             * @param b a flag indicating whether or not the footer is shown on the first page.
081:             */
082:            public void setDisplayOnFirstPage(final boolean b) {
083:                getStyle().setBooleanStyleProperty(
084:                        BandStyleKeys.DISPLAY_ON_FIRSTPAGE, b);
085:            }
086:
087:            /**
088:             * Returns true if the footer should be shown on the last page, and false otherwise.
089:             *
090:             * @return true or false.
091:             */
092:            public boolean isDisplayOnLastPage() {
093:                return getStyle().getBooleanStyleProperty(
094:                        BandStyleKeys.DISPLAY_ON_LASTPAGE, false);
095:            }
096:
097:            /**
098:             * Defines whether the footer should be shown on the last page.
099:             *
100:             * @param b a flag indicating whether or not the footer is shown on the first page.
101:             */
102:            public void setDisplayOnLastPage(final boolean b) {
103:                getStyle().setBooleanStyleProperty(
104:                        BandStyleKeys.DISPLAY_ON_LASTPAGE, b);
105:            }
106:
107:            /**
108:             * Assigns the report definition. Don't play with that function, unless you know what you are doing. You might get
109:             * burned.
110:             *
111:             * @param reportDefinition the report definition.
112:             */
113:            public void setReportDefinition(
114:                    final ReportDefinition reportDefinition) {
115:                super .setReportDefinition(reportDefinition);
116:            }
117:
118:            /**
119:             * Returns the number of subreports on this band. This returns zero, as page-bands cannot have subreports.
120:             *
121:             * @return the subreport count.
122:             */
123:            public final int getSubReportCount() {
124:                return 0;
125:            }
126:
127:            /**
128:             * Throws an IndexOutOfBoundsException as page-footer cannot have sub-reports.
129:             *
130:             * @param index the index.
131:             * @return nothing, as an exception is thrown instead.
132:             */
133:            public final SubReport getSubReport(final int index) {
134:                throw new IndexOutOfBoundsException(
135:                        "PageFooter cannot have subreports.");
136:            }
137:
138:            /**
139:             * Returns true if the footer should be shown on all subreports.
140:             *
141:             * @return true or false.
142:             */
143:            public boolean isSticky() {
144:                return getStyle().getBooleanStyleProperty(BandStyleKeys.STICKY,
145:                        false);
146:            }
147:
148:            /**
149:             * Defines whether the footer should be shown on all subreports.
150:             *
151:             * @param b a flag indicating whether or not the footer is shown on the first page.
152:             */
153:            public void setSticky(final boolean b) {
154:                getStyle().setBooleanStyleProperty(BandStyleKeys.STICKY, b);
155:            }
156:
157:            /**
158:             * Returns an empty array, as page-footer cannot have subreports.
159:             *
160:             * @return the sub-reports as array.
161:             */
162:            public SubReport[] getSubReports() {
163:                return EMPTY_REPORTS;
164:            }
165:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.