|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory org.pentaho.reporting.engine.classic.core.elementfactory.ResourceLabelElementFactory
public class 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 Element |
createResourceLabel(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String nullValue,
String resourceBase,
String resourceKey)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
String |
getNullString()
Returns the null string for the text element. |
String |
getResourceBase()
Returns the base name of the resource bundle used to translate the content later. |
String |
getResourceKey()
Returns the resource key that contains the label text. |
void |
setNullString(String nullString)
Defines the null string for the text element. |
void |
setResourceBase(String resourceBase)
Defines the base name of the resource bundle used to translate the content later. |
void |
setResourceKey(String resourceKey)
Defines the resource key, which will be used to read the translated label text. |
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.TextElementFactory |
---|
getBold, getEmbedFont, getEncoding, getFontName, getFontSize, getItalic, getLineHeight, getMaximumLetterSpacing, getMinimumLetterSpacing, getOptimumLetterSpacing, getReservedLiteral, getStrikethrough, getTrimTextContent, getUnderline, getVerticalTextAlignment, getWhitespaceCollapse, getWrap, getWrapText, setBold, setEmbedFont, setEncoding, setFontName, setFontSize, setItalic, setLineHeight, setMaximumLetterSpacing, setMinimumLetterSpacing, setOptimumLetterSpacing, setReservedLiteral, setStrikethrough, setTrimTextContent, setUnderline, setVerticalTextAlignment, setWhitespaceCollapse, setWrap, setWrapText |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceLabelElementFactory()
Method Detail |
---|
public String getResourceBase()
public void setResourceBase(String resourceBase)
resourceBase
- the resource bundle name of the element.public String getNullString()
public void setNullString(String nullString)
nullString
- the null string.public String getResourceKey()
public void setResourceKey(String resourceKey)
resourceKey
- the resource bundle key.public Element createElement()
createElement
in class ElementFactory
NullPointerException
- if the resource class name is null.
IllegalStateException
- if the resource key is not defined.ElementFactory.createElement()
public static Element createResourceLabel(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullValue, String resourceBase, 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 |