public class ResourceMessageElementFactory extends TextElementFactory
Constructor and Description |
---|
ResourceMessageElementFactory()
DefaultConstructor.
|
Modifier and Type | Method and Description |
---|---|
Element |
createElement()
Generates the element based on the defined properties.
|
static Element |
createResourceMessage(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 |
getFormatKey()
Returns the resource key that contains the label text.
|
String |
getMessageNullString() |
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.
|
void |
setFormatKey(String formatKey)
Defines the resource key, which will be used to read the translated label text.
|
void |
setMessageNullString(String messageNullString) |
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.
|
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
getAbsolutePosition, getAvoidPagebreaks, getBackgroundColor, getBorderBottomColor, getBorderBottomLeftRadius, getBorderBottomLeftRadiusHeight, getBorderBottomLeftRadiusWidth, getBorderBottomRightRadius, getBorderBottomRightRadiusHeight, getBorderBottomRightRadiusWidth, getBorderBottomStyle, getBorderBottomWidth, getBorderBreakColor, getBorderBreakStyle, getBorderBreakWidth, getBorderColor, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRadius, getBorderRadiusHeight, getBorderRadiusWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderStyle, getBorderTopColor, getBorderTopLeftRadius, getBorderTopLeftRadiusHeight, getBorderTopLeftRadiusWidth, getBorderTopRightRadius, getBorderTopRightRadiusHeight, getBorderTopRightRadiusWidth, getBorderTopStyle, getBorderTopWidth, getBorderWidth, getColor, getDynamicHeight, getFontSmooth, getHeight, getHorizontalAlignment, getHRefTarget, getHRefTitle, getHRefWindow, getLayoutCachable, getMaximumHeight, getMaximumSize, getMaximumWidth, getMinimumHeight, getMinimumSize, getMinimumWidth, getName, getOrphans, getOverflowX, getOverflowY, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredSize, getUseMinChunkWidth, getVerticalAlignment, getVisible, getWidowOrphanOptOut, getWidows, getWidth, getX, getY, setAbsolutePosition, setAvoidPagebreaks, setBackgroundColor, setBorderBottomColor, setBorderBottomLeftRadius, setBorderBottomLeftRadiusHeight, setBorderBottomLeftRadiusWidth, setBorderBottomRightRadius, setBorderBottomRightRadiusHeight, setBorderBottomRightRadiusWidth, setBorderBottomStyle, setBorderBottomWidth, setBorderBreakColor, setBorderBreakStyle, setBorderBreakWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRadius, setBorderRadiusHeight, setBorderRadiusWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopLeftRadius, setBorderTopLeftRadiusHeight, setBorderTopLeftRadiusWidth, setBorderTopRightRadius, setBorderTopRightRadiusHeight, setBorderTopRightRadiusWidth, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setColor, setDynamicHeight, setFontSmooth, setHeight, setHorizontalAlignment, setHRefTarget, setHRefTitle, setHRefWindow, setLayoutCachable, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setName, setOrphans, setOverflowX, setOverflowY, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPreferredSize, setUseMinChunkWidth, setVerticalAlignment, setVisible, setWidowOrphanOptOut, setWidows, setWidth, setX, setY
public ResourceMessageElementFactory()
public String getMessageNullString()
public void setMessageNullString(String messageNullString)
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 getFormatKey()
public void setFormatKey(String formatKey)
formatKey
- 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 createResourceMessage(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).