i-net Clear Reports

com.inet.report
Class ReportComponent

java.lang.Object
  extended by com.inet.report.ReportComponent
All Implemented Interfaces:
NodeParser, com.inet.report.ReferenceHolder, java.io.Serializable
Direct Known Subclasses:
CrossTabDescriptionSection, Element, Region

public abstract class ReportComponent
extends java.lang.Object
implements java.io.Serializable, com.inet.report.ReferenceHolder, NodeParser

This is the base class of all report components. Report components are the structure components of a report. There are 2 types of components:

See Also:
Serialized Form

Method Summary
 int getBackColor()
          Returns the background color of this report element as ABGR, i.e. 0x000000FF for red.
 FormulaField getBackColorFormula()
          Returns the background color formula of this report element.
 int getHeight()
          Returns the height of this report element.
 FormulaField getKeepTogetherFormula()
          Returns the formula for the property 'keep together'.
 java.util.List getPropertyFormulas()
          Returns a list with all property formulas that are set for this report element.
 FormulaField getSuppressFormula()
          Returns the formula for the property 'suppress'.
 int getType()
          Returns the type of this report element.
 int getWidth()
          Returns the width of this report element.
 int getX()
          Returns the x position of the left upper corner of the element in the report.
 int getY()
          Returns the y position of the left upper corner of the element in the report.
abstract  int indexOf()
          Returns the position of this object in the parent collection.
 boolean isKeepTogether()
          Returns the value of the property 'keep together'.
 boolean isSuppress()
          Returns the value of the property 'suppress'.
 java.lang.String paramString()
          Returns a string identifying this report component.
 void setBackColor(int backColor)
          Sets the background color of this report element.
 void setBackColorFormula(FormulaField newFormula)
          Sets the background color of this report element.
 void setHeight(int height)
          Sets the height of this report element.
 void setKeepTogether(boolean newValue)
          Sets the value of the property 'keep together'.
 void setKeepTogetherFormula(FormulaField newFormula)
          Sets the formula for the property 'keep together'.
 void setSuppress(boolean newValue)
          Sets the value of the property 'suppress'.
 void setSuppressFormula(FormulaField newFormula)
          Sets the formula for the property 'suppress'.
 void setWidth(int width)
          Sets the width of this report element.
 void setX(int x)
          Sets the x position of the left upper corner of the element in the report.
 void setY(int y)
          Sets the y position of the left upper corner of the element in the report.
 
Methods inherited from interface com.inet.report.parser.NodeParser
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
 

Method Detail

getType

public int getType()
Returns the type of this report element.

Returns:
The value of the property 'type'.
See Also:
Element.FIELD, Element.TEXT, Element.LINE, Element.BOX, Element.SUBREPORT, Element.PICTURE, Element.CHART, Element.CROSSTAB, Element.DATABASE_PICTURE, Element.PARAGRAPH, Element.TEXTPART, Element.FIELDPART, Text, FieldElement, Line, Box, Chart2, Picture, Subreport, DatabasePicture, CrossTab, Paragraph, TextPart, FieldPart

indexOf

public abstract int indexOf()
                     throws ReportException
Returns the position of this object in the parent collection.

Returns:
Position of this object in the parent collection.
Throws:
ReportException - If there is no parent or the object does not exist.

setX

public void setX(int x)
Sets the x position of the left upper corner of the element in the report. Use the 'object x position' property the adjust the element position from the left side margin. The unit is in twips.

Parameters:
x - The x position in twips.
Throws:
java.lang.IllegalArgumentException - if x is negative

getX

public int getX()
Returns the x position of the left upper corner of the element in the report. Use the 'object x position' property the adjust the element position from the left side margin. The unit is in twips.

Returns:
The x position in twips.

setY

public void setY(int y)
Sets the y position of the left upper corner of the element in the report. Use the 'object y position' property the adjust the element position from the top margin. The unit is in twips.

Parameters:
y - position in twips.
Throws:
java.lang.IllegalArgumentException - if y is negative

getY

public int getY()
Returns the y position of the left upper corner of the element in the report. Use the 'object y position' property the adjust the element position from the top margin. The unit is in twips.

Returns:
The y position in twips.

setWidth

public void setWidth(int width)
Sets the width of this report element. The unit is in twips.

Parameters:
width - The width in twips.
Throws:
java.lang.IllegalArgumentException - if width is negative

getWidth

