Class SimpleFontExtensionHelper
- java.lang.Object
-
- net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper
-
- All Implemented Interfaces:
ErrorHandler
public final class SimpleFontExtensionHelper extends Object implements ErrorHandler
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_FILE_WRITER_ERROR
static String
EXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_WRITER_ERROR
-
Method Summary
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_FILE_WRITER_ERROR
public static final String EXCEPTION_MESSAGE_KEY_FILE_WRITER_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_WRITER_ERROR
public static final String EXCEPTION_MESSAGE_KEY_OUTPUT_STREAM_WRITER_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static SimpleFontExtensionHelper getInstance()
Return a new instance.- Returns:
- a new instance
-
loadFontFamilies
public List<FontFamily> loadFontFamilies(String file)
-
loadFontFamilies
public List<FontFamily> loadFontFamilies(JasperReportsContext jasperReportsContext, String file)
-
loadFontExtensions
public void loadFontExtensions(JasperReportsContext jasperReportsContext, String file, FontExtensionsReceiver receiver)
-
loadFontFamilies
public List<FontFamily> loadFontFamilies(JasperReportsContext jasperReportsContext, InputStream is)
-
loadFontExtensions
public void loadFontExtensions(JasperReportsContext jasperReportsContext, InputStream is, FontExtensionsReceiver receiver)
-
loadFontExtensions
public void loadFontExtensions(JasperReportsContext jasperReportsContext, InputStream is, FontExtensionsReceiver receiver, boolean loadFonts)
-
getFontsXml
public static String getFontsXml(List<FontFamily> fontFamilies)
-
writeFontExtensions
protected static void writeFontExtensions(Writer out, FontExtensionsContainer extensions) throws IOException
- Throws:
IOException
-
writeExportFonts
protected static void writeExportFonts(JRXmlWriteHelper writer, Map<String,String> exportFonts) throws IOException
- Throws:
IOException
-
writeFontsXml
public static void writeFontsXml(String destFileName, List<FontFamily> fontFamilies) throws JRException
- Throws:
JRException
-
writeFontExtensionsXml
public static void writeFontExtensionsXml(String destFileName, FontExtensionsContainer extensions) throws JRException
- Throws:
JRException
-
writeFontsXml
public static void writeFontsXml(OutputStream outputStream, List<FontFamily> fontFamilies) throws JRException
- Throws:
JRException
-
writeFontExtensionsXml
public static void writeFontExtensionsXml(OutputStream outputStream, FontExtensionsContainer extensions) throws JRException
- Throws:
JRException
-
writeFontExtensionsProperties
public static void writeFontExtensionsProperties(String fontsXmlLocation, String destFileName) throws JRException
- Throws:
JRException
-
writeFontExtensionsProperties
public static void writeFontExtensionsProperties(String fontFamiliesPropertyValue, OutputStream outputStream) throws JRException
- Throws:
JRException
-
writeFontExtensionsProperties
public static void writeFontExtensionsProperties(String fontRegistryFactoryPropertyName, String fontRegistryFactoryPropertyValue, String fontFamiliesPropertyName, String fontFamiliesPropertyValue, OutputStream outputStream) throws JRException
- Throws:
JRException
-
error
public void error(SAXParseException e)
- Specified by:
error
in interfaceErrorHandler
-
fatalError
public void fatalError(SAXParseException e)
- Specified by:
fatalError
in interfaceErrorHandler
-
warning
public void warning(SAXParseException e)
- Specified by:
warning
in interfaceErrorHandler
-
-