|
||||||||||
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.MessageFieldElementFactory
public class MessageFieldElementFactory
The message format factory can be used to create formatted text elements using the format defined for MessageFormat
. These text elements have special abilities to format numeric values and dates based on the
MessageFormat string.
Constructor Summary | |
---|---|
MessageFieldElementFactory()
Creates a new message field element factory. |
Method Summary | |
---|---|
Element |
createElement()
Creates the message text element based on the defined settings. |
static Element |
createMessageElement(String name,
Rectangle2D bounds,
Color color,
ElementAlignment alignment,
ElementAlignment valign,
FontDefinition font,
String nullString,
String formatString)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
static Element |
createMessageElement(String name,
Rectangle2D bounds,
Color paint,
ElementAlignment alignment,
FontDefinition font,
String nullString,
String format)
Deprecated. Use a more fine-grained approach to define this element by using the element-factory directly. |
String |
getFormatString()
Returns the format string of the used message format. |
String |
getMessageNullString()
|
String |
getNullString()
Returns the null string for the text element. |
void |
setFormatString(String formatString)
Defines the format string of the used message format. |
void |
setMessageNullString(String messageNullString)
|
void |
setNullString(String nullString)
Defines the null string for the text element. |
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 MessageFieldElementFactory()
Method Detail |
---|
public String getFormatString()
public void setFormatString(String formatString)
formatString
- the formatstring of the message format instance.public String getNullString()
public void setNullString(String nullString)
nullString
- the null string.public String getMessageNullString()
public void setMessageNullString(String messageNullString)
public Element createElement()
createElement
in class ElementFactory
ElementFactory.createElement()
public static Element createMessageElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String format)
name
- the name of the new elementbounds
- the bounds of the new elementpaint
- the text color of this text elementalignment
- the horizontal text alignment.font
- the font for this elementnullString
- the text used when the value of this element is nullformat
- the format string used in this message element
Number
objects.
NullPointerException
- if bounds, name or function are null
IllegalArgumentException
- if the given alignment is invalidpublic static Element createMessageElement(String name, Rectangle2D bounds, Color color, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String formatString)
name
- the name of the new element.bounds
- the bounds of the new element.color
- the text color of this text element.alignment
- the horizontal text alignment.valign
- the vertical alignment.font
- the font for this element.nullString
- the text used when the value of this element is null.formatString
- the MessageFormat used in this number element.
Number
objects.
NullPointerException
- if bounds, name or function are null
IllegalArgumentException
- if the given alignment is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |