| Method from org.jfree.report.JFreeReport Detail: |
public void addStructureFunction(StructureFunction function) {
if (function == null)
{
throw new NullPointerException();
}
structureFunctions.add(function);
}
Adds a structural function to the report. Structural functions perform content preparation and maintainance
operations before elements are layouted or printed.
Structural function can live on their own processing level and are evaluated after the user expressions but before
the layout expressions have been evaluated. |
public Object clone() throws CloneNotSupportedException {
final JFreeReport report = (JFreeReport) super.clone();
report.pageDefinition = (PageDefinition) pageDefinition.clone();
report.reportConfiguration = (ModifiableConfiguration) reportConfiguration.clone();
report.structureFunctions = (ArrayList) structureFunctions.clone();
report.structureFunctions.clear();
report.dataSchemaDefinition = (DataSchemaDefinition) dataSchemaDefinition.clone();
report.reportEnvironment = (ReportEnvironment) reportEnvironment.clone();
report.parameterDefinition = (ReportParameterDefinition) parameterDefinition.clone();
report.parameterValues = (ReportParameterValues) parameterValues.clone();
try
{
report.dataFactory = dataFactory.derive();
}
catch (ReportDataFactoryException e)
{
throw new CloneNotSupportedException();
}
for (int i = 0; i < structureFunctions.size(); i++)
{
final StructureFunction function = (StructureFunction) structureFunctions.get(i);
report.structureFunctions.add(function.clone());
}
return report;
}
|
public Configuration getConfiguration() {
return reportConfiguration;
}
Returns the report's configuration. |
public DataFactory getDataFactory() {
return dataFactory;
}
Returns the data factory that has been assigned to this report. The data factory will never be null. |
public DataSchemaDefinition getDataSchemaDefinition() {
return dataSchemaDefinition;
}
|
public String getName() {
final Object nameFromProperties = getProperty(JFreeReport.NAME_PROPERTY);
if (nameFromProperties == null)
{
return super.getName();
}
return String.valueOf(nameFromProperties);
}
Returns the name of the report.
You can reference the report name in your XML report template file using the key 'report.name'. |
public PageDefinition getPageDefinition() {
return pageDefinition;
}
Returns the logical page definition for this report. |
public ReportParameterDefinition getParameterDefinition() {
return parameterDefinition;
}
|
public ReportParameterValues getParameterValues() {
return parameterValues;
}
|
public ModifiableConfiguration getReportConfiguration() {
return reportConfiguration;
}
Returns the report configuration.
The report configuration is automatically set up when the report is first created, and uses the global JFreeReport
configuration as its parent. |
public ReportEnvironment getReportEnvironment() {
return reportEnvironment;
}
|
public ResourceBundleFactory getResourceBundleFactory() {
return resourceBundleFactory;
}
Returns the resource bundle factory for this report definition. The ResourceBundleFactory is used in
internationalized reports to create the resourcebundles holding the localized resources. |
public ResourceManager getResourceManager() {
if (resourceManager == null)
{
resourceManager = new ResourceManager();
resourceManager.registerDefaults();
}
return resourceManager;
}
Returns the resource manager that was responsible for loading the report. This method will return a default manager
if the report had been constructed otherwise.
The resource manager of the report should be used for all resource loading activities during the report
processing. |
public StructureFunction getStructureFunction(int index) {
return (StructureFunction) structureFunctions.get(index);
}
Returns the structure function at the given position. |
public int getStructureFunctionCount() {
return structureFunctions.size();
}
Returns the number of structural functions added to the report. |
public StructureFunction[] getStructureFunctions() {
final int length = this.structureFunctions.size();
final StructureFunction[] structureFunctions =
(StructureFunction[]) this.structureFunctions.toArray(new StructureFunction[length]);
for (int i = 0; i < length; i++)
{
final StructureFunction function = structureFunctions[i];
structureFunctions[i] = (StructureFunction) function.getInstance();
}
return structureFunctions;
}
Returns a copy of all structure functions contained in the report. Modifying the function instances will not alter
the functions contained in the report. |
public String getTitle() {
final Object o = getDocumentMetaData().getBundleAttribute
(ODFMetaAttributeNames.DublinCore.NAMESPACE, ODFMetaAttributeNames.DublinCore.TITLE);
if (o == null)
{
return null;
}
return o.toString();
}
|
public void removeStructureFunction(StructureFunction f) {
structureFunctions.remove(f);
}
Removes the given function from the collection of structure functions. This removes only the first occurence of the
function, in case a function has been added twice. |
public void setDataFactory(DataFactory dataFactory) {
if (dataFactory == null)
{
throw new NullPointerException();
}
this.dataFactory = dataFactory;
}
Sets the data factory for the report. |
public void setDataSchemaDefinition(DataSchemaDefinition dataSchemaDefinition) {
if (dataSchemaDefinition == null)
{
throw new NullPointerException();
}
this.dataSchemaDefinition = dataSchemaDefinition;
}
|
public void setName(String name) {
super.setName(name);
setProperty(JFreeReport.NAME_PROPERTY, name);
}
Sets the name of the report.
The report name is stored as a property (key JFreeReport#NAME_PROPERTY ) inside the report properties. If
you supply null as the name, the property is removed. |
public void setPageDefinition(PageDefinition format) {
if (format == null)
{
final ExtendedConfiguration config = JFreeReportBoot.getInstance().getExtendedConfig();
if (config.getBoolProperty(JFreeReportCoreModule.NO_PRINTER_AVAILABLE_KEY))
{
format = new SimplePageDefinition(new PageFormat());
}
else
{
format = new SimplePageDefinition(PrinterJob.getPrinterJob().defaultPage());
}
}
pageDefinition = format;
}
Defines the logical page definition for this report. If no format is defined the system's default page format is
used.
If there is no printer available and the JDK blocks during the printer discovery, you can set the Configuration key "org.jfree.report.NoPrinterAvailable" to "false" and JFreeReport will use a hardcoded
default page format instead. |
public void setParameterDefinition(ReportParameterDefinition parameterDefinition) {
if (parameterDefinition == null)
{
throw new NullPointerException();
}
this.parameterDefinition = parameterDefinition;
}
|
public void setProperty(String key,
Object value) {
super.setProperty(key, value);
logger.warn("Use of deprecated features: Do not use Report-Properties, use the parameter-values directly.");
parameterValues.put(key, value);
} Deprecated! Properties - should not be used. Use the master-report's parameters instead.
Adds a property to the report.
If a property with the given name already exists, the property will be updated with the new value. If the supplied
value is null, the property will be removed.
Developers are free to add any properties they want to a report, and then display those properties in the report.
For example, you might add a 'user.name' property, so that you can display the username in the header of a report. |
public void setReportEnvironment(ReportEnvironment reportEnvironment) {
if (reportEnvironment == null)
{
throw new NullPointerException();
}
this.reportEnvironment = reportEnvironment;
}
|
public void setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory) {
if (resourceBundleFactory == null)
{
throw new NullPointerException("ResourceBundleFactory must not be null");
}
this.resourceBundleFactory = resourceBundleFactory;
}
Redefines the resource bundle factory for the report. |
public void setResourceManager(ResourceManager resourceManager) {
this.resourceManager = resourceManager;
}
Assigns a new resource manager or clears the current one. If no resource manager is set anymore, the next call to
'getResourceManager' will recreate one. |