|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.elementfactory.ElementFactory
org.jfree.report.elementfactory.TextElementFactory
org.jfree.report.elementfactory.ResourceLabelElementFactory
A factory to define translateable LabelElements. LabelElements are considered immutable and should not be modified once they are created. The label expects plain text. The content of the label will be translated using an assigned resource bundle.
Constructor Summary | |
ResourceLabelElementFactory()
DefaultConstructor. |
Method Summary | |
Element |
createElement()
Generates the element based on the defined properties. |
static TextElement |
createResourceLabel(java.lang.String name,
java.awt.geom.Rectangle2D bounds,
java.awt.Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
java.lang.String nullValue,
java.lang.String resourceBase,
java.lang.String resourceKey)
Creates a ResourceElement. |
java.lang.String |
getNullString()
Returns the null string for the text element. |
java.lang.String |
getResourceBase()
Returns the base name of the resource bundle used to translate the content later. |
java.lang.String |
getResourceKey()
Returns the resource key that contains the label text. |
void |
setNullString(java.lang.String nullString)
Defines the null string for the text element. |
void |
setResourceBase(java.lang.String resourceBase)
Defines the base name of the resource bundle used to translate the content later. |
void |
setResourceKey(java.lang.String resourceKey)
Defines the resource key, which will be used to read the translated label text. |
Methods inherited from class org.jfree.report.elementfactory.TextElementFactory |
applyStyle, getBold, getColor, getEmbedFont, getEncoding, getFontName, getFontSize, getHorizontalAlignment, getItalic, getLineHeight, getReservedLiteral, getStrikethrough, getTrimTextContent, getUnderline, getVerticalAlignment, setBold, setColor, setEmbedFont, setEncoding, setFontName, setFontSize, setHorizontalAlignment, setItalic, setLineHeight, setReservedLiteral, setStrikethrough, setTrimTextContent, setUnderline, setVerticalAlignment |
Methods inherited from class org.jfree.report.elementfactory.ElementFactory |
applyElementName, getAbsolutePosition, getDynamicHeight, getMaximumSize, getMinimumSize, getName, getPreferredSize, setAbsolutePosition, setDynamicHeight, setMaximumSize, setMinimumSize, setName, setPreferredSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ResourceLabelElementFactory()
Method Detail |
public java.lang.String getResourceBase()
public void setResourceBase(java.lang.String resourceBase)
resourceBase
- the resource bundle name of the element.public java.lang.String getNullString()
public void setNullString(java.lang.String nullString)
nullString
- the null string.public java.lang.String getResourceKey()
public void setResourceKey(java.lang.String resourceKey)
resourceKey
- the resource bundle key.public Element createElement()
createElement
in class ElementFactory
java.lang.NullPointerException
- if the resource class name is null.
java.lang.IllegalStateException
- if the resource key is not defined.ElementFactory.createElement()
public static TextElement createResourceLabel(java.lang.String name, java.awt.geom.Rectangle2D bounds, java.awt.Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, java.lang.String nullValue, java.lang.String resourceBase, java.lang.String resourceKey)
java.util.ResourceBundle
.
name
- the name of the new element.bounds
- the bounds of the new element.paint
- the text color of this text element.alignment
- the horizontal alignment.valign
- the vertical alignment.font
- the font for this element.resourceKey
- the key which is used to query the resource bundleresourceBase
- the classname/basename of the assigned resource bundlenullValue
- the null string of the text element (can be null).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |