Java Doc for LayoutEngine.java in  » Report » datavision-1.1.0 » jimm » datavision » layout » 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 » datavision 1.1.0 » jimm.datavision.layout 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jimm.datavision.layout.LayoutEngine

All known Subclasses:   jimm.datavision.layout.pdf.PDFLE,  jimm.datavision.layout.SortedLayoutEngine,  jimm.datavision.layout.LaTeXLE,  jimm.datavision.layout.swing.SwingLE,  jimm.datavision.layout.excel.ExcelLE,
LayoutEngine
abstract public class LayoutEngine (Code)
A layout engine is responsible for formatting and outputting report data. LayoutEngine is an abstract class. The Template design pattern is heavily used to provide a framework for concrete layout engine subclasses.
author:
   Jim Menard, jimm@io.com


Field Summary
final public static  intPOINTS_PER_INCH
     The number of points per inch.
final protected static  intSECT_DETAIL
    
final protected static  intSECT_GROUP_FOOTER
    
final protected static  intSECT_GROUP_HEADER
    
final protected static  intSECT_PAGE_FOOTER
    
final protected static  intSECT_PAGE_HEADER
    
final protected static  intSECT_REPORT_FOOTER
    
final protected static  intSECT_REPORT_HEADER
    
protected  SectioncurrentSection
    
protected  booleannewPage
    
protected  PrintWriterout
    
protected  doublepageHeight
    
protected  doublepageHeightUsed
    
protected  intpageNumber
    
protected  doublepageWidth
    
protected  intpreviousSectionArea
    
protected  Reportreport
     Set by report in Report.setLayoutEngine.
protected  booleanwantsMoreData
    

Constructor Summary
public  LayoutEngine()
     Constructor.
public  LayoutEngine(PrintWriter out)
     Constructor.

Method Summary
protected  doublecalcDetailHeight()
     Returns the total height of all detail sections.
protected  doublecalcPageFooterHeight()
     Returns the total height of all page footer sections.
protected  doublecalcReportFooterHeight()
     Returns the total height of all report footer sections.
protected  doublecalcSectionHeights(SectionArea area)
     Returns the total height of all sections in the specified list.
public  voidcancel()
     Called by someone else running the report to cancel all the hard work this layout engine has performed.
protected  voidcheckRemainingPageLength(boolean isLastRow, boolean includeDetail)
     Checks remaining page length and outputs a new page if we are at the bottom of the page.
protected  voidcloseOutput()
     Called by end to let this layout engine clean up a bit.
protected  StringcurrentSectionTypeAsString()
     Returns the current section type (header, footer, detail) as a string.
public  voiddetail(boolean isLastRow)
     Called by the report when a single detail row needs to be output.
protected  voiddoEnd()
     Called by end as a chance to insert behavior when the report ends.
protected  voiddoEndPage()
     Called by endPage as a chance to insert behavior when a new page ends.
abstract protected  voiddoOutputField(Field field)
     Called by outputField as a chance to insert behavior when a field is output.
abstract protected  voiddoOutputImage(ImageField image)
     Called by outputImage as a chance to insert behavior when a image is output.
abstract protected  voiddoOutputLine(Line line)
     Called by outputLine as a chance to insert behavior when a line is output.
protected  voiddoOutputSection(Section sect)
     Called by outputSection as a chance to insert behavior when a section is output.
protected  voiddoStart()
     Called by start as a chance to insert behavior when the report starts.
protected  voiddoStartPage()
     Called by startPage as a chance to insert behavior when a new page starts.
public  voidend()
     Called by the report at the end of a report run.
protected  voidendPage(boolean isLastPage)
     Ends a new page.
public  voidgroupFooters(boolean isLastRow)
     Called by the report when group footers need to be output.
public  voidgroupHeaders(boolean isLastRow)
     Called by the report when group headers need to be output.
protected  voidoutputField(Field field)
     Outputs a field.
protected  voidoutputImage(ImageField image)
     Outputs a image.
protected  voidoutputLine(Line line)
     Outputs a line.
protected  voidoutputSection(Section sect, int which)
     Outputs a section.
public  doublepageHeight()
     Returns the page height in points.
public  intpageNumber()
     Returns the current page number.
public  doublepageWidth()
     Returns the page width in points.
public  voidsetReport(Report r)
    
public  voidstart()
     Called by the report at the beginning of a report run.
protected  voidstartPage()
     Starts a new page.
public  booleanwantsMoreData()
     Called by a report before retrieving each row of data, this method returns true if this layout engine wants more data.

Field Detail
POINTS_PER_INCH
final public static int POINTS_PER_INCH(Code)
The number of points per inch.



SECT_DETAIL
final protected static int SECT_DETAIL(Code)



SECT_GROUP_FOOTER
final protected static int SECT_GROUP_FOOTER(Code)



SECT_GROUP_HEADER
final protected static int SECT_GROUP_HEADER(Code)



SECT_PAGE_FOOTER
final protected static int SECT_PAGE_FOOTER(Code)



SECT_PAGE_HEADER
final protected static int SECT_PAGE_HEADER(Code)



SECT_REPORT_FOOTER
final protected static int SECT_REPORT_FOOTER(Code)



SECT_REPORT_HEADER
final protected static int SECT_REPORT_HEADER(Code)



currentSection
protected Section currentSection(Code)



newPage
protected boolean newPage(Code)



out
protected PrintWriter out(Code)



