| java.lang.Object org.jfree.report.util.ReportProperties
ReportProperties | public class ReportProperties implements Serializable,Cloneable(Code) | | 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.
For a list of defined default properties, have a look at the
org.jfree.report.JFreeReport class.
author: Thomas Morgner |
Method Summary | |
public void | clear() Removes all properties stored in this collection. | public Object | clone() Clones the properties. | public boolean | containsKey(String key) Checks whether the given key is stored in this collection of ReportProperties.
Parameters: key - the property key. | public boolean | containsMarkedProperties() Returns true, if there is at least one marked property. | public Object | get(String key) Retrieves the value stored for a key in this properties collection.
Parameters: key - the property key. | public Object | get(String key, 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.
Parameters: key - the property key. Parameters: defaultValue - the default value to be returned when the key is not stored inthis properties collection. | public ReportProperties | getMasterProperties() Returns the fall-back property-collection. | public boolean | isMarked(String property) Returns true if the specified property is marked, and false otherwise.
Parameters: property - the property key. | public String[] | keyArray() Returns all defined keys as string-array. | public Iterator | keys() Returns all property keys as enumeration. | public Iterator | markedKeys() Marks a property. | public void | put(String key, Object value) Adds a property to this properties collection. | public void | setMarked(String property, boolean marked) Marks a property. | public void | setMasterProperties(ReportProperties masterProperties) Defines the fall-back property-collection. | public int | size() Returns the number of entries in this collection. |
ReportProperties | public ReportProperties(ReportProperties props)(Code) | | Copy constructor.
Parameters: props - an existing ReportProperties instance. |
ReportProperties | public ReportProperties()(Code) | | Default constructor.
|
clear | public void clear()(Code) | | Removes all properties stored in this collection.
|
containsKey | public boolean containsKey(String key)(Code) | | Checks whether the given key is stored in this collection of ReportProperties.
Parameters: key - the property key. true, if the given key is known. |
containsMarkedProperties | public boolean containsMarkedProperties()(Code) | | Returns true, if there is at least one marked property.
true, if there are some properties marked, false otherwise. |
get | public Object get(String key)(Code) | | Retrieves the value stored for a key in this properties collection.
Parameters: key - the property key. The stored value, or null if the key does not exist in thiscollection. |
get | public Object get(String key, Object defaultValue)(Code) | | 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.
Parameters: key - the property key. Parameters: defaultValue - the default value to be returned when the key is not stored inthis properties collection. The stored value, or the default value if the key does not exist in thiscollection. |
getMasterProperties | public ReportProperties getMasterProperties()(Code) | | Returns the fall-back property-collection. If defined, this collection will be used if a queried property is not
defined in this collection.
the fall-back collection. |
isMarked | public boolean isMarked(String property)(Code) | | Returns true if the specified property is marked, and false otherwise.
Parameters: property - the property key. true for marked properties, false otherwise. |
keyArray | public String[] keyArray()(Code) | | Returns all defined keys as string-array.
the keys as array. |
keys | public Iterator keys()(Code) | | Returns all property keys as enumeration.
an enumeration of the property keys. |
markedKeys | public Iterator markedKeys()(Code) | | Marks a property. Marking was a historical process that made the property available in the report's datarow. Since
version 0.8.9, all properties are part of the data-row by default.
all keys |
put | public void put(String key, Object value)(Code) | | 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.
Parameters: key - the property key. Parameters: value - the property value. |
setMarked | public void setMarked(String property, boolean marked)(Code) | | Marks a property.
Parameters: property - the property key. Parameters: marked - boolean. |
setMasterProperties | public void setMasterProperties(ReportProperties masterProperties)(Code) | | Defines the fall-back property-collection. If defined, this collection will be used if a queried property is not
defined in this collection.
Parameters: masterProperties - the fall-back collection. |
size | public int size()(Code) | | Returns the number of entries in this collection.
the number of properties defined here. |
|
|