public int getWidth()
Returns the width of this report element. Use the 'element width' property to change the width of the element. The unit is in twips.

Returns:
The width in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections

setHeight

public void setHeight(int height)
Sets the height of this report element. Use the 'element height' property to change the height of the element. The unit is in twips.

Parameters:
height - The height in twips.
Throws:
java.lang.IllegalArgumentException - if height is negative

getHeight

public int getHeight()
Returns the height of this report element. Use the 'element height' property to change the height of the element. The unit is in twips.

Returns:
The height in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections

setSuppress

public void setSuppress(boolean newValue)
Sets the value of the property 'suppress'. Set this property if you do not want the section to print, but you dont't want to keep the section content available for drill down. Drill Down is not supported yet.

Parameters:
newValue - The new value of the property 'suppress'.

isSuppress

public boolean isSuppress()
Returns the value of the property 'suppress'. Set this property if you do not want the section to print, but you dont't want to keep the section content available for drill down. Drill Down is not supported yet.

Returns:
The value of the property 'suppress'.
Since:
7.0

setSuppressFormula

public void setSuppressFormula(FormulaField newFormula)
Sets the formula for the property 'suppress'. Use this property to change the visibility of the element when printing dynamically.

Parameters:
newFormula - The new formula for the property 'suppress'.

getSuppressFormula

public FormulaField getSuppressFormula()
Returns the formula for the property 'suppress'.

Returns:
FormulaField The formula for the property 'suppress'.
See Also:
setSuppress(boolean), setSuppressFormula(com.inet.report.FormulaField)

setBackColor

public void setBackColor(int backColor)
Sets the background color of this report element. 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 background color.
See Also:
ColorUtils.toCcColor(Color), ColorUtils.toJavaColor(int)

getBackColor

public int getBackColor()
Returns the background color of this report element as ABGR, i.e. 0x000000FF for red. More information about the usage of colors in RDC can be found in the RDC documentation.

Returns:
The background color as ABGR
See Also:
ColorUtils.toCcColor(Color), ColorUtils.toJavaColor(int)

setBackColorFormula

public void setBackColorFormula(FormulaField newFormula)
Sets the background color of this report element. Set the value as ABGR, i.e. 0x000000FF for red or use the color constants in class CoderXML. More information about the usage of colors in RDC can be found in the RDC documentation.

Parameters:
newFormula - Sets the new formula for 'back color'.

getBackColorFormula

public FormulaField getBackColorFormula()
Returns the background color formula of this report element. Set the value as ABGR, i.e. 0x000000FF for red or use the color constants in class CoderXML. More information about the usage of colors in RDC can be found in the RDC documentation.

Returns:
FormulaField The formula of the property 'back color'.
See Also:
ColorUtils.toCcColor(Color), ColorUtils.toJavaColor(int)

isKeepTogether

public boolean isKeepTogether()
Returns the value of the property 'keep together'. If this property is enabled the element will not printed over more than one page. If no space is available on this page it will be printed on the next. Using this property for sections all elements will be printed on one page.

Returns:
The current value of the property 'keep together'.
Since:
7.0

setKeepTogether

public void setKeepTogether(boolean newValue)
Sets the value of the property 'keep together'. If this property is enabled the element will not printed over more than one page. If no space is available on this page it will be printed on the next. Using this property for sections all elements will be printed on one page.

Parameters:
newValue - The new value of the property 'keep together'.

getKeepTogetherFormula

public FormulaField getKeepTogetherFormula()
Returns the formula for the property 'keep together'. If this property is enabled the element will not printed over more than one page. If no space is available on this page it will be printed on the next. Using this property for sections all elements will be printed on one page.

Returns:
FormulaField The formula for the property 'keep together'.

setKeepTogetherFormula

public void setKeepTogetherFormula(FormulaField newFormula)
Sets the formula for the property 'keep together'. If this property is enabled the element will not printed over more than one page. If no space is available on this page it will be printed on the next. Using this property for sections all elements will be printed on one page.

Parameters:
newFormula - The new formula for the property 'keep together'.

getPropertyFormulas

public java.util.List getPropertyFormulas()
Returns a list with all property formulas that are set for this report element.

Returns:
List of property formulas

paramString

public java.lang.String paramString()
Returns a string identifying this report component. This method is useful for logging and for debugging.

Returns:
a string identifying the ReportComponent

i-net Clear Reports

Copyright © 1999-2015 by i-net software GmbH