i-net Clear Reports

com.inet.report
Interface SimpleElementContainer

All Known Subinterfaces:
ElementContainer
All Known Implementing Classes:
CrossTabDescriptionSection, Section

public interface SimpleElementContainer

The interface describes the methods to add some elements such as Text, Box, Line, FieldElement, Picture, JavaBean and DataBasePicture to the container.

Since:
9.1

Method Summary
 Box addBox(int boxX, int boxY, int boxWidth, int boxHeight)
          Adds a new box to the container and returns it.
 DatabasePicture addDatabasePicture(Field field, int pictureX, int pictureY, int pictureWidth, int pictureHeight)
          Adds a new DatabasePicture to the container and returns it.
 FieldElement addFieldElement(Field field, int fieldX, int fieldY, int fieldWidth, int fieldHeight)
          Adds a new FieldElement (a dynamic text element based on a Field) to this container and returns it.
 Line addHorizontalLine(int xpos, int ypos, int objwidth)
          Adds a new horizontal line to the container and returns it.
 JavaBean addJavaBean(java.lang.String className, int xpos, int ypos, int objwidth, int objheight)
          Add a new JavaBean to the container.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, java.awt.image.BufferedImage im)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, java.lang.String fileName)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, byte[] buffer)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, java.io.File file)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, int[] buffer)
          Adds a new picture element to the container and returns it.
 Text addText(int xpos, int ypos, int objwidth, int objheight)
          Adds a new text element to the container.
 Line addVerticalLine(int xpos, int ypos, int length)
          Adds a new vertical line to the container and returns it.
 Element[] getElements()
          Returns an array containing all elements of this container.
 java.util.Vector getElementsV()
          Returns a Vector containing all elements in this container.
 Element getReportElement(int idx)
          Get a report Element.
 int getReportElementsCount()
          Counts the number of Report Elements in this container and returns it.
 void remove(Element elem)
          Removes the given report element from the container.
 

Method Detail

addBox

Box addBox(int boxX,
           int boxY,
           int boxWidth,
           int boxHeight)
Adds a new box to the container and returns it.

Parameters:
boxX - The horizontal offset in twips.
boxY - The vertical offset in twips.
boxWidth - The width of the box in twips.
boxHeight - The height of the box in twips.
Returns:
The created box element or null if the creation was not successfull
Throws:
java.lang.IllegalArgumentException - If the parameter width or height are negative.
Since:
9.1

addDatabasePicture

DatabasePicture addDatabasePicture(Field field,
                                   int pictureX,
                                   int pictureY,
                                   int pictureWidth,
                                   int pictureHeight)
Adds a new DatabasePicture to the container and returns it.

Parameters:
field - Field which value type is Field.BINARY and that should be added to the container. This can be a database field, a formula field, a prompt field or a SQL field.
pictureX - x-coordinate of the upper left corner in twips.
pictureY - y-coordinate of the upper left corner in twips.
pictureWidth - Width of the new fieldElement in twips.
pictureHeight - Height of the new fieldElement in twips.
Returns:
new created DatabasePicture
Since:
9.1

addFieldElement

FieldElement addFieldElement(Field field,
                             int fieldX,
                             int fieldY,
                             int fieldWidth,
                             int fieldHeight)
                             throws ReportException
Adds a new FieldElement (a dynamic text element based on a Field) to this container and returns it. Note that for binary fields you need to use the method addDatabasePicture(Field, int, int, int, int), since picture fields are not FieldElements.

Parameters:
field - The field that should added into container. May not be null.
fieldX - The x-coordinate of the upper left corner in twips.
fieldY - The y-coordinate of the upper left corner in twips.
fieldWidth - The width of the new fieldElement in twips.
fieldHeight - The height of the new fieldElement in twips.
Returns:
The created FieldElement or null if the creation was not successfull.
Throws:
ReportException - if the value type of the field is binary - use addDatabasePicture(Field, int, int, int, int) instead.
java.lang.IllegalArgumentException - if the parameters x, y, width or height are negative
java.lang.NullPointerException - if the field is null
Since:
9.1
See Also:
DatabaseField, FormulaField, PromptField, SummaryField, SQLField, GroupField

addJavaBean

JavaBean addJavaBean(java.lang.String className,
                     int xpos,
                     int ypos,
                     int objwidth,
                     int objheight)
                     throws ReportException
Add a new JavaBean to the container. The class of the Java Bean need to be extends form java.awt.Component.

