public class CrossTabDescriptionSection extends ReportComponent implements SimpleElementContainer
Modifier and Type | Method and Description |
---|---|
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 lineLength)
Adds a new horizontal line to the container and returns it.
|
JavaBean |
addJavaBean(java.lang.String className,
int beanX,
int beanY,
int beanWidth,
int beanHeight)
Add a new JavaBean to the container.
|
Picture |
addPicture(int pictureX,
int pictureY,
int pictureWidth,
int pictureHeight,
java.lang.String fileName)
Adds a new picture element to the container and returns it.
|
Picture |
addPicture(int pictureX,
int pictureY,
int pictureWidth,
int pictureHeight,
java.io.File file)
Adds a new picture element to the container and returns it.
|
Picture |
addPicture(int pictureX,
int pictureY,
int pictureWidth,
int pictureHeight,
int[] buffer)
Adds a new picture element to the container and returns it.
|
Picture |
addPicture(int pictureX,
int pictureY,
int pictureWidth,
int pictureHeight,
byte[] buffer)
Adds a new picture element to the container and returns it.
|
Picture |
addPicture(int pictureX,
int pictureY,
int pictureWidth,
int pictureHeight,
java.awt.image.BufferedImage im)
Adds a new picture element to the container and returns it.
|
Text |
addText(int textX,
int textY,
int textWidth,
int textHeight)
Adds a new text element to the container.
|
Line |
addVerticalLine(int xpos,
int ypos,
int lineLength)
Adds a new vertical line to the container and returns it.
|
boolean |
contains(Element el)
Tests if the specified element is a component in this section.
|
Element[] |
getElements()
Returns an array containing all elements of this container.
|
java.util.Vector<Element> |
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.
|
java.util.List<Element> |
getSubComponents()
Returns all
ReportComponent s that are descendants of this one. |
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.
|
int |
indexOf()
Returns the position of this object in the parent collection.
|
void |
remove(Element elem)
Removes the given report element from the container.
|
void |
setHeight(int height)
This element can not be resized.
|
void |
setWidth(int width)
This element can not be resized.
|
void |
setX(int x)
This element can not be moved.
|
void |
setY(int y)
This element can not be moved.
|
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getPropertyFormulas, getSuppressFormula, getType, getWidth, isKeepTogether, isSuppress, paramString, setBackColor, setBackColorFormula, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public Box addBox(int boxX, int boxY, int boxWidth, int boxHeight)
addBox
in interface SimpleElementContainer
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.null
if the creation was not successfulpublic FieldElement addFieldElement(Field field, int fieldX, int fieldY, int fieldWidth, int fieldHeight) throws ReportException
Field
) to this container and returns it.
Note that for binary fields you need to use the method SimpleElementContainer.addDatabasePicture(Field, int, int, int, int)
, since picture
fields are not FieldElements.addFieldElement
in interface SimpleElementContainer
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.null
if the creation was not successful.ReportException
- if the value type of the field is binary - use SimpleElementContainer.addDatabasePicture(Field, int, int, int, int)
instead.DatabaseField
,
FormulaField
,
PromptField
,
SummaryField
,
SQLField
,
GroupField
public JavaBean addJavaBean(java.lang.String className, int beanX, int beanY, int beanWidth, int beanHeight) throws ReportException
addJavaBean
in interface SimpleElementContainer
className
- The class name of the Java Bean.beanX
- The x-coordinate of the upper left corner in twips.beanY
- The y-coordinate of the upper left corner in twips.beanWidth
- The width of the new fieldElement in twips.beanHeight
- The height of the new fieldElement in twips.ReportException
- if the Java Bean cannot created.public Picture addPicture(int pictureX, int pictureY, int pictureWidth, int pictureHeight, java.lang.String fileName) throws ReportException
addPicture
in interface SimpleElementContainer
pictureX
- The horizontal offset of the start point in twips.pictureY
- The vertical offset of the start point in twips.pictureWidth
- The width of the picture in twipspictureHeight
- The height of the picture in twips.fileName
- The absolute or relative to working directory path to the image.ReportException
- will thrown if file
is an unknown picture format.SimpleElementContainer.addPicture(int,int,int,int,java.awt.image.BufferedImage)
,
SimpleElementContainer.addPicture(int,int,int,int,java.io.File)
,
SimpleElementContainer.addPicture(int,int,int,int,byte[])
,
SimpleElementContainer.addPicture(int, int, int, int, int[])
public Picture addPicture(int pictureX, int pictureY, int pictureWidth, int pictureHeight, java.io.File file) throws ReportException
addPicture
in interface SimpleElementContainer
pictureX
- The horizontal offset of the start point in twips.pictureY
- The vertical offset of the start point in twips.pictureWidth
- The width of the picture in twips.pictureHeight
- The height of the picture in twips.file
- The file object to the image.ReportException
- will thrown if file
is an unknown picture format.SimpleElementContainer.addPicture(int, int, int, int, BufferedImage)
,
SimpleElementContainer.addPicture(int, int, int, int, String)
,
SimpleElementContainer.addPicture(int, int, int, int, byte[])
,
SimpleElementContainer.addPicture(int, int, int, int, int[])
public Picture addPicture(int pictureX, int pictureY, int pictureWidth, int pictureHeight, int[] buffer) throws ReportException
addPicture
in interface SimpleElementContainer
pictureX
- The horizontal offset of the start point in twips.pictureY
- The vertical offset of the start point in twips.pictureWidth
- The width of the picture in twips.pictureHeight
- The height of the picture in twips.buffer
- A int[] with image header and data.ReportException
- ReportException will thrown if buffer
is an unknown picture format.SimpleElementContainer.addPicture(int, int, int, int, java.awt.image.BufferedImage)
,
SimpleElementContainer.addPicture(int, int, int, int, String)
,
SimpleElementContainer.addPicture(int, int, int, int, byte[])
,
SimpleElementContainer.addPicture(int, int, int, int, File)
,
SimpleElementContainer.addPicture(int,int,int,int,java.io.File)
,
SimpleElementContainer.addPicture(int,int,int,int,String)
public Picture addPicture(int pictureX, int pictureY, int pictureWidth, int pictureHeight, byte[] buffer) throws ReportException
addPicture
in interface SimpleElementContainer
pictureX
- The horizontal offset of the start point in twips.pictureY
- The vertical offset of the start point in twips.pictureWidth
- The width of the picture in twips.pictureHeight
- The height of the picture in twips.buffer
- A byte[] with image header and data.ReportException
- ReportException will thrown if buffer
is an unknown picture format.SimpleElementContainer.addPicture(int,int,int,int,java.awt.image.BufferedImage)
,
SimpleElementContainer.addPicture(int, int, int, int, String)
,
SimpleElementContainer.addPicture(int,int,int,int,java.io.File)
,
SimpleElementContainer.addPicture(int, int, int, int, int[])
public Picture addPicture(int pictureX, int pictureY, int pictureWidth, int pictureHeight, java.awt.image.BufferedImage im) throws ReportException
addPicture
in interface SimpleElementContainer
pictureX
- The horizontal offset of the start point in twips.pictureY
- The vertical offset of the start point in twips.pictureWidth
- The width of the picture in twips.pictureHeight
- The height of the picture in twips.im
- The image object.ReportException
- ReportException will thrown if im
is an unknown picture format.SimpleElementContainer.addPicture(int, int, int, int, String)
,
SimpleElementContainer.addPicture(int,int,int,int,java.io.File)
,
SimpleElementContainer.addPicture(int,int,int,int,byte[])
,
SimpleElementContainer.addPicture(int, int, int, int, int[])
public DatabasePicture addDatabasePicture(Field field, int pictureX, int pictureY, int pictureWidth, int pictureHeight)
addDatabasePicture
in interface SimpleElementContainer
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.public Text addText(int textX, int textY, int textWidth, int textHeight)
addParagraph
method.
The returned text element is empty, that means it contains no paragraph object.addText
in interface SimpleElementContainer
textX
- the x offset of the text elementtextY
- the y offset of the text elementtextWidth
- the width of the text elementtextHeight
- the height of the text elementpublic Line addHorizontalLine(int xpos, int ypos, int lineLength)
addHorizontalLine
in interface SimpleElementContainer
xpos
- the horizontal offset of the start point in twips.ypos
- the vertical offset of the start point in twips.lineLength
- the width of the line in twips.public Line addVerticalLine(int xpos, int ypos, int lineLength)
addVerticalLine
in interface SimpleElementContainer
xpos
- the horizontal offset of the start point in twips.ypos
- the vertical offset of the start point in twips.lineLength
- the height of the line in twips.public void remove(Element elem)
remove
in interface SimpleElementContainer
elem
- The Report Element which should be removed from the container (null
is not permitted).public java.util.Vector<Element> getElementsV()
getElementsV
in interface SimpleElementContainer
SimpleElementContainer.getElements()
,
Element
public Element[] getElements()
getElements
in interface SimpleElementContainer
SimpleElementContainer.getElementsV()
,
Element
public boolean contains(Element el)
el
- an element.true
if and only if the specified element is the same as a component in this section, as determined by the equals method; false
otherwise.public void setX(int x)
setX
in class ReportComponent
x
- has no effectpublic void setY(int y)
setY
in class ReportComponent
y
- has no effectpublic int getX()
getX
in class ReportComponent
public int getY()
getY
in class ReportComponent
public void setWidth(int width)
setWidth
in class ReportComponent
width
- Cannot be set for this element.public void setHeight(int height)
setHeight
in class ReportComponent
height
- Cannot be set for this element.public int indexOf() throws ReportException
indexOf
in class ReportComponent
ReportException
- If there is no parent or the object does not exist.public Element getReportElement(int idx)
getReportElement
in interface SimpleElementContainer
idx
- The 0-based index of the element, which should be returned.public int getReportElementsCount()
getReportElementsCount
in interface SimpleElementContainer
public java.util.List<Element> getSubComponents()
ReportComponent
s that are descendants of this one. E.G. this will return all Element
of a Section
. But it's as well useful for CrossTab
s or Text
elements which have
additional elements.getSubComponents
in class ReportComponent
null
if the component has no descendantsCopyright © 1999-2020 by i-net software GmbH