Klasse ReportComponent

java.lang.Object
com.inet.report.ReportComponent
Alle implementierten Schnittstellen:
NodeParser, com.inet.report.ReferenceHolder, Serializable
Bekannte direkte Unterklassen:
CrossTabDescriptionSection, Element, Region

public abstract class ReportComponent extends Object implements 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:
  • the container components like area and section
  • the visible elements like fields
Seit:
7.0
Siehe auch:
  • Methodendetails

    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener pcl)
      FOR INTERNAL USE ONLY
    • addPropertyChangeListener

      public void addPropertyChangeListener(String property, PropertyChangeListener pcl)
      FOR INTERNAL USE ONLY
    • addVetoableChangeListener

      public void addVetoableChangeListener(VetoableChangeListener pcl)
      FOR INTERNAL USE ONLY
    • addVetoableChangeListener

      public void addVetoableChangeListener(String property, VetoableChangeListener pcl)
      FOR INTERNAL USE ONLY
    • removePropertyChangeListener

      public void removePropertyChangeListener(String property, PropertyChangeListener pcl)
      FOR INTERNAL USE ONLY
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener pcl)
      FOR INTERNAL USE ONLY
    • removeVetoableChangeListener

      public void removeVetoableChangeListener(VetoableChangeListener pcl)
      FOR INTERNAL USE ONLY
    • removeVetoableChangeListener

      public void removeVetoableChangeListener(String property, VetoableChangeListener pcl)
      FOR INTERNAL USE ONLY
    • getType

    • indexOf

      public abstract int indexOf() throws ReportException
      Returns the position of this object in the parent collection.
      Gibt zurück:
      Position of this object in the parent collection.
      Löst aus:
      ReportException - If there is no parent or the object does not exist.
      Seit:
      7.0
    • 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.
      Parameter:
      x - The x position in twips.
      Löst aus:
      IllegalArgumentException - if x is negative
      Seit:
      7.0
    • 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.
      Gibt zurück:
      The x position in twips.
      Seit:
      7.0
    • 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.
      Parameter:
      y - position in twips.
      Löst aus:
      IllegalArgumentException - if y is negative
      Seit:
      7.0
    • 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.
      Gibt zurück:
      The y position in twips.
      Seit:
      7.0
    • setWidth

      public void setWidth(int width)
      Sets the width of this report element. The unit is in twips.
      Parameter:
      width - The width in twips.
      Löst aus:
      IllegalArgumentException - if width is negative
      Seit:
      7.0
    • 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.
      Gibt zurück:
      The width in twips.
      Löst aus:
      UnsupportedOperationException - if this element spans multiple sections
      Seit:
      7.0
    • 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.
      Parameter:
      height - The height in twips.
      Löst aus:
      IllegalArgumentException - if height is negative
      Seit:
      7.0
    • 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.
      Gibt zurück:
      The height in twips.
      Löst aus:
      UnsupportedOperationException - if this element spans multiple sections
      Seit:
      7.0
    • 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.
      Parameter:
      newValue - The new value of the property 'suppress'.
      Seit:
      7.0
    • 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.
      Gibt zurück:
      The value of the property 'suppress'.
      Seit:
      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.
      Parameter:
      newFormula - The new formula for the property 'suppress'.
      Seit:
      7.0
    • getSuppressFormula

      public FormulaField getSuppressFormula()
      Returns the formula for the property 'suppress'.
      Gibt zurück:
      FormulaField The formula for the property 'suppress'.
      Seit:
      7.0
      Siehe auch:
    • 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.
      Parameter:
      backColor - The new ABGR value of the background color.
      Seit:
      7.0
      Siehe auch:
      • 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.
      Gibt zurück:
      The background color as ABGR
      Seit:
      7.0
      Siehe auch:
      • 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.
      Parameter:
      newFormula - Sets the new formula for 'back color'.
      Seit:
      7.0
    • 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.
      Gibt zurück:
      FormulaField The formula of the property 'back color'.
      Seit:
      7.0
      Siehe auch:
      • 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.
      Gibt zurück:
      The current value of the property 'keep together'.
      Seit:
      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.
      Parameter:
      newValue - The new value of the property 'keep together'.
      Seit:
      7.0
    • 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.
      Gibt zurück:
      FormulaField The formula for the property 'keep together'.
      Seit:
      7.0
    • 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.
      Parameter:
      newFormula - The new formula for the property 'keep together'.
      Seit:
      7.0
    • addReferencedObject

      public final void addReferencedObject(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY
      Angegeben von:
      addReferencedObject in Schnittstelle com.inet.report.ReferenceHolder
    • getReferencedObjects

      public final com.inet.report.ReferencedObject[] getReferencedObjects()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getReferencedObjects in Schnittstelle com.inet.report.ReferenceHolder
    • getReferencedObjectCount

      public final int getReferencedObjectCount()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getReferencedObjectCount in Schnittstelle com.inet.report.ReferenceHolder
    • getRealReferencedObjectCount

      public final int getRealReferencedObjectCount()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getRealReferencedObjectCount in Schnittstelle com.inet.report.ReferenceHolder
    • removeReferencedObject

      public final void removeReferencedObject(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY
      Angegeben von:
      removeReferencedObject in Schnittstelle com.inet.report.ReferenceHolder
    • setReferences

      public void setReferences()
      FOR INTERNAL USE ONLY
      Angegeben von:
      setReferences in Schnittstelle com.inet.report.ReferenceHolder
    • resetReferences

      public void resetReferences()
      FOR INTERNAL USE ONLY
      Angegeben von:
      resetReferences in Schnittstelle com.inet.report.ReferenceHolder
    • getPropertyFormulas

      public List<FormulaField> 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 descendant ReportComponent of this one. To get the property formulas for descendant ReportComponent use getSubComponents()
      Gibt zurück:
      List of property formulas
      Seit:
      7.0
    • getSubComponents

      public abstract List<? extends ReportComponent> getSubComponents()
      Returns all ReportComponents that are descendants of this one. E.G. this will return all Element of a Section. But it's as well useful for CrossTabs or Text elements which have additional elements.
      Gibt zurück:
      a list with all sub components which can be empty as well; will be null if the component has no descendants
      Seit:
      14.0
    • paramString

      public String paramString()
      Returns a string identifying this report component. This method is useful for logging and for debugging.
      Gibt zurück:
      a string identifying the ReportComponent
      Seit:
      7.0
    • parseElement

      public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Parses 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.

      Angegeben von:
      parseElement in Schnittstelle NodeParser
      Parameter:
      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 parsed
      atts - The set of attributes in the current XMLTag
      parserMap - The map of current Parser.
      Gibt zurück:
      The NodeParser sub-element if one needed to be created, or null if none was created.
      Löst aus:
      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.
    • parseText

      public void parseText(String text, Map<String,Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML

      This 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)

      Angegeben von:
      parseText in Schnittstelle NodeParser
      Parameter:
      text - text encountered and to be stored
      parserMap - The map of current Parser.
    • parseEndElement

      public void parseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Receive notification of the end of an XML tag.

      Angegeben von:
      parseEndElement in Schnittstelle NodeParser
      Parameter:
      group - XMLTag of the current node to be parsed, or null if there is no such current group.
      tag - The XMLTag to be parsed
      parserMap - The map of current Parser.
      Löst aus:
      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.
    • isDOMParser

      public boolean isDOMParser()
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Returns whether this node is to be read via a DOM parser.

      Angegeben von:
      isDOMParser in Schnittstelle NodeParser
      Gibt zurück:
      true if this node is to be read via a DOM parser, false otherwise.
    • parseDOM

      public void parseDOM(Node node, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Parses the node.

      Angegeben von:
      parseDOM in Schnittstelle NodeParser
      Parameter:
      node - the node
      parserMap - The map of current Parser.
      Löst aus:
      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.
    • getCustomData

      public Object getCustomData()
      FOR INTERNAL USE ONLY Returns the custom data of this report component.
      Gibt zurück:
      custom data of report component.
      Seit:
      9.2
    • setCustomData

      public void setCustomData(Object customData)
      FOR INTERNAL USE ONLY Sets the custom data for this report component.
      Parameter:
      customData - custom data of report component.
      Seit:
      9.2
    • getStructElem

      public String getStructElem()
      Get the PDF StructElem
      Gibt zurück:
      the StructElem type or null
      Seit:
      26.4
      Siehe auch:
    • setStructElem

      public void setStructElem(@Nullable String structElem) throws IllegalArgumentException
      Sets the PDF structure element for tagged PDF output (PDF/UA accessibility). This allows manual control over table structures according to ISO 32000-1

      Recommendation: Leave this unset unless auto-detection fails. Incorrect values may produce invalid or inaccessible PDF files.

      Values for Sections
      Value Description
      "Table" Marks the section as table container (start of Table). This is the section containing table column headers.
      "TR" Marks the section as table row
      A table in PDF ends when a section without StructElem begins or a new table begins with a section containing "Table".
      Values for text Elements (FieldElement, Text, etc.)
      Value Description
      "TD" Regular table cell (TD)
      "Column" Column header cell (TH with scope="Column")
      "Row" Row header cell (TH scope="Row")
      "Both" Header cell for both column and row (TH scope="Both")

      Syntax for Header with Span

      Header cells support optional colspan and rowspan: "{scope}:{colSpan}:{rowSpan}"
      • "TD" - Table data, span defaults to 1
      • "TD:2:3" - Table data spanning 2 columns and 3 rows
      • "Column" - Column header, span defaults to 1
      • "Column:2" - Column header spanning 2 columns
      • "Row:1:3" - Row header spanning 3 rows
      Parameter:
      structElem - the structElem or null
      Löst aus:
      IllegalArgumentException - if the value is invalid for this component
      Seit:
      26.4
      Siehe auch: