Package net.sf.jasperreports.engine.base
Class JRBaseSubreport
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseElement
-
- net.sf.jasperreports.engine.base.JRBaseSubreport
-
- All Implemented Interfaces:
Serializable,Cloneable,JRChangeEventsSupport,JRChild,JRCloneable,JRCommonElement,JRElement,JRIdentifiable,JRPropertiesHolder,JRStyleContainer,JRSubreport,JRVisitable
public class JRBaseSubreport extends JRBaseElement implements JRSubreport
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected JRExpressionconnectionExpressionprotected JRExpressiondataSourceExpressionprotected JRExpressionexpressionprotected BooleanisUsingCacheprotected JRSubreportParameter[]parametersprotected JRExpressionparametersMapExpressionstatic StringPROPERTY_OVERFLOW_TYPEstatic StringPROPERTY_RUN_TO_BOTTOMstatic StringPROPERTY_USING_CACHEprotected JRSubreportReturnValue[]returnValuesValues to be copied from the subreport into the master report.-
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElement
backcolor, defaultStyleProvider, elementGroup, forecolor, height, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, key, modeValue, parentStyle, parentStyleNameReference, positionTypeValue, 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, stretchTypeValue, styleExpression, uuid, width, x, y
-
Fields inherited from interface net.sf.jasperreports.engine.JRElement
PROPERTY_ELEMENT_TEMPLATE_POPULATE_STYLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJRBaseSubreport(JRSubreport subreport, JRBaseObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()voidcollectExpressions(JRExpressionCollector collector)JRExpressiongetConnectionExpression()JRExpressiongetDataSourceExpression()JRExpressiongetExpression()ModeEnumgetModeValue()Returns the element transparency mode.OverflowTypegetOverflowType()JRSubreportParameter[]getParameters()JRExpressiongetParametersMapExpression()JRSubreportReturnValue[]getReturnValues()Returns the list of values to be copied from the subreport into the master.BooleangetUsingCache()Indicates if the engine is loading the current subreport from cache.BooleanisRunToBottom()Specifies whether the subreport element will consume the entire vertical space available on the report page.voidsetOverflowType(OverflowType overflowType)voidsetRunToBottom(Boolean runToBottom)Sets the flag that Specifies whether the subreport element will consume the entire vertical space available on the report page.voidsetUsingCache(Boolean isUsingCache)Specifies if the engine should be loading the current subreport from cache.voidvisit(JRVisitor visitor)-
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElement
clone, clone, getBackcolor, getBaseStyle, getDefaultStyleProvider, getElementGroup, getEventSupport, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getPropertyExpressions, getStretchTypeValue, getStyle, getStyleExpression, getStyleNameReference, getStyleResolver, getUUID, getWidth, getX, getY, hasProperties, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setUUID, 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.JRCommonElement
getBackcolor, getForecolor, getHeight, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
-
Methods inherited from interface net.sf.jasperreports.engine.JRElement
clone, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getStyleExpression, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
-
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
-
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
-
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
-
-
-
-
Field Detail
-
PROPERTY_USING_CACHE
public static final String PROPERTY_USING_CACHE
- See Also:
- Constant Field Values
-
PROPERTY_RUN_TO_BOTTOM
public static final String PROPERTY_RUN_TO_BOTTOM
- See Also:
- Constant Field Values
-
PROPERTY_OVERFLOW_TYPE
public static final String PROPERTY_OVERFLOW_TYPE
- See Also:
- Constant Field Values
-
isUsingCache
protected Boolean isUsingCache
-
parametersMapExpression
protected JRExpression parametersMapExpression
-
parameters
protected JRSubreportParameter[] parameters
-
connectionExpression
protected JRExpression connectionExpression
-
dataSourceExpression
protected JRExpression dataSourceExpression
-
expression
protected JRExpression expression
-
returnValues
protected JRSubreportReturnValue[] returnValues
Values to be copied from the subreport into the master report.
-
-
Constructor Detail
-
JRBaseSubreport
protected JRBaseSubreport(JRSubreport subreport, JRBaseObjectFactory factory)
-
-
Method Detail
-
getModeValue
public ModeEnum getModeValue()
Description copied from interface:JRCommonElementReturns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.- Specified by:
getModeValuein interfaceJRCommonElement- Overrides:
getModeValuein classJRBaseElement
-
getParametersMapExpression
public JRExpression getParametersMapExpression()
- Specified by:
getParametersMapExpressionin interfaceJRSubreport
-
getParameters
public JRSubreportParameter[] getParameters()
- Specified by:
getParametersin interfaceJRSubreport
-
getConnectionExpression
public JRExpression getConnectionExpression()
- Specified by:
getConnectionExpressionin interfaceJRSubreport
-
getDataSourceExpression
public JRExpression getDataSourceExpression()
- Specified by:
getDataSourceExpressionin interfaceJRSubreport
-
getExpression
public JRExpression getExpression()
- Specified by:
getExpressionin interfaceJRSubreport
-
collectExpressions
public void collectExpressions(JRExpressionCollector collector)
- Specified by:
collectExpressionsin interfaceJRElement
-
visit
public void visit(JRVisitor visitor)
- Specified by:
visitin interfaceJRVisitable
-
getReturnValues
public JRSubreportReturnValue[] getReturnValues()
Returns the list of values to be copied from the subreport into the master.- Specified by:
getReturnValuesin interfaceJRSubreport- Returns:
- the list of values to be copied from the subreport into the master.
-
getUsingCache
public Boolean getUsingCache()
Description copied from interface:JRSubreportIndicates if the engine is loading the current subreport from cache. Implementations of this method return the actual value for the internal flag that was explicitly set on this subreport.- Specified by:
getUsingCachein interfaceJRSubreport- Returns:
- Boolean.TRUE if the subreport should be loaded from cache, Boolean.FALSE otherwise or null in case the flag was never explicitly set on this subreport element
-
setUsingCache
public void setUsingCache(Boolean isUsingCache)
Description copied from interface:JRSubreportSpecifies if the engine should be loading the current subreport from cache. If set to Boolean.TRUE, the reporting engine will try to recognize previously loaded subreports using their specified source. For example, it will recognize an subreport if the subreport source is a file name that it has already loaded, or if it is the same URL.If set to null, the engine will rely on some default value which depends on the type of the subreport expression. The cache is turned on by default only for subreports that have java.lang.String objects in their expressions.
- Specified by:
setUsingCachein interfaceJRSubreport
-
isRunToBottom
public Boolean isRunToBottom()
Description copied from interface:JRSubreportSpecifies whether the subreport element will consume the entire vertical space available on the report page.- Specified by:
isRunToBottomin interfaceJRSubreport- Returns:
- whether the subreport element will consume the entire space down to the bottom of the page
- See Also:
JRSubreport.setRunToBottom(Boolean)
-
setRunToBottom
public void setRunToBottom(Boolean runToBottom)
Description copied from interface:JRSubreportSets the flag that Specifies whether the subreport element will consume the entire vertical space available on the report page.This flag should be set to
trueif the subreport needs to always print its column and page footers at the bottom of the report page, even when the subreport data does not stretch to the bottom.Note that when
isFloatColumnFooteris set for the subreport, the column footers will not be printed at the bottom of the page even if this flag is set.- Specified by:
setRunToBottomin interfaceJRSubreport- Parameters:
runToBottom- whether the subreport element will consume the entire space down to the bottom of the page
-
getOverflowType
public OverflowType getOverflowType()
- Specified by:
getOverflowTypein interfaceJRSubreport
-
setOverflowType
public void setOverflowType(OverflowType overflowType)
- Specified by:
setOverflowTypein interfaceJRSubreport
-
clone
public Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classJRBaseElement
-
-