net.sf.jasperreports.engine
Interface JRElement

All Superinterfaces:
java.lang.Cloneable, JRChild, JRCloneable, JRCommonElement, JRIdentifiable, JRPropertiesHolder, JRStyleContainer, JRVisitable
All Known Subinterfaces:
JRBreak, JRChart, JRComponentElement, JRCrosstab, JREllipse, JRFrame, JRGenericElement, JRGraphicElement, JRImage, JRLine, JRRectangle, JRStaticText, JRSubreport, JRTextElement, JRTextField
All Known Implementing Classes:
ElementDecorator, FillTableSubreport, JRBaseBreak, JRBaseChart, JRBaseComponentElement, JRBaseCrosstab, JRBaseElement, JRBaseEllipse, JRBaseFrame, JRBaseGenericElement, JRBaseGraphicElement, JRBaseImage, JRBaseLine, JRBaseRectangle, JRBaseStaticText, JRBaseSubreport, JRBaseTextElement, JRBaseTextField, JRDesignBreak, JRDesignChart, JRDesignComponentElement, JRDesignCrosstab, JRDesignElement, JRDesignEllipse, JRDesignFrame, JRDesignGenericElement, JRDesignGraphicElement, JRDesignImage, JRDesignLine, JRDesignRectangle, JRDesignStaticText, JRDesignSubreport, JRDesignTextElement, JRDesignTextField, JRFillBreak, JRFillChart, JRFillComponentElement, JRFillCrosstab, JRFillElement, JRFillEllipse, JRFillFrame, JRFillGenericElement, JRFillGraphicElement, JRFillImage, JRFillLine, JRFillRectangle, JRFillStaticText, JRFillSubreport, JRFillTextElement, JRFillTextField, TableSubreport

public interface JRElement
extends JRChild, JRCommonElement, JRPropertiesHolder

An abstract representation of a report element. All report elements implement this interface. The interface contains constants and methods that apply to all report elements.

Version:
$Id: JRElement.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Method Summary
 void collectExpressions(JRExpressionCollector collector)
           
 JRElementGroup getElementGroup()
          Indicates the logical group that the element belongs to.
 java.lang.String getKey()
          Returns the string value that uniquely identifies the element.
 PositionTypeEnum getPositionTypeValue()
          Returns the position type for the element
 JRExpression getPrintWhenExpression()
          Gets the the expression that is evaluated in order to decide if the element should be displayed.
 JRGroup getPrintWhenGroupChanges()
          Returns the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed.
 JRPropertyExpression[] getPropertyExpressions()
          Returns the list of dynamic/expression-based properties for this report element.
 StretchTypeEnum getStretchTypeValue()
          Indicates the stretch type for the element
 int getX()
          Gets the the section relative horizontal offset of the element top left corner.
 int getY()
          Gets the the section relative vertical offset of the element top left corner.
 boolean isPrintInFirstWholeBand()
          Returns true if an element with a printRepeatedValues attribute set to true will be redisplayed for every new page or column that is not an overflow from a previous page or column.
 boolean isPrintRepeatedValues()
          Specifies if the element value will be printed for every iteration, even if its value has not changed.
 boolean isPrintWhenDetailOverflows()
          If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page.
 boolean isRemoveLineWhenBlank()
          Returns true if the remaining blank space appearing when the value is not printed will be removed.
 void setPositionType(PositionTypeEnum positionType)
          Sets the position type for the element.
 void setPrintInFirstWholeBand(boolean isPrintInFirstWholeBand)
          Specifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column.
 void setPrintRepeatedValues(boolean isPrintRepeatedValues)
           
 void setPrintWhenDetailOverflows(boolean isPrintWhenDetailOverflows)
          If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page.
 void setRemoveLineWhenBlank(boolean isRemoveLineWhenBlank)
          Specifies whether the remaining blank space appearing when the value is not printed will be removed.
 void setStretchType(StretchTypeEnum stretchTypeEnum)
          Specifies how the engine should treat a missing image.
 void setWidth(int width)
           
 void setX(int x)
          Sets the the section relative horizontal offset of the element top left corner.
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
 
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 

