| |
|
| java.lang.Object org.jfree.report.elementfactory.ElementFactory org.jfree.report.elementfactory.TextElementFactory org.jfree.report.elementfactory.MessageFieldElementFactory
MessageFieldElementFactory | public class MessageFieldElementFactory extends TextElementFactory (Code) | | 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.
Once the desired properties are set, the factory can be reused to create similiar text
elements.
author: Jörg Schaible |
Method Summary | |
public Element | createElement() Creates the message text element based on the defined settings. | public static TextElement | createMessageElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String format) Creates a new TextElement containing a message filter structure. | public static TextElement | createMessageElement(String name, Rectangle2D bounds, Color color, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String formatString) Creates a new TextElement containing a message filter structure.
Parameters: name - the name of the new element. Parameters: bounds - the bounds of the new element. Parameters: color - the text color of this text element. Parameters: alignment - the horizontal text alignment. Parameters: valign - the vertical alignment. Parameters: font - the font for this element. Parameters: nullString - the text used when the value of this element is null. Parameters: formatString - the MessageFormat used in this number element. | public String | getFormatString() Returns the format string of the used message format. | public String | getNullString() Returns the null string for the text element. | public void | setFormatString(String formatString) Defines the format string of the used message format. | public void | setNullString(String nullString) Defines the null string for the text element. |
MessageFieldElementFactory | public MessageFieldElementFactory()(Code) | | Creates a new message field element factory.
|
createMessageElement | public static TextElement createMessageElement(String name, Rectangle2D bounds, Color paint, ElementAlignment alignment, FontDefinition font, String nullString, String format)(Code) | | Creates a new TextElement containing a message filter structure.
Parameters: name - the name of the new element Parameters: bounds - the bounds of the new element Parameters: paint - the text color of this text element Parameters: alignment - the horizontal text alignment. Parameters: font - the font for this element Parameters: nullString - the text used when the value of this element is null Parameters: format - the format string used in this message element a report element for displaying Number objects. throws: NullPointerException - if bounds, name or function are null throws: IllegalArgumentException - if the given alignment is invalid |
createMessageElement | public static TextElement createMessageElement(String name, Rectangle2D bounds, Color color, ElementAlignment alignment, ElementAlignment valign, FontDefinition font, String nullString, String formatString)(Code) | | Creates a new TextElement containing a message filter structure.
Parameters: name - the name of the new element. Parameters: bounds - the bounds of the new element. Parameters: color - the text color of this text element. Parameters: alignment - the horizontal text alignment. Parameters: valign - the vertical alignment. Parameters: font - the font for this element. Parameters: nullString - the text used when the value of this element is null. Parameters: formatString - the MessageFormat used in this number element. a report element for displaying Number objects. throws: NullPointerException - if bounds, name or function are null throws: IllegalArgumentException - if the given alignment is invalid |
getFormatString | public String getFormatString()(Code) | | Returns the format string of the used message format.
the formatstring of the number format instance. |
getNullString | public String getNullString()(Code) | | Returns the null string for the text element. The null string is used when no content
is found for that element.
the null string. |
setFormatString | public void setFormatString(String formatString)(Code) | | Defines the format string of the used message format. The format string should
contain a format for the element 0. This method will replace the message format
instance of this factory.
Parameters: formatString - the formatstring of the message format instance. |
setNullString | public void setNullString(String nullString)(Code) | | Defines the null string for the text element. The null string is used when no content
is found for that element. The nullstring itself can be null.
Parameters: nullString - the null string. |
|
|
|