pageHeight
protected double pageHeight(Code)



pageHeightUsed
protected double pageHeightUsed(Code)



pageNumber
protected int pageNumber(Code)



pageWidth
protected double pageWidth(Code)



previousSectionArea
protected int previousSectionArea(Code)



report
protected Report report(Code)
Set by report in Report.setLayoutEngine.



wantsMoreData
protected boolean wantsMoreData(Code)




Constructor Detail
LayoutEngine
public LayoutEngine()(Code)
Constructor.



LayoutEngine
public LayoutEngine(PrintWriter out)(Code)
Constructor.
Parameters:
  out - output print writer




Method Detail
calcDetailHeight
protected double calcDetailHeight()(Code)
Returns the total height of all detail sections. the total height of all detail sections



calcPageFooterHeight
protected double calcPageFooterHeight()(Code)
Returns the total height of all page footer sections. the total height of all page footer sections



calcReportFooterHeight
protected double calcReportFooterHeight()(Code)
Returns the total height of all report footer sections. the total height of all report footer sections



calcSectionHeights
protected double calcSectionHeights(SectionArea area)(Code)
Returns the total height of all sections in the specified list.
Parameters:
  area - a section area the total height of all sections in the list



cancel
public void cancel()(Code)
Called by someone else running the report to cancel all the hard work this layout engine has performed.



checkRemainingPageLength
protected void checkRemainingPageLength(boolean isLastRow, boolean includeDetail)(Code)
Checks remaining page length and outputs a new page if we are at the bottom of the page.
Parameters:
  isLastRow - if true, this is the last row of the report
Parameters:
  includeDetail - if true, include height of detailsections



closeOutput
protected void closeOutput()(Code)
Called by end to let this layout engine clean up a bit.



currentSectionTypeAsString
protected String currentSectionTypeAsString()(Code)
Returns the current section type (header, footer, detail) as a string. a string representation of the current section type



detail
public void detail(boolean isLastRow)(Code)
Called by the report when a single detail row needs to be output.
Parameters:
  isLastRow - if true, this is the last row of the report



doEnd
protected void doEnd()(Code)
Called by end as a chance to insert behavior when the report ends.



doEndPage
protected void doEndPage()(Code)
Called by endPage as a chance to insert behavior when a new page ends.



doOutputField
abstract protected void doOutputField(Field field)(Code)
Called by outputField as a chance to insert behavior when a field is output.
Parameters:
  field - a field



doOutputImage
abstract protected void doOutputImage(ImageField image)(Code)
Called by outputImage as a chance to insert behavior when a image is output.
Parameters:
  image - an image field



doOutputLine
abstract protected void doOutputLine(Line line)(Code)
Called by outputLine as a chance to insert behavior when a line is output.
Parameters:
  line - a line



doOutputSection
protected void doOutputSection(Section sect)(Code)
Called by outputSection as a chance to insert behavior when a section is output.
Parameters:
  sect - a section



doStart
protected void doStart()(Code)
Called by start as a chance to insert behavior when the report starts.



doStartPage
protected void doStartPage()(Code)
Called by startPage as a chance to insert behavior when a new page starts.



end
public void end()(Code)
Called by the report at the end of a report run.



endPage
protected void endPage(boolean isLastPage)(Code)
Ends a new page.
Parameters:
  isLastPage - if true, this is the last page of the report



groupFooters
public void groupFooters(boolean isLastRow)(Code)
Called by the report when group footers need to be output. When one group footer is output, we make sure all of the footers before (above) it are also output.
Parameters:
  isLastRow - if true, this is the last row of the report



groupHeaders
public void groupHeaders(boolean isLastRow)(Code)
Called by the report when group headers need to be output. Once one group header is output, we output all remaining group headers.

We need to explicitly evaluate all formulas in the headers that will be output because LayoutEngine.checkRemainingPageLength causes formulas in detail and footers to be evaluated. Those formulas may depend upon values in these headers.
Parameters:
  isLastRow - if true, this is the last row of the report




outputField
protected void outputField(Field field)(Code)
Outputs a field.
Parameters:
  field - the field to output



outputImage
protected void outputImage(ImageField image)(Code)
Outputs a image.
Parameters:
  image - the image field to output



outputLine
protected void outputLine(Line line)(Code)
Outputs a line.
Parameters:
  line - the line to output



outputSection
protected void outputSection(Section sect, int which)(Code)
Outputs a section.
Parameters:
  sect - the section to output
Parameters:
  which - the type of section (for example,SECT_PAGE_FOOTER)



pageHeight
public double pageHeight()(Code)
Returns the page height in points. This value is only valid after LayoutEngine.start has been called. the page height in points



pageNumber
public int pageNumber()(Code)
Returns the current page number. the current page number



pageWidth
public double pageWidth()(Code)
Returns the page width in points. This value is only valid after LayoutEngine.start has been called. the page width in points



setReport
public void setReport(Report r)(Code)



start
public void start()(Code)
Called by the report at the beginning of a report run.

By this time, report will be non-null because we have been added to a report (which in turn sets our report instance variable).




startPage
protected void startPage()(Code)
Starts a new page.



wantsMoreData
public boolean wantsMoreData()(Code)
Called by a report before retrieving each row of data, this method returns true if this layout engine wants more data. Concrete subclasses can set the wantsMoreData instance variable to false if the user cancells a report run, for example. true if this layout engine would like more data



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.