Method Detail

getKey

java.lang.String getKey()
Returns the string value that uniquely identifies the element.

Specified by:
getKey in interface JRCommonElement

getPositionTypeValue

PositionTypeEnum getPositionTypeValue()
Returns the position type for the element

Returns:
the position type

setPositionType

void setPositionType(PositionTypeEnum positionType)
Sets the position type for the element.

Parameters:
positionType - the position type

getStretchTypeValue

StretchTypeEnum getStretchTypeValue()
Indicates the stretch type for the element

Returns:
a value representing one of the stretch type constants in StretchTypeEnum

setStretchType

void setStretchType(StretchTypeEnum stretchTypeEnum)
Specifies how the engine should treat a missing image.

Parameters:
stretchTypeEnum - a value representing one of the stretch type constants in StretchTypeEnum

isPrintRepeatedValues

boolean isPrintRepeatedValues()
Specifies if the element value will be printed for every iteration, even if its value has not changed.

See Also:
isRemoveLineWhenBlank(), isPrintInFirstWholeBand()

setPrintRepeatedValues

void setPrintRepeatedValues(boolean isPrintRepeatedValues)

getX

int getX()
Gets the the section relative horizontal offset of the element top left corner.


setX

void setX(int x)
Sets the the section relative horizontal offset of the element top left corner.


getY

int getY()
Gets the the section relative vertical offset of the element top left corner.


setWidth

void setWidth(int width)

isRemoveLineWhenBlank

boolean isRemoveLineWhenBlank()
Returns true if the remaining blank space appearing when the value is not printed will be removed. Under certain circumstances (the element has an empty string as its value or contains a repeated value that is supressed) the space reserved for the current element remains empty. If this method returns true, it means the engine will try to suppress the blank line, but will only succeed if no other elements occupy the same vertical space.


setRemoveLineWhenBlank

void setRemoveLineWhenBlank(boolean isRemoveLineWhenBlank)
Specifies whether the remaining blank space appearing when the value is not printed will be removed. Under certain circumstances (the element has an empty string as its value or contains a repeated value that is supressed) the space reserved for the current element remains empty. If the parameter is set to true, it means the engine will try to suppress the blank line, but will only succeed if no other elements occupy the same vertical space.


isPrintInFirstWholeBand

boolean isPrintInFirstWholeBand()
Returns true if an element with a printRepeatedValues attribute set to true will be redisplayed for every new page or column that is not an overflow from a previous page or column.

See Also:
isPrintRepeatedValues()

setPrintInFirstWholeBand

void setPrintInFirstWholeBand(boolean isPrintInFirstWholeBand)
Specifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column.

See Also:
isPrintRepeatedValues()

isPrintWhenDetailOverflows

boolean isPrintWhenDetailOverflows()
If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. Actually if there is at least one element with this attribute, the band is redisplayed from the beginning, except those elements that fitted in the current page and have isPrintWhenDetailOverflow set to false.


setPrintWhenDetailOverflows

void setPrintWhenDetailOverflows(boolean isPrintWhenDetailOverflows)
If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. Actually if there is at least one element with this attribute, the band is redisplayed from the beginning, except those elements that fitted in the current page and have isPrintWhenDetailOverflow set to false.


getPrintWhenExpression

JRExpression getPrintWhenExpression()
Gets the the expression that is evaluated in order to decide if the element should be displayed. The print expression always returns a boolean value.


getPrintWhenGroupChanges

JRGroup getPrintWhenGroupChanges()
Returns the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed.

See Also:
isPrintRepeatedValues()

getElementGroup

JRElementGroup getElementGroup()
Indicates the logical group that the element belongs to. More elements can be grouped in order to get the height of the tallest one.

See Also:
StretchTypeEnum.RELATIVE_TO_TALLEST_OBJECT

collectExpressions

void collectExpressions(JRExpressionCollector collector)

getPropertyExpressions

JRPropertyExpression[] getPropertyExpressions()
Returns the list of dynamic/expression-based properties for this report element.

Returns:
an array containing the expression-based properties of this report element


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com