Class JRDesignElement
java.lang.Object
net.sf.jasperreports.engine.base.JRBaseElement
net.sf.jasperreports.engine.design.JRDesignElement
- All Implemented Interfaces:
Serializable,Cloneable,JRChangeEventsSupport,JRChild,JRCloneable,JRCommonElement,JRElement,JRIdentifiable,JRPropertiesHolder,JRStyleContainer,JRVisitable
- Direct Known Subclasses:
JRDesignBreak,JRDesignChart,JRDesignComponentElement,JRDesignCrosstab,JRDesignFrame,JRDesignGenericElement,JRDesignGraphicElement,JRDesignSubreport,JRDesignTextElement
This class provides a skeleton implementation for a design time report element. The difference between design elements
and compiled elements is that at design time they are more customizable. This class contains setters for properties
that can be only modified at design time.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class net.sf.jasperreports.engine.base.JRBaseElement
backcolor, defaultStyleProvider, elementGroup, forecolor, height, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, key, mode, parentStyle, parentStyleNameReference, positionType, printWhenExpression, printWhenGroupChanges, PROPERTY_POSITION_TYPE, PROPERTY_PRINT_IN_FIRST_WHOLE_BAND, PROPERTY_PRINT_REPEATED_VALUES, PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS, PROPERTY_REMOVE_LINE_WHEN_BLANK, PROPERTY_STRETCH_TYPE, PROPERTY_WIDTH, PROPERTY_X, stretchType, styleExpression, uuid, width, x, yFields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJRDesignElement(JRDefaultStyleProvider defaultStyleProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyExpression(JRPropertyExpression propertyExpression) Add a dynamic/expression-based property.clone()Returns the list of dynamic/expression-based properties for this report element.Returns the list of property expressions.Remove a property expression.voidremovePropertyExpression(JRPropertyExpression propertyExpression) Remove a property expression.voidsetElementGroup(JRElementGroup elementGroup) Specifies the logical group that the element belongs to.voidsetHeight(int height) voidSets the unique identifier for the element.voidsetPrintWhenExpression(JRExpression expression) Sets the print when expression.voidsetPrintWhenGroupChanges(String group) Specifies the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed.voidvoidsetStyleExpression(JRExpression expression) Sets the style expression.voidsetStyleNameReference(String styleName) Set the name of the external style to be used for this element.voidsetY(int y) Sets the vertical section relative offset for the element.Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElement
clone, clone, getBackcolor, getBaseStyle, getDefaultStyleProvider, getElementGroup, getEventSupport, getForecolor, getHeight, getKey, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getStretchType, getStyle, getStyleExpression, getStyleNameReference, getStyleResolver, getUUID, getWidth, getX, getY, hasProperties, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setUUID, setWidth, setXMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.JRElement
collectExpressionsMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getStyleNameMethods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
Field Details
-
PROPERTY_ELEMENT_GROUP
- See Also:
-
PROPERTY_HEIGHT
- See Also:
-
PROPERTY_KEY
- See Also:
-
PROPERTY_PRINT_WHEN_EXPRESSION
- See Also:
-
PROPERTY_PRINT_WHEN_GROUP_CHANGES
- See Also:
-
PROPERTY_PARENT_STYLE
- See Also:
-
PROPERTY_PARENT_STYLE_NAME_REFERENCE
- See Also:
-
PROPERTY_STYLE_EXPRESSION
- See Also:
-
PROPERTY_Y
- See Also:
-
PROPERTY_PROPERTY_EXPRESSIONS
- See Also:
-
-
Constructor Details
-
JRDesignElement
-
-
Method Details
-
setKey
Sets the unique identifier for the element. -
setY
public void setY(int y) Sets the vertical section relative offset for the element. -
setHeight
public void setHeight(int height) -
setPrintWhenExpression
Sets the print when expression. This expression must always return an instance of Boolean and its value will decide if the element will be displayed. -
setPrintWhenGroupChanges
Specifies the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed. -
setElementGroup
Specifies the logical group that the element belongs to. More elements can be grouped in order to make some of them stretch relative to the height of their parent group.- See Also:
-
setStyle
-
setStyleNameReference
Set the name of the external style to be used for this element. An external style is only effective when there is no internal style set for this element, i.e.getStyle()returnsnullThe external style will be resolved at fill time from the templates used in the report.- Parameters:
styleName- the name of the external style- See Also:
-
setStyleExpression
Sets the style expression. This expression must always return a String value representing the name of the style. -
addPropertyExpression
Add a dynamic/expression-based property.- Parameters:
propertyExpression- the property to add- See Also:
-
removePropertyExpression
Remove a property expression.- Parameters:
propertyExpression- the property expression to remove- See Also:
-
removePropertyExpression
Remove a property expression.- Parameters:
name- the name of the property to remove- Returns:
- the removed property expression (if found)
-
getPropertyExpressionsList
Returns the list of property expressions.- Returns:
- the list of property expressions (
JRPropertyExpressioninstances) - See Also:
-
getPropertyExpressions
Description copied from interface:JRElementReturns the list of dynamic/expression-based properties for this report element.- Specified by:
getPropertyExpressionsin interfaceJRElement- Overrides:
getPropertyExpressionsin classJRBaseElement- Returns:
- an array containing the expression-based properties of this report element
-
clone
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classJRBaseElement
-