Interface ElementContainer

All Superinterfaces:
SimpleElementContainer
All Known Implementing Classes:
Section

public interface ElementContainer extends SimpleElementContainer
The interface describes the methods to add some complex elements such as multi-section lines, charts, subreports and crosstabs to the element container. There are the methods for copy, move and paste elements too.
Since:
9.1
  • Method Details

    • addBox

      Box addBox(int xpos, int ypos, int objwidth, int objheight, int y2, Section endSection)
      Adds a new box to container and returns it.
      Parameters:
      xpos - The horizontal offset in twips.
      ypos - The vertical offset in twips.
      objwidth - The width of the box in twips.
      objheight - The minimal height of the box in start section in twips.
      y2 - The vertical offset of the end point in end section
      endSection - The section where the box ends
      Returns:
      The created box element
      Since:
      9.1
    • addChart2

      Chart2 addChart2(ChartStyle style, int xpos, int ypos, int objwidth, int objheight) throws IllegalArgumentException
      Adds a new chart element to the container and returns it. The chart type is defined by the parameter style. You can use e.g. BarStyle.BAR2D for a simple bar chart 2D. To see which chart types are allowed see the subclasses of ChartStyle. Initializes all properties with default values.
      Parameters:
      style - the style of chart.
      xpos - the x offset of the upper left corner in twips.
      ypos - the y offset of the upper left corner in twips.
      objwidth - the total width of the chart element in twips.
      objheight - the total height of the chart element in twips.
      Returns:
      the new Chart2.
      Throws:
      IllegalArgumentException - if the parameters width, height or chartType are negative.
      Since:
      9.1
      See Also:
    • addCrossTab

      CrossTab addCrossTab(int xpos, int ypos, SummaryField field) throws IllegalArgumentException
      Adds the simplest possible cross table (at least on field for summarization) into this container and returns it. To make this cross table more complex use the add and append methods in class com.inet.report.CrossTab.
      Parameters:
      xpos - The x position of the upper left corner of the whole cross table in twips..
      ypos - The y position of the upper left corner of the whole cross table in twips..
      field - The field to summarize in cross table.
      Returns:
      The created Crosstab.
      Throws:
      IllegalArgumentException - if the parameters x or y are negative
      Since:
      9.1
      See Also:
    • addSignatureForm

      SignatureForm addSignatureForm(int xpos, int ypos, int objwidth, int objheight) throws IllegalArgumentException
      Adds a new signature form element to the container and returns it. The signature element is used only for PDF export.
      Parameters:
      xpos - the x position of the signature form element.
      ypos - the y position of the signature form element.
      objwidth - the width of the signature form element.
      objheight - the height of the signature form element.
      Returns:
      the created signature form element.
      Throws:
      IllegalArgumentException - if the parameters x, y, width or height are negative
      Since:
      9.1
    • addSubreport

      Subreport addSubreport(int xpos, int ypos, int objwidth, int objheight) throws IllegalArgumentException
      Adds a new subreport element to the container and returns it. Add-on is only possible if this report is a main report.
      Parameters:
      xpos - The x offset of the left upper corner of subreport frame.
      ypos - The y offset of the left upper corner of subreport frame.
      objwidth - The width of the subreport frame.
      objheight - The height of the subreport frame.
      Returns:
      The created subreport element. You can get the engine of the subreport with method getEngine in class Subreport.
      Throws:
      IllegalArgumentException - if the parameters x, y, width or height are negative.
      IllegalStateException - if the subreport is attempted to be added to a subreport
      Since:
      9.1
    • addSubreport

      Subreport addSubreport(int xpos, int ypos, int objwidth, int objheight, String filename) throws ReportException, MalformedURLException, FileNotFoundException
      Adds a new subreport element with definition from file to the container and returns it.
      Parameters:
      xpos - The x offset of the left upper corner of subreport frame.
      ypos - The y offset of the left upper corner of subreport frame.
      objwidth - The width of the subreport frame.
      objheight - The height of the subreport frame.
      filename - The file name of the subreport to insert.
      Returns:
      The created subreport element. You can get the engine of the subreport with method getEngine in class Subreport.
      Throws:
      MalformedURLException - Thrown to indicate that a malformed URL has occurred.
      ReportException - if Engine is not initialized or finished.
      FileNotFoundException - If no file for the subreport were found.
      IllegalStateException - if the subreport is attempted to be added to a subreport
      Since:
      9.1
    • addFormField

      com.inet.report.FormFieldElement addFormField(int xpos, int ypos, int objwidth, int objheight)
      Adds a new form field element to the container.
      Parameters:
      xpos - The x offset of the left upper corner of the form field.
      ypos - The y offset of the left upper corner of the form field.
      objwidth - The width of the form field.
      objheight - The height of the form field.
      Returns:
      the created form field element.
      Since:
      13.0
    • addInteractiveSorting

      com.inet.report.InteractiveSorting addInteractiveSorting(Field field, int xpos, int ypos, int objwidth, int objheight)
      Adds a new InteractiveSorting element to the container.
      Parameters:
      field - the a group field or a sorting field which sorting should be interactive.
      xpos - The x offset of the left upper corner of the form field.
      ypos - The y offset of the left upper corner of the form field.
      objwidth - The width of the form field.
      objheight - The height of the form field.
      Returns:
      the created form field element.
      Since:
      13.0
    • addVerticalLine

      Line addVerticalLine(int xpos, int ypos, int y2, Section endSection)
      Adds a new vertical line to the container and returns it.
      Parameters:
      xpos - The horizontal offset of the start point in twips.
      ypos - The vertical offset of the start point in twips.
      y2 - The vertical offset of the end point in end section in twips.
      endSection - The section where the line should end.
      Returns:
      The created line element.
      Since:
      9.1
    • pasteElement

      Element pasteElement(Object copy) throws ReportException
      Paste a copy of an Element in this container. The parameter is a byte array representing a serialized Element . If the Element needs references to a field or a group then these objects must exist in this Engine, otherwise a ReportException will be thrown. The coordinates on that the element will be paste in the container are the coordinates of the copied Element.
      Parameters:
      copy - An Object created with the method Element.copy().
      Returns:
      The inserted Element.
      Throws:
      ReportException - If the Element cannot be created because of missing References.
      Since:
      9.1
      See Also:
    • copyContent

      void copyContent(SimpleElementContainer source)
      Copies content and properties of the source container into this container.
      Parameters:
      source - The container thats content and properties should copied.
      Since:
      9.1
    • moveElement

      void moveElement(Element elem, SimpleElementContainer dest) throws ReportException
      Moves the element elem from this container to the destination container dest.
      Parameters:
      elem - The element, which should move to another container.
      dest - The destination container of movement.
      Throws:
      ReportException - will thrown if dest or elem is null.
      Since:
      9.1
      See Also: