|
|||||||||
| Home >> All >> org >> jfree >> report >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jfree.report.util
Class ReportProperties

java.lang.Objectorg.jfree.report.util.ReportProperties
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class ReportProperties
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
- extends java.lang.Object
The report properties is a hashtable with string keys. ReportProperties are bound to a report as a general purpose storage. ReportProperties bound to a JFreeReport object are visible to all generated report-state chains. A ReportState will inherit all ReportProperties bound to the JFreeReport-object when the ReportState.StartState object is created. Properties bound to the report definition after the report state is created are not visible to the ReportState and its children.
ReportProperties bound to a ReportState are not visible to the report definition (the JFreeReport object), but are visible to all ReportStates of that ReportState-chain. So when you add a property at the end of a report run to a ReportState, the value of this property will be visible to all ReportStates when the report is restarted at a certain point.
ReportProperties can be seen as a stateless shared report internal storage area. All functions have access to the properties by using the ReportState.getProperty() and ReportState.setProperty() functions.
JFreeReport has defined properties to publish the current state of the report:
JFreeReport.NAME_PROPERTY = "report.name"The name of the report as defined in JFreeReport.setName(). Changing this property in the ReportState will not affect the ReportDefinition object.
REPORT_DATE_PROPERTY = "report.date"A java.lang.Date object containing the timestamp when this reportchain was created. This denotes the moment of the pagination, and changes when the report is repaginated.
REPORT_PAGEFORMAT_PROPERTY = "report.pageformat"Contains the current PageFormat used for printing.
REPORT_PAGECOUNT_PROPERTY = "report.pagecount"The number of pages for this report. This property is not available in the prepare run.
REPORT_PREPARERUN_PROPERTY = "report.preparerun"The prepare run is invoked on repagination. This run collects the restart states for every page of the report. When printing or displaying selected pages of the report, these saved states are used as restarting points for the report generation. The prepare-run is invoked only once per PageFormat. Subsequent report printings are restarted on clones of the stored page states.
Field Summary private java.util.TreeSetmarkedProperties
Marked property names.private java.util.HashMapproperties
Storage for the properties.Constructor Summary ReportProperties()
Default constructor.ReportProperties(ReportProperties props)
Copy constructor.Method Summary voidclear()
Removes all properties stored in this collection.java.lang.Objectclone()
Clones the properties.booleancontainsKey(java.lang.String key)
Checks whether the given key is stored in this collection of ReportProperties.booleancontainsMarkedProperties()
Returns true, if there is at least one marked property.java.lang.Objectget(java.lang.String key)
Retrieves the value stored for a key in this properties collection.java.lang.Objectget(java.lang.String key, java.lang.Object defaultValue)
Retrieves the value stored for a key in this properties collection, and returning the default value if the key was not stored in this properties collection.booleanisMarked(java.lang.String property)
Returns true if the specified property is marked, and false otherwise.java.util.Iteratorkeys()
Returns all property keys as enumeration.voidput(java.lang.String key, java.lang.Object value)
Adds a property to this properties collection.voidsetMarked(java.lang.String property, boolean marked)
Marks a property.Methods inherited from class java.lang.Object equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitField Detail properties
private java.util.HashMap properties
- Storage for the properties.
markedProperties
private java.util.TreeSet markedProperties
- Marked property names.
Constructor Detail ReportProperties
public ReportProperties(ReportProperties props)
- Copy constructor.
ReportProperties
public ReportProperties()
- Default constructor.
Method Detail put
public void put(java.lang.String key, java.lang.Object value)
- Adds a property to this properties collection. If a property with the given name
exist, the property will be replaced with the new value. If the value is null, the
property will be removed.
get
public java.lang.Object get(java.lang.String key)
- Retrieves the value stored for a key in this properties collection.
get
public java.lang.Object get(java.lang.String key, java.lang.Object defaultValue)
- Retrieves the value stored for a key in this properties collection, and returning
the default value if the key was not stored in this properties collection.
keys
public java.util.Iterator keys()
- Returns all property keys as enumeration.
clear
public void clear()
- Removes all properties stored in this collection.
containsKey
public boolean containsKey(java.lang.String key)
- Checks whether the given key is stored in this collection of ReportProperties.
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Clones the properties.
setMarked
public void setMarked(java.lang.String property, boolean marked)
- Marks a property.
isMarked
public boolean isMarked(java.lang.String property)
- Returns true if the specified property is marked, and false otherwise.
containsMarkedProperties
public boolean containsMarkedProperties()
- Returns true, if there is at least one marked property.
Overview Package Class Use Deprecated Index Home >> All >> org >> jfree >> report >> [ util overview ] PREV CLASS NEXT CLASS SUMMARY:
JAVADOC |
SOURCE |
DOWNLOAD | NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
- Storage for the properties.
org.jfree.report.util.ReportProperties