Java Code Examples for net.sf.jasperreports.engine.DefaultJasperReportsContext#getInstance()

The following examples show how to use net.sf.jasperreports.engine.DefaultJasperReportsContext#getInstance() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PhantomJS.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
private PhantomJS()
{
	INSTANTIATED = true;
	this.jasperReportsContext = DefaultJasperReportsContext.getInstance();
	this.scriptManager = new ScriptManager(jasperReportsContext);
	this.processDirector = new ProcessDirector(jasperReportsContext, this.scriptManager);
}
 
Example 2
Source File: JRViewer.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see #JRViewer(String, boolean, Locale, ResourceBundle)
 */
public JRViewer(String fileName, boolean isXML, Locale locale, ResourceBundle resBundle) throws JRException
{
	this(
		DefaultJasperReportsContext.getInstance(), 
		fileName, 
		isXML, 
		locale, 
		resBundle
		);
}
 
Example 3
Source File: FontExtensionsRegistry.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
protected void ensureFontExtensions()
{
	if ((fontFamilies == null || fontSets == null) && fontFamiliesLocations != null)
	{
		SimpleFontExtensionHelper fontExtensionHelper = SimpleFontExtensionHelper.getInstance();
		DefaultJasperReportsContext context = DefaultJasperReportsContext.getInstance();
		
		FontExtensionsCollector extensionsCollector = new FontExtensionsCollector();
		for (String location : fontFamiliesLocations)
		{
			if (log.isDebugEnabled())
			{
				log.debug("Loading font extensions from " + location);
			}
			
			try
			{
				fontExtensionHelper.loadFontExtensions(context, location, extensionsCollector);
			}
			catch (JRRuntimeException e)//only catching JRRuntimeException for now
			{
				log.error("Error loading font extensions from " + location, e);
				//keeping any font extensions collected so far, though it's a little weird
			}
		}
		
		fontFamilies = extensionsCollector.getFontFamilies();
		fontSets = extensionsCollector.getFontSets();
	}
}
 
Example 4
Source File: JRDesignViewer.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @see #JRDesignViewer(JasperReportsContext, InputStream, boolean)
 */
public JRDesignViewer(InputStream is, boolean isXML) throws JRException
{
	this(DefaultJasperReportsContext.getInstance(), is, isXML);
}
 
Example 5
Source File: JasperDesign.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Constructs a JasperDesign object and fills it with the default variables and parameters.
 */
public JasperDesign()
{
	this(DefaultJasperReportsContext.getInstance());
}
 
Example 6
Source File: ExcelQueryExecuter.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
protected ExcelQueryExecuter(JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap) 
{
	this(DefaultJasperReportsContext.getInstance(), dataset, parametersMap);
}
 
Example 7
Source File: JRAbstractCsvExporter.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @see #JRAbstractCsvExporter(JasperReportsContext)
 */
public JRAbstractCsvExporter()
{
	this(DefaultJasperReportsContext.getInstance());
}
 
Example 8
Source File: JRXmlDataSource.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
public JRXmlDataSource(String uri, String selectExpression, boolean isNamespaceAware)
		throws JRException {
	this(DefaultJasperReportsContext.getInstance(), uri, selectExpression, isNamespaceAware);
}
 
Example 9
Source File: XlsxServlet.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
protected JRXlsAbstractExporter getXlsExporter()
{
	return new JRXlsxExporter(DefaultJasperReportsContext.getInstance());
}
 
Example 10
Source File: JROdtExporter.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @see #JROdtExporter(JasperReportsContext)
 */
public JROdtExporter()
{
	this(DefaultJasperReportsContext.getInstance());
}
 
Example 11
Source File: JRXmlDataSource.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
public JRXmlDataSource(File file, boolean isNamespaceAware) throws JRException {
	this(DefaultJasperReportsContext.getInstance(), file, isNamespaceAware);
}
 
Example 12
Source File: XlsServlet.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
protected JRXlsAbstractExporter getXlsExporter()
{
	return new JRXlsExporter(DefaultJasperReportsContext.getInstance());
}
 
Example 13
Source File: JRCsvMetadataExporter.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @see #JRCsvMetadataExporter(JasperReportsContext)
 */
public JRCsvMetadataExporter()
{
	this(DefaultJasperReportsContext.getInstance());
}
 
Example 14
Source File: AbstractPoiXlsDataSource.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @see #AbstractPoiXlsDataSource(JasperReportsContext, String)
 */
public AbstractPoiXlsDataSource(String location) throws JRException, IOException
{
	this(DefaultJasperReportsContext.getInstance(), location);
}
 
Example 15
Source File: JRSaveContributor.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @see #JRSaveContributor(JasperReportsContext, Locale, ResourceBundle)
 */
public JRSaveContributor(Locale locale, ResourceBundle resBundle)
{
	this(DefaultJasperReportsContext.getInstance(), locale, resBundle);
}
 
Example 16
Source File: JRXmlLoader.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @deprecated Replaced by {@link #JRXmlLoader(JasperReportsContext, Digester)}.
 */
public JRXmlLoader(Digester digester)
{
	this(DefaultJasperReportsContext.getInstance(), digester);
}
 
Example 17
Source File: HtmlComponentXmlWriter.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @deprecated Replaced by {@link HtmlComponentXmlWriter#HtmlComponentXmlWriter(JasperReportsContext)}.
 */
public HtmlComponentXmlWriter()
{
	super(DefaultJasperReportsContext.getInstance());
}
 
Example 18
Source File: JRXml4SwfExporter.java    From jasperreports with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * @see #JRXml4SwfExporter(JasperReportsContext)
 */
public JRXml4SwfExporter()
{
	this(DefaultJasperReportsContext.getInstance());
}
 
Example 19
Source File: JRSwapFile.java    From jasperreports with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * Creates a swap file.
 * 
 * The file name is generated automatically.
 * 
 * @param directory the directory where the file should be created.
 * @param blockSize the size of the blocks allocated by the swap file
 * @param minGrowCount the minimum number of blocks by which the swap file grows when full
 */
public JRSwapFile(String directory, int blockSize, int minGrowCount)
{
	this(DefaultJasperReportsContext.getInstance(), directory, blockSize, minGrowCount);
}
 
Example 20
Source File: JRFileVirtualizer.java    From jasperreports with GNU Lesser General Public License v3.0 2 votes vote down vote up
/**
 * @param maxSize
 *            the maximum size (in JRVirtualizable objects) of the paged in
 *            cache.
 * @param directory
 *            the base directory in the filesystem where the paged out data
 *            is to be stored
 */
public JRFileVirtualizer(int maxSize, String directory) {
	this(DefaultJasperReportsContext.getInstance(), maxSize, directory);
}