public class Area extends Region
Area
element of the Runtime Designer Component. The Area
class summarizes the Section
element(s) into an Area
, which makes it
possible to change the behavior of all sections together. All sections in an Area
have the same characteristics, but each Section
in an Area
can have a
different format. Each Area
contains a single Section
by default. The name of the Section
is based on the name of the enclosing Area
,
i.e. "D" if there is only one Section
in the detail Area
. If an Area
has more than one Section
the names are formed by appending letters
of the alphabet, e.g. "Da" for the first Section
in the detail Area
, "Db" for the second, "Dc" for the third and so on. Section
with index
"0" in an Area
is always the default Section
and cannot be removed if it is the only section
in the Area
, because each Area
needs at least one Section
. addSection()
method and remove sections with the removeSection(int)
method. You can access a Section
with the index of the
Section
, using the method getSection(int)
. You can get the number of sections in an Area
with getSectionCount()
. You can merge a
Section
with the Section
below with method mergeSectionBelow(int)
. Section
,
Engine.getArea(int)
,
Engine.getArea(String)
,
Engine.getAreaCount()
,
Serialized FormDETAIL, GROUP_FOOTER, GROUP_HEADER, PAGE_FOOTER, PAGE_HEADER, REPORT_FOOTER, REPORT_HEADER
Modifier and Type | Method and Description |
---|---|
Section |
addSection()
Adds a new
Section to the area. |
int |
getBackColor()
Returns
RDC.COLOR_NO_COLOR since an Area does not have a background color. |
FormulaField |
getBackColorFormula()
Returns null since an Area does not have a background color formula.
|
java.lang.Object |
getParent()
Returns the parent Group if there is one, or null if there is not.
|
java.util.List<FormulaField> |
getPropertyFormulas()
Returns a list with all property formulas that are set for this report element.
|
Section |
getSection(int idx)
Returns a SectionElement of the area.
|
int |
getSectionCount()
Returns the number of Sections in this Area.
|
java.util.List<Section> |
getSubComponents()
Returns all
ReportComponent s that are descendants of this one. |
int |
indexOf()
Returns the current index of this area in the engine.
|
void |
mergeSectionBelow(int idx)
When you have multiple sections in an area you can merge a
Section with the Section below, i.e. when you have sections Da, Db, Dc you can merge
Section Da with Db and Section Db with Dc. |
void |
moveSection(int srcIdx,
int destIdx)
When you have multiple sections in an area you can move a
Section to a place below or above an other Section . |
java.lang.String |
paramString()
Returns a string identifying this report component.
|
Section |
removeSection(int idx)
Removes the
Section with specified index from area. |
void |
setBackColor(int backColor)
Does nothing since an Area does not have a background color.
|
void |
setBackColorFormula(FormulaField newFormula)
Does nothing since an Area does not have a background color formula.
|
void |
setKeepGroupTogether(boolean newValue)
Sets the value of the property 'keep group together'.
|
getAtBottomOfPageFormula, getNewPageAfterFormula, getNewPageBeforeFormula, getResetPageNumberFormula, getSuppressOnDrillDownFormula, getType, isAtBottomOfPage, isHeader, isNewPageAfter, isNewPageBefore, isResetPageNumber, isSuppressOnDrillDown, setAtBottomOfPage, setAtBottomOfPageFormula, setNewPageAfter, setNewPageAfterFormula, setNewPageBefore, setNewPageBeforeFormula, setResetPageNumber, setResetPageNumberFormula, setSuppressOnDrillDown, setSuppressOnDrillDownFormula
getHeight, getKeepTogetherFormula, getSuppressFormula, getWidth, getX, getY, isKeepTogether, isSuppress, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public java.lang.Object getParent()
Group
public int indexOf()
indexOf
in class ReportComponent
java.lang.IllegalStateException
- Thrown if this area was not found in parent engine.Engine.getArea(int)
public int getBackColor()
RDC.COLOR_NO_COLOR
since an Area does not have a background color. However, Sections have background colors.getBackColor
in class ReportComponent
RDC.COLOR_NO_COLOR
since an Area does not have a background colorReportComponent.getBackColor()
public FormulaField getBackColorFormula()
getBackColorFormula
in class ReportComponent
ReportComponent.getBackColorFormula()
public void setBackColor(int backColor)
setBackColor
in class ReportComponent
backColor
- Background color (will be ignored)ReportComponent.setBackColor(int)
public void setBackColorFormula(FormulaField newFormula)
setBackColorFormula
in class ReportComponent
newFormula
- Formula field (will be ignored)ReportComponent.setBackColorFormula(FormulaField)
public java.lang.String paramString()
paramString
in class ReportComponent
public void setKeepGroupTogether(boolean newValue)
newValue
- The new value of the property 'keep group together'.public Section getSection(int idx) throws java.lang.IndexOutOfBoundsException
idx
- The index of the Section
which should be returnedSection
specified by the 0-based index.java.lang.IndexOutOfBoundsException
- Thrown if the given index is less than 0 or is greater than the number of sections in this Area.public int getSectionCount()
public Section addSection()
Section
to the area. The Method addSection()
creates a new Section
and adds this to the area's sections set. The type (kind) of the
Section
is the same as the type (kind) of the area. The created Section
is returned, if creation was successful, else an exception is thrown and a null reference
is returned.Section
public Section removeSection(int idx) throws ReportException, java.lang.IndexOutOfBoundsException
Section
with specified index from area. The method remove
returns a reference to the removed Section
, if removal was succsessful. Else
remove
throws an exception and returns a null reference.idx
- The 0-based index of the Section
, which should be removed. Should an index into this sections set.ReportException
- is thrown if Section
set was empty or last Section
in set should be removed.java.lang.IndexOutOfBoundsException
- Thrown if the given index is less than 0 or is greater than the number of sections in this Area.Section
public void mergeSectionBelow(int idx)
Section
with the Section
below, i.e. when you have sections Da, Db, Dc you can merge
Section
Da with Db and Section
Db with Dc. The elements of the Section
below will be placed below the elements of the Section
with
the given index. The resulting area has one Section
less after merge. Calling the method with the index of the last Section
in area, a ReportException will be
thrown.idx
- The 0-based index of the Section
, which should be merged with the Section
below (idx+1).java.lang.IllegalArgumentException
- is thrown if Section
set was empty or last Section
in set should be merged.public void moveSection(int srcIdx, int destIdx)
Section
to a place below or above an other Section
.srcIdx
- The index of the Section
, which should be moved.destIdx
- The index of the Section
where the Section
(at srcIdx) should be placed.java.lang.IndexOutOfBoundsException
- If one of the indexes is greater than the number of sections.public java.util.List<Section> getSubComponents()
ReportComponent
s that are descendants of this one. E.G. this will return all Element
of a Section
. But it's as well useful for CrossTab
s or Text
elements which have
additional elements.getSubComponents
in class ReportComponent
null
if the component has no descendantspublic java.util.List<FormulaField> getPropertyFormulas()
ReportComponent
of this one. To get the property formulas for descendant ReportComponent
use ReportComponent.getSubComponents()
getPropertyFormulas
in class Region
Copyright © 1999-2020 by i-net software GmbH