Package com.inet.report
Class CrossTabHeader
java.lang.Object
com.inet.report.CrossTabHeader
- All Implemented Interfaces:
NodeParser
,Serializable
A single CrossTab header. There are headers for rows (left) and columns (top).
- Since:
- 12.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the background color of the header as ABGR, i.e. 0x000000FF for red.@Nullable FormulaField
Returns the formula of the background color of the header as ABGR, i.e. 0x000000FF for red.@Nullable Field
getField()
The field of the grouping.@Nullable FieldElement
Returns the field element of this row.@Nullable Group
getGroup()
Returns the group object of this row.int
Position of this header, is used from designer.boolean
Returns whether group labels should be suppressed (true
) or not (false
).@Nullable FormulaField
Returns the formula for the property 'suppress group labels'.boolean
Returns whether total of this header should be suppressedtrue
or not (false
).@Nullable FormulaField
Returns the formula for the property 'suppress total'.getText()
Returns the text element of this row.int
getWidth()
Position of this header, is used from designer.int
getX()
Position of this header, is used from designer.int
getY()
Position of this header, is used from designer.boolean
FOR INTERNAL USE ONLY Internal method for reading report XMLboolean
isRow()
If this header is currently a row header or a column header.void
FOR INTERNAL USE ONLY Internal method for reading report XMLparseElement
(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) 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 Internal method for reading report XMLvoid
FOR INTERNAL USE ONLY Internal method for reading report XMLvoid
setBackColor
(int backColor) Sets the background color of the header.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.void
setBackColorFormula
(FormulaField backColorFormula) Sets the formula of the background color of the header.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.void
Set the field of grouping.void
setSuppressGroupLabel
(boolean suppressGroupLabel) Sets whether group labels should be suppressed (true
) or not (false
).void
setSuppressGroupLabelFormula
(FormulaField newFormula) Sets the formula for the property 'suppress group labels'.void
setSuppressTotal
(boolean suppressTotal) Sets whether sub total should be suppressed (true
) or not (false
).void
setSuppressTotalFormula
(FormulaField newFormula) Sets the formula for the property 'suppress sub totals'.
-
Method Details
-
isRow
public boolean isRow()If this header is currently a row header or a column header.- Returns:
- true, if it is a row header.
- Since:
- 12.0
-
getX
public int getX()Position of this header, is used from designer.- Returns:
- the x position
- Since:
- 12.0
-
getY
public int getY()Position of this header, is used from designer.- Returns:
- the y position
- Since:
- 12.0
-
getWidth
public int getWidth()Position of this header, is used from designer.- Returns:
- the width
- Since:
- 12.0
-
getHeight
public int getHeight()Position of this header, is used from designer.- Returns:
- the height
- Since:
- 12.0
-
getSuppressTotal
public boolean getSuppressTotal()Returns whether total of this header should be suppressedtrue
or not (false
).- Returns:
- True if the sub total is suppressed or not.
- Since:
- 12.0
- See Also:
-
getSuppressTotalFormula
Returns the formula for the property 'suppress total'. If this property is enabled total of this header will not be printed.- Returns:
- The FormulaField of suppress sub total formula.
- Since:
- 12.0
-
setSuppressTotal
public void setSuppressTotal(boolean suppressTotal) Sets whether sub total should be suppressed (true
) or not (false
).- Parameters:
suppressTotal
- True if sub total should be suppressed else false.- Since:
- 12.0
-
setSuppressTotalFormula
Sets the formula for the property 'suppress sub totals'. If this property is enabled group label of the row will not be printed.- Parameters:
newFormula
- The new formula for the property 'suppress sub totals'.- Since:
- 12.0
-
setSuppressGroupLabel
public void setSuppressGroupLabel(boolean suppressGroupLabel) Sets whether group labels should be suppressed (true
) or not (false
).- Parameters:
suppressGroupLabel
- True if group label should be suppressed else false.- Since:
- 12.0
-
setSuppressGroupLabelFormula
Sets the formula for the property 'suppress group labels'. If this property is enabled group label of the row will not be printed.- Parameters:
newFormula
- The new formula for the property 'suppress group labels'.- Since:
- 12.0
-
getSuppressGroupLabel
public boolean getSuppressGroupLabel()Returns whether group labels should be suppressed (true
) or not (false
).- Returns:
- boolean True if the group labels is suppressed or not.
- Since:
- 12.0
- See Also:
-
CrossTabRow.setSuppressGroupLabel(boolean)
-
getSuppressGroupLabelFormula
Returns the formula for the property 'suppress group labels'. If this property is enabled group label of the row will not be printed.- Returns:
- The formulaField of Suppress Group Label Formula.
- Since:
- 12.0
-
getGroup
Returns the group object of this row. The group will benull
if this row is a total row. Set the group options of this row with the returned group object, i.e. the customize group name options and sort options.- Returns:
- Group The group object of this row
- Since:
- 12.0
- See Also:
-
getField
The field of the grouping.- Returns:
- the field
- Since:
- 12.0
-
setField
Set the field of grouping.- Parameters:
field
- the new field, can not be null- Since:
- 12.0
-
getText
Returns the text element of this row. This text will displayed als total text of this row. You can use this methode to set your own total text.- Returns:
- Total text of this row.
- Since:
- 12.0
- See Also:
-
getFieldElement
Returns the field element of this row. You can use this method to format the fieldelement of this row.- Returns:
- FieldElement of this row.
- Since:
- 12.0
-
setBackColor
public void setBackColor(int backColor) Sets the background color of the header.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.- Parameters:
backColor
- the new ABGR value of the grand total background color.- Since:
- 12.0
- See Also:
-
ColorUtils.toCcColor(Color)
ColorUtils.toJavaColor(int)
-
getBackColor
public int getBackColor()Returns the background color of the header as ABGR, i.e. 0x000000FF for red.- Returns:
- ABGR value of the grand total row background color or -1 if cross table contains no rows.
- Since:
- 12.0
- See Also:
-
setBackColor(int)
ColorUtils.toCcColor(Color)
ColorUtils.toJavaColor(int)
-
setBackColorFormula
Sets the formula of the background color of the header.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.- Parameters:
backColorFormula
- the new ABGR value of the grand total background color.- Since:
- 12.0
- See Also:
-
ColorUtils.toCcColor(Color)
ColorUtils.toJavaColor(int)
-
getBackColorFormula
Returns the formula of the background color of the header as ABGR, i.e. 0x000000FF for red.- Returns:
- ABGR value of the grand total row background color or -1 if cross table contains no rows.
- Since:
- 12.0
- See Also:
-
ColorUtils.toCcColor(Color)
ColorUtils.toJavaColor(int)
-
isDOMParser
public boolean isDOMParser()FOR INTERNAL USE ONLY Internal method for reading report XMLReturns whether this node is to be read via a DOM parser.
- Specified by:
isDOMParser
in interfaceNodeParser
- Returns:
- true if this node is to be read via a DOM parser, false otherwise.
- Since:
- 12.0
-
parseDOM
FOR INTERNAL USE ONLY Internal method for reading report XMLParses the node.
- Specified by:
parseDOM
in interfaceNodeParser
- Parameters:
node
- the nodeparserMap
- 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.- Since:
- 12.0
-
parseElement
public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) throws FatalParserExceptionFOR 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
- 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.- Since:
- 12.0
-
parseEndElement
public void parseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String, Object> parserMap) throws FatalParserExceptionFOR INTERNAL USE ONLY Internal method for reading report XMLReceive notification of the end of an XML tag.
- Specified by:
parseEndElement
in interfaceNodeParser
- 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.- Since:
- 12.0
-
parseText
FOR INTERNAL USE ONLY Internal method for reading report XMLThis method is called if text was encountered in the context of this node. (Examples would be a formula's text or a text element's text)
- Specified by:
parseText
in interfaceNodeParser
- Parameters:
text
- text encountered and to be storedparserMap
- The map of current Parser.- Since:
- 12.0
-