net.sf.jasperreports.engine.design
Class JRDesignElement

java.lang.Object
  extended by net.sf.jasperreports.engine.base.JRBaseElement
      extended by net.sf.jasperreports.engine.design.JRDesignElement
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, JRChangeEventsSupport, JRChild, JRCloneable, JRCommonElement, JRElement, JRPropertiesHolder, JRStyleContainer, JRVisitable
Direct Known Subclasses:
JRDesignBreak, JRDesignChart, JRDesignCrosstab, JRDesignFrame, JRDesignGraphicElement, JRDesignSubreport, JRDesignTextElement

public abstract class JRDesignElement
extends JRBaseElement

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.

Version:
$Id: JRDesignElement.java 1915 2007-10-22 16:11:10Z lucianc $
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTY_ELEMENT_GROUP
           
static java.lang.String PROPERTY_HEIGHT
           
static java.lang.String PROPERTY_KEY
           
static java.lang.String PROPERTY_PARENT_STYLE
           
static java.lang.String PROPERTY_PARENT_STYLE_NAME_REFERENCE
           
static java.lang.String PROPERTY_PRINT_WHEN_EXPRESSION
           
static java.lang.String PROPERTY_PRINT_WHEN_GROUP_CHANGES
           
static java.lang.String PROPERTY_Y
           
 
Fields 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, width, x, y
 
Fields inherited from interface net.sf.jasperreports.engine.JRElement
MODE_OPAQUE, MODE_TRANSPARENT, POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM, POSITION_TYPE_FIX_RELATIVE_TO_TOP, POSITION_TYPE_FLOAT, STRETCH_TYPE_NO_STRETCH, STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT, STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT
 
Constructor Summary
protected JRDesignElement(JRDefaultStyleProvider defaultStyleProvider)
           
 
Method Summary
 void setElementGroup(JRElementGroup elementGroup)
          Specifies the logical group that the element belongs to.
 void setHeight(int height)
           
 void setKey(java.lang.String key)
          Sets the unique identifier for the element.
 void setPrintWhenExpression(JRExpression expression)
          Sets the print when expression.
 void setPrintWhenGroupChanges(JRGroup 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.
 void setStyle(JRStyle style)
           
 void setStyleNameReference(java.lang.String styleName)
          Set the name of the external style to be used for this element.
 void setY(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, getStyleNameReference, getWidth, getX, getY, hasProperties, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
collectExpressions
 
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
 

Field Detail

PROPERTY_ELEMENT_GROUP

public static final java.lang.String PROPERTY_ELEMENT_GROUP
See Also:
Constant Field Values

PROPERTY_HEIGHT

public static final java.lang.String PROPERTY_HEIGHT
See Also:
Constant Field Values

PROPERTY_KEY

public static final java.lang.String PROPERTY_KEY
See Also:
Constant Field Values

PROPERTY_PRINT_WHEN_EXPRESSION

public static final java.lang.String PROPERTY_PRINT_WHEN_EXPRESSION
See Also:
Constant Field Values

PROPERTY_PRINT_WHEN_GROUP_CHANGES

public static final java.lang.String PROPERTY_PRINT_WHEN_GROUP_CHANGES
See Also:
Constant Field Values

PROPERTY_PARENT_STYLE

public static final java.lang.String PROPERTY_PARENT_STYLE
See Also:
Constant Field Values

PROPERTY_PARENT_STYLE_NAME_REFERENCE

public static final java.lang.String PROPERTY_PARENT_STYLE_NAME_REFERENCE
See Also:
Constant Field Values

PROPERTY_Y

public static final java.lang.String PROPERTY_Y
See Also:
Constant Field Values
Constructor Detail

JRDesignElement

protected JRDesignElement(JRDefaultStyleProvider defaultStyleProvider)
Method Detail

setKey

public void setKey(java.lang.String key)
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

public void setPrintWhenExpression(JRExpression expression)
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

public void setPrintWhenGroupChanges(JRGroup 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.


setElementGroup

public void setElementGroup(JRElementGroup elementGroup)
Specifies 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:
JRElement.STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT

setStyle

public void setStyle(JRStyle style)

setStyleNameReference

public void setStyleNameReference(java.lang.String styleName)
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() returns null The 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:
JRBaseElement.getStyleNameReference()


© 2001-2006 JasperSoft Corporation www.jaspersoft.com