|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
jimm.datavision.Section
public class Section
A section of a report contains a group of fields and suppression information. Sections include page headers and footers, report headers and footers, group headers and footers, and details. Sections contain elements (fields and lines).
Report,
Field,
Line| Field Summary | |
|---|---|
protected SectionArea |
area
|
protected static double |
DEFAULT_HEIGHT
|
protected java.util.ArrayList |
fields
|
protected java.util.ArrayList |
lines
|
protected double |
minHeight
|
protected boolean |
pageBreak
|
protected Report |
report
|
protected SuppressionProc |
suppressionProc
|
| Constructor Summary | |
|---|---|
Section(Report r)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addField(Field f)
Adds a field to this section. |
void |
addLine(Line l)
Adds a line to this section. |
boolean |
contains(Field f)
Returns true if the specified field is inside this section. |
boolean |
containsReferenceTo(Field f)
Returns true if the specified field exists within this
section either directly (as a field) or indirectly (as a formula used
by an aggregate, user column, or formula or by the suppression proc). |
boolean |
containsReferenceTo(Formula f)
Returns true if the specified formula exists within this
section either directly (as a formula field) or indirectly (as a formula
used by an aggregate, user column, or formula or by the suppression proc). |
boolean |
containsReferenceTo(Parameter p)
Returns true if the specified parameter exists within this
section either directly (as a parameter field) or indirectly (as a parameter
used by an aggregate, a formula, or by the suppression proc). |
boolean |
containsReferenceTo(UserColumn uc)
Returns true if the specified user column exists within this
section either directly (as a user column field) or indirectly (as a user
column used by an aggregate, a formula, or by the suppression proc). |
void |
evaluateFormulas()
Forces all of the formulas used in this section to be evaluated. |
java.util.Iterator |
fields()
Returns an iterator over all fields in this section. |
java.lang.Object[] |
fieldsSortedBy(java.util.Comparator comp)
Returns an array of this section's fields sorted by comp. |
Field |
findField(java.lang.Object id)
Given an id, returns the field within this section that has that id. |
SectionArea |
getArea()
Returns the area this section is contained within. |
double |
getMinHeight()
Returns the min height of this section. |
java.lang.String |
getName()
Returns the name of this section. |
double |
getOutputHeight()
Returns the height of this section: not the minimum height defined when the report was designed but rather the height necessary to output this section. |
Report |
getReport()
Returns the report containing this section. |
SuppressionProc |
getSuppressionProc()
Returns the supression proc this section uses |
double |
getWidth()
Returns the width of this section. |
boolean |
hasPageBreak()
Returns the boolean page break flag. |
boolean |
isDetail()
Returns true if this is a report detail section. |
boolean |
isHidden()
|
boolean |
isVisibleForCurrentRow()
Return true if this section should be printed, given this
particular row of data and our supressed state and suppression proc. |
java.util.Iterator |
lines()
Returns an iterator over all lines in this section. |
int |
numFields()
Returns the number of fields in this section. |
void |
removeField(Field f)
Removes a field from this section. |
void |
removeLine(Line f)
Removes a line from this section. |
void |
setArea(SectionArea area)
Sets the area this section is contained within and notifies any observers of the change. |
void |
setMinHeight(double newMinHeight)
Sets the min height. |
void |
setPageBreak(boolean flag)
Sets the page break flag. |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
void |
writeXML(XMLWriter out)
Writes this section and all it contains as an XML tag. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final double DEFAULT_HEIGHT
protected Report report
protected SectionArea area
protected double minHeight
protected java.util.ArrayList fields
protected java.util.ArrayList lines
protected SuppressionProc suppressionProc
protected boolean pageBreak
| Constructor Detail |
|---|
public Section(Report r)
r - the report containing this section| Method Detail |
|---|
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic Report getReport()
public double getMinHeight()
public void setMinHeight(double newMinHeight)
newMinHeight - the new min heightpublic double getOutputHeight()
public double getWidth()
public SectionArea getArea()
public void setArea(SectionArea area)
area - a section areapublic java.lang.String getName()
public Field findField(java.lang.Object id)
null.
null if no field with the specified
id exists in this sectionpublic void addField(Field f)
f - a fieldpublic void removeField(Field f)
f - fieldpublic java.util.Iterator fields()
public java.lang.Object[] fieldsSortedBy(java.util.Comparator comp)
comp - the comparator to use for sorting
public int numFields()
public void addLine(Line l)
l - a linepublic void removeLine(Line f)
f - linepublic java.util.Iterator lines()
public boolean isHidden()
public boolean isDetail()
true if this is a report detail section.
true if this is a report detail sectionpublic boolean hasPageBreak()
true if we should start a new page before this
section.public void setPageBreak(boolean flag)
flag - new valuepublic SuppressionProc getSuppressionProc()
public boolean contains(Field f)
true if the specified field is inside this section.
f - a field
true if the field is within this sectionpublic boolean containsReferenceTo(Field f)
true if the specified field exists within this
section either directly (as a field) or indirectly (as a formula used
by an aggregate, user column, or formula or by the suppression proc).
f - a field
true if the specified field is referenced within
this sectionpublic boolean containsReferenceTo(Formula f)
true if the specified formula exists within this
section either directly (as a formula field) or indirectly (as a formula
used by an aggregate, user column, or formula or by the suppression proc).
f - a formula
true if the specified formula is referenced within
this sectionpublic boolean containsReferenceTo(UserColumn uc)
true if the specified user column exists within this
section either directly (as a user column field) or indirectly (as a user
column used by an aggregate, a formula, or by the suppression proc).
uc - a user column
true if the specified formula is referenced within
this sectionpublic boolean containsReferenceTo(Parameter p)
true if the specified parameter exists within this
section either directly (as a parameter field) or indirectly (as a parameter
used by an aggregate, a formula, or by the suppression proc).
p - a parameter
true if the specified formula is referenced within
this sectionpublic void evaluateFormulas()
LayoutEngine.groupHeaders for why
this method is necessary.
LayoutEngine.groupHeaders(boolean)public boolean isVisibleForCurrentRow()
true if this section should be printed, given this
particular row of data and our supressed state and suppression proc.
true if the data should be displayedpublic void writeXML(XMLWriter out)
writeXML in interface Writeableout - a writer that knows how to write XML
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||