net.sf.jasperreports.engine.fill
Class JRFillContext

java.lang.Object
  extended bynet.sf.jasperreports.engine.fill.JRFillContext

public class JRFillContext
extends java.lang.Object

Context class shared by all the fillers involved in a report (master and subfillers).

The context is created by the master filler and inherited by the subfillers.

Version:
$Id: JRFillContext.java,v 1.5 2005/11/28 09:20:43 teodord Exp $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
JRBaseFiller

Constructor Summary
JRFillContext()
          Constructs a fill context.
 
Method Summary
 boolean cancelRunningStatement()
          Cancels the running DB statement.
 void clearRunningStatement()
          Clears the running DB statement.
 JRPrintImage getLoadedImage(java.lang.Object source)
          Gets a cached image.
 JRPrintPage getPrintPage()
          Returns the current master print page.
 boolean hasLoadedImage(java.lang.Object source)
          Checks whether an image given by source has already been loaded and cached.
 boolean isIgnorePagination()
          Decides whether the filling should ignore pagination.
 boolean isPerPageBoundElements()
          Decides whether fillers should keep per page bound element maps.
 boolean isUsingVirtualizer()
          Decides whether virtualization is used by the filling process.
 void registerLoadedImage(java.lang.Object source, JRPrintImage image)
          Registers an image loaded from a source.
 void setIgnorePagination(boolean ignorePagination)
          Sets the flag that decides whether pagination should be ignored during filling.
 void setPerPageBoundElements(boolean perPageBoundElements)
          Sets the flag indicating whether fillers should keep per page bound element maps.
 void setPrintPage(JRPrintPage page)
          Sets the current master print page.
 void setRunningStatement(java.sql.PreparedStatement runningStatement)
          Sets the running DB statement.
 void setUsingVirtualizer(boolean usingVirtualizer)
          Sets the flag indicating whether a virtualizer is used by the filling process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JRFillContext

public JRFillContext()
Constructs a fill context.

Method Detail

hasLoadedImage

public boolean hasLoadedImage(java.lang.Object source)
Checks whether an image given by source has already been loaded and cached.

Parameters:
source - the source of the image
Returns:
whether the image has been cached
See Also:
getLoadedImage(Object), registerLoadedImage(Object, JRPrintImage)

getLoadedImage

public JRPrintImage getLoadedImage(java.lang.Object source)
Gets a cached image.

Parameters:
source - the source of the image
Returns:
the cached image
See Also:
registerLoadedImage(Object, JRPrintImage)

registerLoadedImage

public void registerLoadedImage(java.lang.Object source,
                                JRPrintImage image)
Registers an image loaded from a source.

The image is cached for further use.

Parameters:
source - the source that was used to load the image
image - the loaded image
See Also:
getLoadedImage(Object)

setUsingVirtualizer

public void setUsingVirtualizer(boolean usingVirtualizer)
Sets the flag indicating whether a virtualizer is used by the filling process.

Parameters:
usingVirtualizer - whether virtualization is used
See Also:
isUsingVirtualizer()

isUsingVirtualizer

public boolean isUsingVirtualizer()
Decides whether virtualization is used by the filling process.

Returns:
true iff a virtualizer is used
See Also:
setUsingVirtualizer(boolean), JRParameter.REPORT_VIRTUALIZER

setPerPageBoundElements

public void setPerPageBoundElements(boolean perPageBoundElements)
Sets the flag indicating whether fillers should keep per page bound element maps.

Parameters:
perPageBoundElements - the value of the flag
See Also:
isPerPageBoundElements()

isPerPageBoundElements

public boolean isPerPageBoundElements()
Decides whether fillers should keep per page bound element maps.

Returns:
true iff fillers should keep per page bound element maps
See Also:
setPerPageBoundElements(boolean)

setPrintPage

public void setPrintPage(JRPrintPage page)
Sets the current master print page.

Parameters:
page - the master print page
See Also:
getPrintPage()

getPrintPage

public JRPrintPage getPrintPage()
Returns the current master print page.

Returns:
the current master print page
See Also:
setPrintPage(JRPrintPage)

setIgnorePagination

public void setIgnorePagination(boolean ignorePagination)
Sets the flag that decides whether pagination should be ignored during filling.

Parameters:
ignorePagination -
See Also:
isIgnorePagination()

isIgnorePagination

public boolean isIgnorePagination()
Decides whether the filling should ignore pagination.

Returns:
whether the filling should ignore pagination
See Also:
setIgnorePagination(boolean), JRParameter.IS_IGNORE_PAGINATION

setRunningStatement

public void setRunningStatement(java.sql.PreparedStatement runningStatement)
Sets the running DB statement.

This method is called before firing the query.

Parameters:
runningStatement - the running DB statement

clearRunningStatement

public void clearRunningStatement()
Clears the running DB statement.

This method is called after the query has ended.


cancelRunningStatement

public boolean cancelRunningStatement()
                               throws JRException
Cancels the running DB statement.

Returns:
true iff there is a running DB statement and it has been cancelled.
Throws:
JRException


© 2001-2005 JasperSoft Corporation www.jaspersoft.com