Parameters:
className - The class name of the Java Bean.
xpos - The x-coordinate of the upper left corner in twips.
ypos - The y-coordinate of the upper left corner in twips.
objwidth - The width of the new fieldElement in twips.
objheight - The height of the new fieldElement in twips.
Returns:
The created JavaBean.
Throws:
java.lang.IllegalArgumentException - if the parameters x, y, width or height are negative.
ReportException - if the Java Bean cannot created.
Since:
6.0

addHorizontalLine

Line addHorizontalLine(int xpos,
                       int ypos,
                       int objwidth)
Adds a new horizontal 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.
objwidth - the width of the line in twips.
Returns:
the created line element
Throws:
java.lang.IllegalArgumentException - if some parameter is negative.
Since:
9.1

addVerticalLine

Line addVerticalLine(int xpos,
                     int ypos,
                     int length)
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.
length - the height of the line in twips.
Returns:
the created line element
Throws:
java.lang.IllegalArgumentException - if the parameters x, y or height are negative
Since:
9.1

addPicture

Picture addPicture(int xpos,
                   int ypos,
                   int objwidth,
                   int objheight,
                   java.awt.image.BufferedImage im)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used. The TYPE_INT_ARGB colormodel is supported only.

Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
im - The image object.
Returns:
Picture The created report element.
Throws:
ReportException - ReportException will thrown if im is an unknown picture format.
Since:
9.1

addPicture

Picture addPicture(int xpos,
                   int ypos,
                   int objwidth,
                   int objheight,
                   java.lang.String fileName)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips
objheight - The height of the picture in twips.
fileName - The absolute or relative to working directory path to the image.
Returns:
Picture The created report element.
Throws:
ReportException - will thrown if file is an unknown picture format.
Since:
9.1
See Also:
addPicture(int,int,int,int,java.io.File), addPicture(int,int,int,int,byte[])

addPicture

Picture addPicture(int xpos,
                   int ypos,
                   int objwidth,
                   int objheight,
                   byte[] buffer)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
buffer - A byte[] with image header and data.
Returns:
Picture The created report element.
Throws:
ReportException - ReportException will thrown if buffer is an unknown picture format.
ReportException - if buffer is an unknown picture format.
Since:
9.1
See Also:
addPicture(int,int,int,int,java.io.File), addPicture(int,int,int,int,String)

addPicture

Picture addPicture(int xpos,
                   int ypos,
                   int objwidth,
                   int objheight,
                   java.io.File file)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
file - The file object to the image.
Returns:
Picture The created report element.
Throws:
ReportException - will thrown if file is an unknown picture format.
Since:
9.1
See Also:
addPicture(int,int,int,int,String), addPicture(int,int,int,int,byte[])

addPicture

Picture addPicture(int xpos,
                   int ypos,
                   int objwidth,
                   int objheight,
                   int[] buffer)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
buffer - A int[] with image header and data.
Returns:
Picture The created report element.
Throws:
ReportException - ReportException will thrown if buffer is an unknown picture format.
Since:
9.1
See Also:
addPicture(int,int,int,int,java.io.File), addPicture(int,int,int,int,String)

addText

Text addText(int xpos,
             int ypos,
             int objwidth,
             int objheight)
             throws java.lang.IllegalArgumentException
Adds a new text element to the container. To fill a new line into this text element use addParagraph method. The returned text element is empty, that means it contains no paragraph object.

Parameters:
xpos - the x offset of the text element
ypos - the y offset of the text element
objwidth - the width of the text element
objheight - the height of the text element
Returns:
the created text element.
Throws:
java.lang.IllegalArgumentException - if the parameters x, y, width or height are negative
Since:
9.1

getElements

Element[] getElements()
Returns an array containing all elements of this container. Each field of the array contains an instance of class Element or an instance of Elements subclass.

Returns:
An array containing all elements in this container.
Since:
9.1
See Also:
getElementsV(), Element

getElementsV

java.util.Vector getElementsV()
Returns a Vector containing all elements in this container. Each element in the returned Vector is an instance of the class Element or an instance of Element's subclass.

Returns:
A Vector containing all elements in this container.
Since:
9.1
See Also:
getElements(), Element

getReportElement

Element getReportElement(int idx)
Get a report Element. You can specify the returned Element with the idx parameter.

Parameters:
idx - The 0-based index of the element, which should be returned.
Returns:
in instance of some subclass of Element.
Since:
9.1

getReportElementsCount

int getReportElementsCount()
Counts the number of Report Elements in this container and returns it.

Returns:
The number of report elements in this container.
Since:
9.1

remove

void remove(Element elem)
Removes the given report element from the container.

Parameters:
elem - The Report Element which should be removed from the container (null is not permitted).
Throws:
java.lang.IllegalArgumentException - if the parameter elem is null.
Since:
9.1

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH