jimm.datavision.layout
Class SortedLayoutEngine
java.lang.Object
jimm.datavision.layout.LayoutEngine
jimm.datavision.layout.SortedLayoutEngine
- Direct Known Subclasses:
- CharSepLE, CSSHTMLLE, DocBookLE, HTMLLE, XMLLE
public abstract class SortedLayoutEngine
- extends LayoutEngine
A sorted layout engine outputs the fields within each section in order
of their y then x coordinates. Another way of putting it: the fields are
sorted top to bottom, then left to right. This ensures, for example,
that character-based layout engines such as CharSepLE and
HTMLLE will display fields in the correct left-to-right
order.
- Author:
- Jim Menard, jimm@io.com
|
Field Summary |
protected java.util.Comparator |
comp
|
protected java.util.HashMap |
sectionFields
|
| Fields inherited from class jimm.datavision.layout.LayoutEngine |
currentSection, newPage, out, pageHeight, pageHeightUsed, pageNumber, pageWidth, POINTS_PER_INCH, previousSectionArea, report, SECT_DETAIL, SECT_GROUP_FOOTER, SECT_GROUP_HEADER, SECT_PAGE_FOOTER, SECT_PAGE_HEADER, SECT_REPORT_FOOTER, SECT_REPORT_HEADER, wantsMoreData |
|
Method Summary |
protected java.lang.Object[] |
buildSectionFields(Section sect)
Creates, saves, and returns an array of fields sorted by their y and x
coordinates (y first, then x). |
protected void |
doOutputSection(Section sect)
This override iterates over a list of fields that have been sorted
by their y and x coordinates. |
| Methods inherited from class jimm.datavision.layout.LayoutEngine |
calcDetailHeight, calcPageFooterHeight, calcReportFooterHeight, calcSectionHeights, cancel, checkRemainingPageLength, closeOutput, currentSectionTypeAsString, detail, doEnd, doEndPage, doOutputField, doOutputImage, doOutputLine, doStart, doStartPage, end, endPage, groupFooters, groupHeaders, outputField, outputImage, outputLine, outputSection, pageHeight, pageNumber, pageWidth, setReport, start, startPage, wantsMoreData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sectionFields
protected java.util.HashMap sectionFields
comp
protected java.util.Comparator comp
SortedLayoutEngine
public SortedLayoutEngine()
- Constructor.
SortedLayoutEngine
public SortedLayoutEngine(java.io.PrintWriter out)
- Constructor.
- Parameters:
out - output print writer
doOutputSection
protected void doOutputSection(Section sect)
- This override iterates over a list of fields that have been sorted
by their y and x coordinates. Put another way, the fields are output
top to bottom, left to right.
- Overrides:
doOutputSection in class LayoutEngine
- Parameters:
sect - a section
buildSectionFields
protected java.lang.Object[] buildSectionFields(Section sect)
- Creates, saves, and returns an array of fields sorted by their y and x
coordinates (y first, then x). Another way of putting it: the fields are
sorted top to bottom, then left to right.
- Parameters:
sect - a report section
- Returns:
- a sorted array of fields