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, TEXTPART
Fields inherited from interface com.inet.report.BorderProperties
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE
Fields inherited from interface com.inet.report.GeneralProperties
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()
The body of the table.The top headers of the table.Returns the gridline format of the crosstab.Gets the description section of the crosstab.The properties of the table.Returns a list with all property formulas that are set for this report element.getRows()
The left headers of the table.List<? extends ReportComponent>
Returns allReportComponent
s 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 XMLvoid
parseEndElement
(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 void
FOR INTERNAL USE ONLYvoid
setCrossTabGridLineFormat
(CrossTabGridLineFormat[] gridLines) Sets the gridline format of the crosstab.void
setHeight
(int height) This element can not be resized.final void
FOR INTERNAL USE ONLYvoid
setWidth
(int width) This element can not be resized.void
Swap 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, 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
Methods 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, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, setTopLineStyleFormula
Methods inherited from interface com.inet.report.GeneralProperties
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
Methods inherited from interface com.inet.report.HyperlinkProperties
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormula
Methods 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:
setWidth
in 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:
setHeight
in 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
- ifgridLines
include 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 descendantReportComponent
of this one. To get the property formulas for descendantReportComponent
useReportComponent.getSubComponents()
- Overrides:
getPropertyFormulas
in classElement
- Returns:
- List of property formulas
-
setReferences
public final void setReferences()FOR INTERNAL USE ONLY- Specified by:
setReferences
in interfacecom.inet.report.ReferenceHolder
- Overrides:
setReferences
in classElement
-
resetReferences
public final void resetReferences()FOR INTERNAL USE ONLY- Specified by:
resetReferences
in interfacecom.inet.report.ReferenceHolder
- Overrides:
resetReferences
in 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:
parseElement
in interfaceNodeParser
- Overrides:
parseElement
in 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:
parseEndElement
in interfaceNodeParser
- Overrides:
parseEndElement
in 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 allReportComponent
s that are descendants of this one. E.G. this will return all Element of aSection
. But it's as well useful forCrossTab
s orText
elements which have additional elements.- Specified by:
getSubComponents
in classReportComponent
- Returns:
- a list with all sub components which can be empty as well; will be
null
if the component has no descendants
-