ReportConfiguration local = myReport.getReportConfiguration();
You can also specify the local configuration for a report via the XML report template file.
Global Configuration keys
These keys affect the whole VM and usually cannot be changed once they are configured unless
the VM is restarted.
com.jrefinery.report.LogLevel
The minimum loglevel that is logged. Valid values are:
"Error"
- prints error messages only;
"Warn"
- prints warnings and errors;
"Info"
- prints informational messages as well as warnings and errors;
"Debug"
- prints all messages, including all debugging messages.
The default setting is "Debug"
.
com.jrefinery.report.LogTarget
The default log target. This should be set to the classname of a valid LogTarget
implementation -- the given class is loaded and instantiated and added as the primary logging
target. This defaults to "com.jrefinery.report.util.SystemOutLogTarget"
.
An alternative LogTarget
for Log4J output can be found in the "Extension" package.
com.jrefinery.report.targets.PDFOutputTarget.AUTOINIT
AutoInit the PDFTarget when the class is loaded? This will search and register
all ttf-fonts on the system. The search will access the system-directorys and can
therefore collide with the SecurityManager. The property defaults to "true", set
to "false" to disable this feature and have a look at the PDFOutputTarget on how
to register the fonts manually.
com.jrefinery.report.dtd
A URL to the JFreeReport-DTD if not specified in the Document itself. This can
be used for validating parsers to check the xml-document. This property is not set
by default, but the DTD can be found at "http://jfreereport.sourceforge.net/report.dtd".
This property expects a string with a valid URL, like the one above.
com.jrefinery.report.PrintOperationComment
Should the logical page add comments to the generated PhysicalOperations? This is
for debugging only and will cause heavy load on your LogTarget if enabled.
This option defaults to "false".
com.jrefinery.report.WarnInvalidColumns
Should the datarow print warning on invalid columns? Invalid column requests always
return null, if set to "true", an additional logging entry is added for every invalid
column. This is useful when writing report-definitions, so this option defaults to "true".
com.jrefinery.report.TableFactoryMode
The table model factory mode for the
ResultSetTableModelFactory
.
If set to "simple" the factory will always return a DefaultTableModel
.
This property is not set by default and it should not be necessary to change this.
com.jrefinery.report.NoDefaultDebug
Should the debugging system be disabled by default. This option will suppress all
output, no single line of debug information will be printed. If you want to remove
System.out-debugging on the server side, try to switch to a Log4J-LogTarget instead.
This option can be dangerous, as you won't see any error messages, so it is set to "false"
by default.
Local configuration keys
The following keys can be redefined for all report-instances.
com.jrefinery.report.preview.PreferredWidth
Defines a preferred size for the preview frame. Both width and height must be set,
proportional values are allowed (100%, 90% etc). They have the same syntax as the
proportional values in the xml definition.
None of the values is defined by default.
com.jrefinery.report.preview.PreferredHeight
Defines a preferred size for the preview frame. Both width and height must be set,
proportional values are allowed (100%, 90% etc). They have the same syntax as the
proportional values in the xml definition.
None of the values is defined by default.
com.jrefinery.report.preview.MaximumWidth
Defines the maximum width for the preview frame. If the width is defined, a component
listener will be used to enforce the defined width.
The value is not defined by default.
com.jrefinery.report.preview.MaximumHeight
Defines the maximum height for the preview frame. If the height is defined, a component
listener will be used to enforce that value.
The value is not defined by default.
PDFOutputTarget properties
The PDFTarget can be configured using these properties. This will create a default configuration
which can be altered by the programm using the usual operations.
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.Encoding
The default font-encoding for the OutputTarget. A PDF does not use UNICODE by default.
Inside a PDF strings are stored with a specifiy byte-encoding, also known as CodePage
for 8Bit encodings. The PDFOutputTarget uses the Java-VM to convert Java-Strings into
encoded byte-sequences when printing text. The conversion is done via String.getBytes()
.
To print non-ascii characters, the string must be encoded with the correct encoding into
a byte-sequence. Additionally the font, which should display the string on the target
plattform has to support the given encoding, or the result will not be as expected.
To encode Strings which contain the 'Euro' symbol, use the encoding "iso-8859-15", for
polish Strings, the encoding "iso-8859-2" is suitable. If you want to encode chinese
characters, try "GB2312". A complete list of encodings can be found
at http://www.iana.org/assignments/character-sets
For a complete set of supported encodings, you will also need the international version
of the JDK (the bigger one :)).
As thumb rule, try to write some of your target text in your favourite text processor.
If the font you select there is a true-type-font and does display the text well, the font
will be suitable for your report.
The default value can be changed with
PDFOutputTarget.setFontEncoding(java.lang.String)
for a specific instance if needed.
If not defined otherwise, this property defaults to "Cp1252", the standard Windows-encoding.
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.Author
Defines the Author of the PDF-Document. The author is written into the PDFMetaData.
If not explicitly set, this property is ignored and no author is set.
A word to the PDF-Security flags
PDFSecurity is only enabled, if the document is encrypted. Encryption itself will
not protect the document from being modified, if no userpassword and/or ownerpassword
is set for the document.
The userpassword
will protect access to the document. If empty, everybody
is able to read the document. The ownerpassword
will protect access to the
security settings of the document. If empty, everybody who is able to read the document,
will also be able to change the security settings of the document (and so the document
itself).
If only the ownerpassword is set, everybody may read the document, but only the owner
is able to fully access the documents security settings.
PDFSecurity settings
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowPrinting
Should the PDF Security setting allow printing of the document by default.
This property defaults to "false", no one may print the document.
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowCopy
Should the PDF Security setting allow copying of the document's contents by default
This property defaults to "false".
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowModifyContents
Should the PDF Security setting allow modifying of the document by default.
This property defaults to "false".
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowModifyAnnotations
Should the PDF Security setting allow document annotations by default
This property defaults to "false".
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowFillIn
Should the PDF Security setting allow the fill-in of document forms (inputfields etc).
This property defaults to "false".
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowScreenReaders
Should the PDF Security setting allow access for screenreaders by default.
ScreenReader may help blind people to read your document, but I may also open a gate for
automated replication of your documents contents. As today every OCR program is also able to
capture the contents of PDF-Files, it is safe to say "true" here to allow access for
screenreaders.
But as we are paranoid, this property defaults to "false" if not defined otherwise.
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowAssembly
Should the PDF Security setting allow re(assembly) of the document by default
This property defaults to "false".
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.AllowDegradedPrinting
Should the PDF Security setting allow low quality printing of the document's contents by
default
If you disabled printing, this property defines whether the reader of your document may print
a low-quality (draft) version of your document. If you enabled printing, the users right
to print a high-quality version also includes the right to print the low-level version of the
document. This setting defaults to "false".
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.Encryption
Should the PDF file be encrypted by default? Set to "none", "40bit", "128bit". In some
countries the 128bit encoding may be illegal for use or export. If this property is set
to "none", none of the other security properties are applied. Enabling security always
involves encryption.
The 40bit encoding should not be used for securing sensitive data,
a 40 bit key does not create any real barriers for interessed evil people out there.
This property is not set by default, and is therefore treated as if it was set to "none".
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.userpassword
Warning:Specifying passwords in the property file can introduce a security risk.
Do not use these properties on the client side or in unprotected (world-readable) server
environments. In these cases use other means of defining the password. Any unsecured
access to the "jfreereport.properties" file would cause a security leak, if you store
clear-text passwords there.
The userpassword protects global access to your document. This property is not set by default.
This property should be set to a non-null value to enable the security of the document.
- com.jrefinery.report.targets.pageable.output.PDFOutputTarget.default.ownerpassword
The ownerpassword protects access to the security settings of the document. A user with
owner-access has all permissions to modify the contents and settings of the document.
This property is not set by default.
This property should be set to a non-null value to enable the security of the document.
- Author:
- Thomas Morgner
- See Also:
- Serialized Form
Method Summary |
java.lang.String |
getAvailableEncodings()
Defines the loader settings for the available encodings shown to the user.
|
java.util.Enumeration |
getConfigProperties()
Returns all defined configuration properties for the report. |
java.lang.String |
getConfigProperty(java.lang.String key)
Returns the configuration property with the specified key. |
java.lang.String |
getConfigProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the configuration property with the specified key
(or the specified default value if there is no such property).
|
protected java.util.Properties |
getConfiguration()
Returns the collection of properties for the configuration. |
java.lang.String |
getCSVTargetEncoding()
Returns the CSV encoding property value. |
java.lang.String |
getEncodingsDefinitionFile()
Defines the loader settings for the available encodings shown to the user.
|
static ReportConfiguration |
getGlobalConfig()
Returns the global configuration for JFreeReport.
|
java.lang.String |
getHTMLTargetEncoding()
Returns the HTML encoding property value. |
java.lang.String |
getLogLevel()
Returns the log level. |
java.lang.String |
getLogTarget()
Returns the current log target. |
java.lang.String |
getPdfTargetEncoding()
Returns the PDF encoding property value. |
java.lang.String |
getTextTargetEncoding()
Returns the plain text encoding property value. |
boolean |
isDisableLogging()
Returns true if logging is disabled, and false otherwise. |
boolean |
isEnableExportCSV()
Returns true, if the export to CSV files should be available in the preview
dialog. |
boolean |
isEnableExportExcel()
Returns true, if the export to Excel files should be available in the preview
dialog. |
boolean |
isEnableExportHTML()
Returns true, if the export to HTML files should be available in the preview
dialog. |
boolean |
isEnableExportPDF()
Returns true, if the export to PDF files should be available in the preview
dialog. |
boolean |
isEnableExportPlain()
Returns true, if the export to plain text files should be available in the preview
dialog. |
boolean |
isG2BuggyFRC()
Returns true, if the Graphics2D implementation is buggy and is not really able
to place/calculate the fontsizes correctly. |
boolean |
isG2TargetUseAliasing()
Returns true, if the Graphics2D should use aliasing to render text. |
boolean |
isPDFTargetAutoInit()
Returns whether to search for ttf-fonts when the PDFOutputTarget is loaded. |
boolean |
isPDFTargetEmbedFonts()
Returns true, if the Graphics2D should use aliasing to render text. |
boolean |
isPrintOperationComment()
Returns true, if physical operation comments should be added to the physical page.
|
boolean |
isStrictErrorHandling()
Checks, whether a stricter error handling is applied to the report processing.
|
boolean |
isStrictTableLayout()
returns true, if the TableWriter should perform a stricter layout translation.
|
boolean |
isValidateXML()
returns true, if the parser should validate the xml files against the DTD
supplied with JFreeReport. |
boolean |
isWarnInvalidColumns()
Returns true, if invalid columns in the dataRow are logged as warning. |
void |
setConfigProperty(java.lang.String key,
java.lang.String value)
Sets a configuration property. |
void |
setCSVTargetEncoding(java.lang.String targetEncoding)
Sets the CSV encoding property value. |
void |
setDisableLogging(boolean disableLogging)
Sets the flag that disables logging.
|
void |
setEnableExportCSV(boolean enableExportCSV)
Defines, whether the CSV export plugin will be activated in the preview dialog. |
void |
setEnableExportExcel(boolean enableExportExcel)
Defines, whether the Excel export plugin will be activated in the preview dialog. |
void |
setEnableExportHTML(boolean enableExportHTML)
Defines, whether the HTML export plugin will be activated in the preview dialog. |
void |
setEnableExportPDF(boolean enableExportPDF)
Defines, whether the PDF export plugin will be activated in the preview dialog. |
void |
setEnableExportPlain(boolean enableExportPlain)
Defines, whether the PlainText export plugin will be activated in the preview dialog. |
void |
setG2BuggyFRC(boolean buggy)
set to true, if the Graphics2D implementation is buggy and is not really able
to place/calculate the fontsizes correctly. |
void |
setG2TargetUseAliasing(boolean alias)
set to true, if the Graphics2D should use aliasing to render text. |
void |
setHTMLTargetEncoding(java.lang.String targetEncoding)
Sets the HTML encoding property value. |
void |
setLogLevel(java.lang.String level)
Sets the log level, which is read from the global report configuration at
the point that the classloader loads the Log class.
|
void |
setLogTarget(java.lang.String logTarget)
Sets the log target. |
protected void |
setParentConfig(ReportConfiguration config)
Set the parent configuration. |
void |
setPDFTargetAutoInit(boolean autoInit)
Sets the PDF target auto init status. |
void |
setPDFTargetEmbedFonts(boolean embed)
set to true, if the PDFOutputTarget should embed all fonts. |
void |
setPdfTargetEncoding(java.lang.String pdfTargetEncoding)
Sets the PDF encoding property value. |
void |
setPrintOperationComment(boolean print)
set to true, if physical operation comments should be added to the physical page.
|
void |
setStrictErrorHandling(boolean strictErrorHandling)
Defines, whether a stricter error handling is applied to the report processing.
|
void |
setStrictTableLayout(boolean strict)
Defines whether strict layouting rules should be used for the TableLayouter. |
void |
setValidateXML(boolean validate)
Set to false, to globaly disable the xml-validation. |
void |
setWarnInvalidColumns(boolean warnInvalidColumns)
Set to true, if you want to get informed when invalid column-requests are
made to the DataRow. |
void |
setXMLTargetEncoding(java.lang.String targetEncoding)
Sets the plain text encoding property value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
G2TARGET_USEALIASING
public static final java.lang.String G2TARGET_USEALIASING
- The text aliasing configuration key.
- See Also:
- Constant Field Values
G2TARGET_USEALIASING_DEFAULT
public static final java.lang.String G2TARGET_USEALIASING_DEFAULT
- The text aliasing configuration default value. Is "false".
- See Also:
- Constant Field Values
G2TARGET_ISBUGGY_FRC
public static final java.lang.String G2TARGET_ISBUGGY_FRC
- The G2 fontrenderer bug override configuration key.
- See Also:
- Constant Field Values
G2TARGET_ISBUGGY_FRC_DEFAULT
public static final java.lang.String G2TARGET_ISBUGGY_FRC_DEFAULT
- The G2 fontrenderer bug override. Is "false".
- See Also:
- Constant Field Values
PREVIEW_PREFERRED_WIDTH
public static final java.lang.String PREVIEW_PREFERRED_WIDTH
- The preferred width key.
- See Also:
- Constant Field Values
PREVIEW_PREFERRED_HEIGHT
public static final java.lang.String PREVIEW_PREFERRED_HEIGHT
- The preferred height key.
- See Also:
- Constant Field Values
PREVIEW_MAXIMUM_WIDTH
public static final java.lang.String PREVIEW_MAXIMUM_WIDTH
- The maximum width key.
- See Also:
- Constant Field Values
PREVIEW_MAXIMUM_HEIGHT
public static final java.lang.String PREVIEW_MAXIMUM_HEIGHT
- The maximum height key.
- See Also:
- Constant Field Values
PRINT_OPERATION_COMMENT
public static final java.lang.String PRINT_OPERATION_COMMENT
- The 'disable logging' property key.
- See Also:
- Constant Field Values
PRINT_OPERATION_COMMENT_DEFAULT
public static final java.lang.String PRINT_OPERATION_COMMENT_DEFAULT
- The default 'disable logging' property value.
- See Also:
- Constant Field Values
STRICT_ERRORHANDLING
public static final java.lang.String STRICT_ERRORHANDLING
- The 'disable logging' property key.
- See Also:
- Constant Field Values
STRICT_ERRORHANDLING_DEFAULT
public static final java.lang.String STRICT_ERRORHANDLING_DEFAULT
- The default 'disable logging' property value.
- See Also:
- Constant Field Values
WARN_INVALID_COLUMNS
public static final java.lang.String WARN_INVALID_COLUMNS
- The 'disable logging' property key.
- See Also:
- Constant Field Values
WARN_INVALID_COLUMNS_DEFAULT
public static final java.lang.String WARN_INVALID_COLUMNS_DEFAULT
- The default 'disable logging' property value.
- See Also:
- Constant Field Values
DISABLE_LOGGING
public static final java.lang.String DISABLE_LOGGING
- The 'disable logging' property key.
- See Also:
- Constant Field Values
DISABLE_LOGGING_DEFAULT
public static final java.lang.String DISABLE_LOGGING_DEFAULT
- The default 'disable logging' property value.
- See Also:
- Constant Field Values
LOGLEVEL
public static final java.lang.String LOGLEVEL
- The 'log level' property key.
- See Also:
- Constant Field Values
LOGLEVEL_DEFAULT
public static final java.lang.String LOGLEVEL_DEFAULT
- The default 'log level' property value.
- See Also:
- Constant Field Values
LOGTARGET
public static final java.lang.String LOGTARGET
- The 'log target' property key.
- See Also:
- Constant Field Values
LOGTARGET_DEFAULT
public static final java.lang.String LOGTARGET_DEFAULT
- The default 'log target' property value.
PDFTARGET_AUTOINIT
public static final java.lang.String PDFTARGET_AUTOINIT
- The 'PDF auto init' property key.
- See Also:
- Constant Field Values
PDFTARGET_AUTOINIT_DEFAULT
public static final java.lang.String PDFTARGET_AUTOINIT_DEFAULT
- The default 'PDF auto init' property value.
- See Also:
- Constant Field Values
PDFTARGET_EMBED_FONTS
public static final java.lang.String PDFTARGET_EMBED_FONTS
- The 'PDF embed fonts' property key.
- See Also:
- Constant Field Values
PDFTARGET_EMBED_FONTS_DEFAULT
public static final java.lang.String PDFTARGET_EMBED_FONTS_DEFAULT
- The default 'PDF embed fonts' property value.
- See Also:
- Constant Field Values
PDFTARGET_ENCODING
public static final java.lang.String PDFTARGET_ENCODING
- The 'PDF encoding' property key.
- See Also:
- Constant Field Values
PDFTARGET_ENCODING_DEFAULT
public static final java.lang.String PDFTARGET_ENCODING_DEFAULT
- The default 'PDF encoding' property value.
- See Also:
- Constant Field Values
RESULTSET_FACTORY_MODE
public static final java.lang.String RESULTSET_FACTORY_MODE
- The 'ResultSet factory mode'.
- See Also:
- Constant Field Values
PARSER_VALIDATE
public static final java.lang.String PARSER_VALIDATE
- Enable DTD validation of the parsed XML.
- See Also:
- Constant Field Values
PARSER_VALIDATE_DEFAULT
public static final java.lang.String PARSER_VALIDATE_DEFAULT
- disable DTD validation by default.
- See Also:
- Constant Field Values
REPORT_RESOURCE_BUNDLE
public static final java.lang.String REPORT_RESOURCE_BUNDLE
- The default resourcebundle that should be used for ResourceFileFilter.
This property must be applied by the parser.
- See Also:
- Constant Field Values
STRICT_TABLE_LAYOUT
public static final java.lang.String STRICT_TABLE_LAYOUT
- Enable stricter table layouting for all TableProcessors.
- See Also:
- Constant Field Values
STRICT_TABLE_LAYOUT_DEFAULT
public static final java.lang.String STRICT_TABLE_LAYOUT_DEFAULT
- Disable strict layout by default.
- See Also:
- Constant Field Values
ENABLE_EXPORT_PDF
public static final java.lang.String ENABLE_EXPORT_PDF
- The property that defines whether to enable PDF export in the PreviewFrame.
- See Also:
- Constant Field Values
ENABLE_EXPORT_CSV
public static final java.lang.String ENABLE_EXPORT_CSV
- The property that defines whether to enable CSV export in the PreviewFrame.
- See Also:
- Constant Field Values
ENABLE_EXPORT_HTML
public static final java.lang.String ENABLE_EXPORT_HTML
- The property that defines whether to enable Html export in the PreviewFrame.
- See Also:
- Constant Field Values
ENABLE_EXPORT_EXCEL
public static final java.lang.String ENABLE_EXPORT_EXCEL
- The property that defines whether to enable Excel export in the PreviewFrame.
- See Also:
- Constant Field Values
ENABLE_EXPORT_PLAIN
public static final java.lang.String ENABLE_EXPORT_PLAIN
- The property that defines whether to enable PlainText export in the PreviewFrame.
- See Also:
- Constant Field Values
AVAILABLE_ENCODINGS
public static final java.lang.String AVAILABLE_ENCODINGS
- The property that defines which encodings are available in the export dialogs.
- See Also:
- Constant Field Values
AVAILABLE_ENCODINGS_ALL
public static final java.lang.String AVAILABLE_ENCODINGS_ALL
- The encodings available properties value for all properties.
- See Also:
- Constant Field Values
AVAILABLE_ENCODINGS_FILE
public static final java.lang.String AVAILABLE_ENCODINGS_FILE
- The encodings available properties value for properties defined in the properties file.
- See Also:
- Constant Field Values
AVAILABLE_ENCODINGS_NONE
public static final java.lang.String AVAILABLE_ENCODINGS_NONE
- The encodings available properties value for no properties defined. The encoding selection
will be disabled.
- See Also:
- Constant Field Values
HTML_OUTPUT_ENCODING
public static final java.lang.String HTML_OUTPUT_ENCODING
- The 'HTML encoding' property key.
- See Also:
- Constant Field Values
HTML_OUTPUT_ENCODING_DEFAULT
public static final java.lang.String HTML_OUTPUT_ENCODING_DEFAULT
- A default value of the 'HTML encoding' property key.
- See Also:
- Constant Field Values
CSV_OUTPUT_ENCODING
public static final java.lang.String CSV_OUTPUT_ENCODING
- The 'CSV encoding' property key.
- See Also:
- Constant Field Values
CSV_OUTPUT_ENCODING_DEFAULT
public static final java.lang.String CSV_OUTPUT_ENCODING_DEFAULT
- A default value of the 'CSV encoding' property key.
TEXT_OUTPUT_ENCODING
public static final java.lang.String TEXT_OUTPUT_ENCODING
- The 'XML encoding' property key.
- See Also:
- Constant Field Values
TEXT_OUTPUT_ENCODING_DEFAULT
public static final java.lang.String TEXT_OUTPUT_ENCODING_DEFAULT
- A default value of the 'XML encoding' property key.
ENCODINGS_DEFINITION_FILE
public static final java.lang.String ENCODINGS_DEFINITION_FILE
- The name of the properties file used to define the available encodings.
The property points to a resources in the classpath, not to a real file!
- See Also:
- Constant Field Values
ENCODINGS_DEFINITION_FILE_DEFAULT
public static final java.lang.String ENCODINGS_DEFINITION_FILE_DEFAULT
- The default name for the encoding properties file. This property defaults to
"/com/jrefinery/report/jfreereport-encodings.properties".
- See Also:
- Constant Field Values
ReportConfiguration
protected ReportConfiguration()
- Default constructor.
ReportConfiguration
public ReportConfiguration(ReportConfiguration globalConfig)
- Creates a new report configuration.
- Parameters:
globalConfig
- the global configuration.
getConfigProperty
public java.lang.String getConfigProperty(java.lang.String key)
- Returns the configuration property with the specified key.
- Specified by:
getConfigProperty
in interface org.jfree.util.Configuration
- Parameters:
key
- the property key.
- Returns:
- the property value.
getConfigProperty
public java.lang.String getConfigProperty(java.lang.String key,
java.lang.String defaultValue)
- Returns the configuration property with the specified key
(or the specified default value if there is no such property).
If the property is not defined in this configuration, the code
will lookup the property in the parent configuration.
- Specified by:
getConfigProperty
in interface org.jfree.util.Configuration
- Parameters:
key
- the property key.defaultValue
- the default value.
- Returns:
- the property value.
setConfigProperty
public void setConfigProperty(java.lang.String key,
java.lang.String value)
- Sets a configuration property.
- Parameters:
key
- the property key.value
- the property value.
getLogLevel
public java.lang.String getLogLevel()
- Returns the log level.
- Returns:
- the log level.
setLogLevel
public void setLogLevel(java.lang.String level)
- Sets the log level, which is read from the global report configuration at
the point that the classloader loads the
Log
class.
Valid log levels are:
"Error"
- error messages;
"Warn"
- warning messages;
"Info"
- information messages;
"Debug"
- debug messages;
Notes:
- the setting is not case sensitive.
- changing the log level after the
Log
class has been
loaded will have no effect.
- to turn of logging altogether, use the
setDisableLogging(boolean)
method.
- Parameters:
level
- the new log level.
isPDFTargetAutoInit
public boolean isPDFTargetAutoInit()
- Returns whether to search for ttf-fonts when the PDFOutputTarget is loaded.
- Returns:
- the PDFOutputTarget autoinitialisation value.
setPDFTargetAutoInit
public void setPDFTargetAutoInit(boolean autoInit)
- Sets the PDF target auto init status.
- Parameters:
autoInit
- the new status.
isDisableLogging
public boolean isDisableLogging()
- Returns
true
if logging is disabled, and false
otherwise.
- Returns:
- true, if logging is completly disabled, false otherwise.
setDisableLogging
public void setDisableLogging(boolean disableLogging)
- Sets the flag that disables logging.
To switch off logging globally, you can use the following code:
ReportConfiguration.getGlobalConfig().setDisableLogging(true);
- Parameters:
disableLogging
- the flag.
getPdfTargetEncoding
public java.lang.String getPdfTargetEncoding()
- Returns the PDF encoding property value.
- Returns:
- the PDF encoding property value.
setPdfTargetEncoding
public void setPdfTargetEncoding(java.lang.String pdfTargetEncoding)
- Sets the PDF encoding property value.
- Parameters:
pdfTargetEncoding
- the new encoding.
getConfiguration
protected java.util.Properties getConfiguration()
- Returns the collection of properties for the configuration.
- Returns:
- the properties.
getGlobalConfig
public static ReportConfiguration getGlobalConfig()
- Returns the global configuration for JFreeReport.
In the current implementation, the configuration has no properties defined,
but references a parent configuration that:
- copies across all the
System
properties to use as report
configuration properties (obviously the majority of them will not apply to reports);
- itself references a parent configuration that reads its properties from a file
jfreereport.properties
.
- Returns:
- the global configuration.
setParentConfig
protected void setParentConfig(ReportConfiguration config)
- Set the parent configuration. The parent configuration is queried, if the
requested configuration values was not found in this report configuration.
- Parameters:
config
- the parent configuration.
getLogTarget
public java.lang.String getLogTarget()
- Returns the current log target.
- Returns:
- the log target.
setLogTarget
public void setLogTarget(java.lang.String logTarget)
- Sets the log target.
- Parameters:
logTarget
- the new log target.
isWarnInvalidColumns
public boolean isWarnInvalidColumns()
- Returns true, if invalid columns in the dataRow are logged as warning.
- Returns:
- true, if invalid columns in the dataRow are logged as warning.
setWarnInvalidColumns
public void setWarnInvalidColumns(boolean warnInvalidColumns)
- Set to true, if you want to get informed when invalid column-requests are
made to the DataRow.
- Parameters:
warnInvalidColumns
- the warning flag
isPrintOperationComment
public boolean isPrintOperationComment()
- Returns true, if physical operation comments should be added to the physical page.
This is only usefull for debugging.
- Returns:
- true, if comments are enabled.
setPrintOperationComment
public void setPrintOperationComment(boolean print)
- set to true, if physical operation comments should be added to the physical page.
This is only usefull for debugging.
- Parameters:
print
- set to true, if comments should be enabled.
isG2TargetUseAliasing
public boolean isG2TargetUseAliasing()
- Returns true, if the Graphics2D should use aliasing to render text. Defaults to false.
- Returns:
- true, if aliasing is enabled.
setG2TargetUseAliasing
public void setG2TargetUseAliasing(boolean alias)
- set to true, if the Graphics2D should use aliasing to render text. Defaults to false.
- Parameters:
alias
- set to true, if the Graphics2D should use aliasing.
isPDFTargetEmbedFonts
public boolean isPDFTargetEmbedFonts()
- Returns true, if the Graphics2D should use aliasing to render text. Defaults to false.
- Returns:
- true, if aliasing is enabled.
setPDFTargetEmbedFonts
public void setPDFTargetEmbedFonts(boolean embed)
- set to true, if the PDFOutputTarget should embed all fonts.
- Parameters:
embed
- set to true, if the PDFOutputTarget should use embedded fonts.
isG2BuggyFRC
public boolean isG2BuggyFRC()
- Returns true, if the Graphics2D implementation is buggy and is not really able
to place/calculate the fontsizes correctly. Defaults to false. (SunJDK on Windows
is detected and corrected, Linux SunJDK 1.3 is buggy, but not detectable).
- Returns:
- true, if the Graphics2D implementation does not calculate the string
positions correctly and an alternative implementation should be used.
setG2BuggyFRC
public void setG2BuggyFRC(boolean buggy)
- set to true, if the Graphics2D implementation is buggy and is not really able
to place/calculate the fontsizes correctly. Defaults to false. (SunJDK on Windows
is detected and corrected, Linux SunJDK 1.3 is buggy, but not detectable).
- Parameters:
buggy
- set to true, if the Graphics2D implementation does not calculate the string
positions correctly and an alternative implementation should be used.
getConfigProperties
public java.util.Enumeration getConfigProperties()
- Returns all defined configuration properties for the report. The enumeration
contains all keys of the changed properties, properties set from files or
the system properties are not included.
- Returns:
- all defined configuration properties for the report.
setValidateXML
public void setValidateXML(boolean validate)
- Set to false, to globaly disable the xml-validation.
- Parameters:
validate
- true, if the parser should validate the xml files.
isValidateXML
public boolean isValidateXML()
- returns true, if the parser should validate the xml files against the DTD
supplied with JFreeReport.
- Returns:
- true, if the parser should validate, false otherwise.
isStrictTableLayout
public boolean isStrictTableLayout()
- returns true, if the TableWriter should perform a stricter layout translation.
When set to true, all element bounds are used to create the table. This could result
in a complex layout, more suitable for printing. If set to false, only the starting
bounds (the left and the upper border) are used to create the layout. This will result
is lesser cells and rows, the layout will be better suitable for later processing.
- Returns:
- true, if strict layouting rules should be applied, false otherwise.
setStrictTableLayout
public void setStrictTableLayout(boolean strict)
- Defines whether strict layouting rules should be used for the TableLayouter.
- Parameters:
strict
- set to true, to use strict layouting rules, false otherwise.- See Also:
isStrictTableLayout()
isEnableExportCSV
public boolean isEnableExportCSV()
- Returns true, if the export to CSV files should be available in the preview
dialog. This setting does not limit the report's ability to be exported as
CSV file, it just controls whether the Export plugin will be added to the
Dialog.
- Returns:
- true, if CSV export is enabled, false otherwise.
setEnableExportCSV
public void setEnableExportCSV(boolean enableExportCSV)
- Defines, whether the CSV export plugin will be activated in the preview dialog.
- Parameters:
enableExportCSV
- true, if the export plugin should be active, false otherwise.
isEnableExportHTML
public boolean isEnableExportHTML()
- Returns true, if the export to HTML files should be available in the preview
dialog. This setting does not limit the report's ability to be exported as
HTML file, it just controls whether the Export plugin will be added to the
Dialog.
- Returns:
- true, if HTML export is enabled, false otherwise.
setEnableExportHTML
public void setEnableExportHTML(boolean enableExportHTML)
- Defines, whether the HTML export plugin will be activated in the preview dialog.
- Parameters:
enableExportHTML
- true, if the export plugin should be active, false otherwise.
isEnableExportPlain
public boolean isEnableExportPlain()
- Returns true, if the export to plain text files should be available in the preview
dialog. This setting does not limit the report's ability to be exported as
plain text file, it just controls whether the Export plugin will be added to the
Dialog.
- Returns:
- true, if PlainText export is enabled, false otherwise.
setEnableExportPlain
public void setEnableExportPlain(boolean enableExportPlain)
- Defines, whether the PlainText export plugin will be activated in the preview dialog.
- Parameters:
enableExportPlain
- true, if the export plugin should be active, false otherwise.
isEnableExportPDF
public boolean isEnableExportPDF()
- Returns true, if the export to PDF files should be available in the preview
dialog. This setting does not limit the report's ability to be exported as
PDF file, it just controls whether the Export plugin will be added to the
Dialog.
- Returns:
- true, if PDF export is enabled, false otherwise.
setEnableExportPDF
public void setEnableExportPDF(boolean enableExportPDF)
- Defines, whether the PDF export plugin will be activated in the preview dialog.
- Parameters:
enableExportPDF
- true, if the export plugin should be active, false otherwise.
isEnableExportExcel
public boolean isEnableExportExcel()
- Returns true, if the export to Excel files should be available in the preview
dialog. This setting does not limit the report's ability to be exported as
Excel file, it just controls whether the Export plugin will be added to the
Dialog.
- Returns:
- true, if Excel export is enabled, false otherwise.
setEnableExportExcel
public void setEnableExportExcel(boolean enableExportExcel)
- Defines, whether the Excel export plugin will be activated in the preview dialog.
- Parameters:
enableExportExcel
- true, if the export plugin should be active, false otherwise.
isStrictErrorHandling
public boolean isStrictErrorHandling()
- Checks, whether a stricter error handling is applied to the report processing.
If set to true, then errors in the handling of report events will cause the report
processing to fail. This is a safe-and-paranoid setting, life is simpler with
this set to false. The property defaults to false, as this is the old behaviour.
A properly defined report should not throw exceptions, so it is safe to set this
to true.
- Returns:
- true, if the strict handling is enabled, false otherwise.
setStrictErrorHandling
public void setStrictErrorHandling(boolean strictErrorHandling)
- Defines, whether a stricter error handling is applied to the report processing.
If set to true, then errors in the handling of report events will cause the report
processing to fail. This is a safe-and-paranoid setting, life is simpler with
this set to false. The property defaults to false, as this is the old behaviour.
A properly defined report should not throw exceptions, so it is safe to set this
to true.
- Parameters:
strictErrorHandling
- if set to true, then errors in the event dispatching will
cause the reporting to fail.
getAvailableEncodings
public java.lang.String getAvailableEncodings()
- Defines the loader settings for the available encodings shown to the user.
The property defaults to AVAILABLE_ENCODINGS_ALL.
- Returns:
- either AVAILABLE_ENCODINGS_ALL, AVAILABLE_ENCODINGS_FILE or AVAILABLE_ENCODINGS_NONE.
getEncodingsDefinitionFile
public java.lang.String getEncodingsDefinitionFile()
- Defines the loader settings for the available encodings shown to the user.
The property defaults to AVAILABLE_ENCODINGS_ALL.
- Returns:
- either AVAILABLE_ENCODINGS_ALL, AVAILABLE_ENCODINGS_FILE or AVAILABLE_ENCODINGS_NONE.
getTextTargetEncoding
public java.lang.String getTextTargetEncoding()
- Returns the plain text encoding property value.
- Returns:
- the plain text encoding property value.
setXMLTargetEncoding
public void setXMLTargetEncoding(java.lang.String targetEncoding)
- Sets the plain text encoding property value.
- Parameters:
targetEncoding
- the new encoding.
getHTMLTargetEncoding
public java.lang.String getHTMLTargetEncoding()
- Returns the HTML encoding property value.
- Returns:
- the HTML encoding property value.
setHTMLTargetEncoding
public void setHTMLTargetEncoding(java.lang.String targetEncoding)
- Sets the HTML encoding property value.
- Parameters:
targetEncoding
- the new encoding.
getCSVTargetEncoding
public java.lang.String getCSVTargetEncoding()
- Returns the CSV encoding property value.
- Returns:
- the CSV encoding property value.
setCSVTargetEncoding
public void setCSVTargetEncoding(java.lang.String targetEncoding)
- Sets the CSV encoding property value.
- Parameters:
targetEncoding
- the new encoding.