Package com.inet.report
Class CrossTab
java.lang.Object
com.inet.report.ReportComponent
com.inet.report.Element
com.inet.report.CrossTab
- All Implemented Interfaces:
BorderProperties,GeneralProperties,HyperlinkProperties,NodeParser,com.inet.report.ReferenceHolder,Serializable,Cloneable
public class CrossTab
extends Element
implements com.inet.report.ReferenceHolder, HyperlinkProperties, BorderProperties
This class represents a cross table that has been or should be drawn in a report. A cross table is a report to summarize and visualize data in a compact form with rows and columns, so you can
better compare data. Use this class to get or set properties. You can create and add a new cross table element with
This class is part of the RDC.
Section.addCrossTab(int, int, SummaryField) method in class
Section. The last Argument of the method is the field the cross table needs at least.
This class is part of the RDC.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inet.report.Element
Element.BorderProps, Element.CommonProperties, Element.ElementTypes, Element.HyperlinkProps, Element.StringProps -
Field Summary
Fields inherited from class com.inet.report.Element
BOX, CHART, CROSSTAB, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPARTFields inherited from interface com.inet.report.BorderProperties
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINEFields inherited from interface com.inet.report.GeneralProperties
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT, ALIGN_VERTICAL_BOTTOM, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_TOP -
Method Summary
Modifier and TypeMethodDescription@Nonnull CrossTabBodygetBody()The body of the table.@Nonnull CrossTabHeaderListThe top headers of the table.Returns the gridline format of the crosstab.@Nonnull CrossTabDescriptionSectionGets the description section of the crosstab.@Nonnull CrossTabOptionsThe properties of the table.Returns a list with all property formulas that are set for this report element.@Nonnull CrossTabHeaderListgetRows()The left headers of the table.List<? extends ReportComponent>Returns allReportComponents that are descendants of this one.parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLvoidparseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String, Object> parserMap) FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLfinal voidFOR INTERNAL USE ONLYvoidsetCrossTabGridLineFormat(CrossTabGridLineFormat[] gridLines) Sets the gridline format of the crosstab.voidsetHeight(int height) This element can not be resized.final voidFOR INTERNAL USE ONLYvoidsetWidth(int width) This element can not be resized.voidSwap the column and row headers.Methods inherited from class com.inet.report.Element
addListener, copy, getBottomLineStyle, getBottomLineStyleFormula, getBulletValueStack, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getListStack, getParent, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, getTypeAsString, getVerAlign, getVerAlignFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isCloseBorderOnPageBreakInternal, isDropShadow, isInCrossTab, isSuppressIfDuplicated, isTightHorizontal, paramString, parseText, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setBulletValueStack, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setListStack, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula, setVerAlign, setVerAlignFormulaMethods inherited from class com.inet.report.ReportComponent
addPropertyChangeListener, addPropertyChangeListener, addReferencedObject, addVetoableChangeListener, addVetoableChangeListener, getBackColor, getBackColorFormula, getCustomData, getHeight, getKeepTogetherFormula, getRealReferencedObjectCount, getReferencedObjectCount, getReferencedObjects, getSuppressFormula, getType, getWidth, getX, getY, isDOMParser, isKeepTogether, isSuppress, parseDOM, removePropertyChangeListener, removePropertyChangeListener, removeReferencedObject, removeVetoableChangeListener, removeVetoableChangeListener, setBackColor, setBackColorFormula, setCustomData, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setX, setYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inet.report.BorderProperties
getBackColor, getBackColorFormula, getBottomLineStyle, getBottomLineStyleFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getForeColor, getForeColorFormula, getLeftLineStyle, getLeftLineStyleFormula, getRightLineStyle, getRightLineStyleFormula, getTightHorizontalFormula, getTopLineStyle, getTopLineStyleFormula, isCloseBorderOnPageBreak, isDropShadow, isTightHorizontal, setBackColor, setBackColorFormula, setBottomLineStyle, setBottomLineStyleFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setForeColor, setForeColorFormula, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setTightHorizontal, setTightHorizontalFormula, setTopLineStyle, setTopLineStyleFormulaMethods inherited from interface com.inet.report.GeneralProperties
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormulaMethods inherited from interface com.inet.report.HyperlinkProperties
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormulaMethods inherited from interface com.inet.report.ReferenceHolder
addReferencedObject, getRealReferencedObjectCount, getReferencedObjectCount, getReferencedObjects, removeReferencedObject
-
Method Details
-
getDescriptionSection
Gets the description section of the crosstab. This section can be used to add additional descriptions or decoration to the crosstab. The description section is located in the upper left corner of the crosstab.- Returns:
- The description section of the crosstab
- Since:
- 6.0
-
getColumns
The top headers of the table.- Returns:
- ever the same instance
- Since:
- 12.0
-
getRows
The left headers of the table.- Returns:
- ever the same instance
- Since:
- 12.0
-
swapHeaders
public void swapHeaders()Swap the column and row headers. The result is a rotated crosstab.- Since:
- 12.0
-
getOptions
The properties of the table.- Returns:
- ever the same instance
- Since:
- 12.0
-
getBody
The body of the table.- Returns:
- ever the same instance
- Since:
- 12.0
-
setWidth
public void setWidth(int width) This element can not be resized. Invoking this method will have no effect. The size of this element depends on the width and height of its sub elements.- Overrides:
setWidthin classReportComponent- Parameters:
width- Setting the width of the Crosstab has no effect.- Since:
- 6.0
-
setHeight
public void setHeight(int height) This element can not be resized. Invoking this method will have no effect. The size of this element depends on the width and height of its sub elements.- Overrides:
setHeightin classReportComponent- Parameters:
height- Setting the height of the Crosstab has no effect.- Since:
- 6.0
-
getCrossTabGridLineFormat
Returns the gridline format of the crosstab. The grid lines of the crosstab are for the row labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the column labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the cells (vertical-, horizontal-lines, bottom-, right -border)
which are 16 lines total.- Returns:
- The array[16] of CrossTabGridLineFormat
- Since:
- 6.0
-
setCrossTabGridLineFormat
Sets the gridline format of the crosstab. The grid lines of the crosstab are for the row labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the column labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the cells (vertical-, horizontal-lines, bottom-, right -border)
which are 16 lines total.- Parameters:
gridLines- The grid line format array obtained from #getCrossTabGridLineFormat().- Throws:
IllegalArgumentException- ifgridLinesinclude not clonable instances- Since:
- 6.0
-
getPropertyFormulas
Returns a list with all property formulas that are set for this report element. This includes property formulas for any type of sub-component but excludes formulas for any descendantReportComponentof this one. To get the property formulas for descendantReportComponentuseReportComponent.getSubComponents()- Overrides:
getPropertyFormulasin classElement- Returns:
- List of property formulas
-
setReferences
public final void setReferences()FOR INTERNAL USE ONLY- Specified by:
setReferencesin interfacecom.inet.report.ReferenceHolder- Overrides:
setReferencesin classElement
-
resetReferences
public final void resetReferences()FOR INTERNAL USE ONLY- Specified by:
resetReferencesin interfacecom.inet.report.ReferenceHolder- Overrides:
resetReferencesin classReportComponent
-
parseElement
public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) throws FatalParserExceptionFOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLParses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.
- Specified by:
parseElementin interfaceNodeParser- Overrides:
parseElementin classElement- Parameters:
group- XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.tag- The XMLTag to be parsedatts- The set of attributes in the current XMLTagparserMap- The map of current Parser.- Returns:
- The NodeParser sub-element if one needed to be created, or null if none was created.
- Throws:
FatalParserException- if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
-
parseEndElement
public void parseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String, Object> parserMap) throws FatalParserExceptionFOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLReceive notification of the end of an XML tag.
- Specified by:
parseEndElementin interfaceNodeParser- Overrides:
parseEndElementin classReportComponent- Parameters:
group- XMLTag of the current node to be parsed, or null if there is no such current group.tag- The XMLTag to be parsedparserMap- The map of current Parser.- Throws:
FatalParserException- if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
-
getSubComponents
Returns allReportComponents that are descendants of this one. E.G. this will return all Element of aSection. But it's as well useful forCrossTabs orTextelements which have additional elements.- Specified by:
getSubComponentsin classReportComponent- Returns:
- a list with all sub components which can be empty as well; will be
nullif the component has no descendants
-