public class WordFormatter extends DefaultAttributeFormatter
Modifier and Type | Field and Description |
---|---|
protected Object[] |
langAndWord |
protected MessageFormat |
langAndWordFormat |
protected MessageFormat |
langFormat |
protected static ResourceBundle |
languages |
protected MessageFormat |
wordFormat |
printAfter, printAttributeName, printBefore, printBeforeValue, tempBuffer, valueFormat
Constructor and Description |
---|
WordFormatter(String _wordFormat,
String _langFormat,
String _langAndWordFormat,
ListFormatter _formatter) |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
format(Attribute<?> att,
AttributeValue val,
StringBuilder buf)
Format an attribute and its value as a string.
|
format
format
protected static final ResourceBundle languages
protected MessageFormat wordFormat
protected MessageFormat langFormat
protected MessageFormat langAndWordFormat
protected Object[] langAndWord
public WordFormatter(String _wordFormat, String _langFormat, String _langAndWordFormat, ListFormatter _formatter)
public StringBuilder format(Attribute<?> att, AttributeValue val, StringBuilder buf)
AttributeValueFormatter
format
in interface AttributeValueFormatter
format
in class DefaultAttributeFormatter
val
- Value of the attribute. May be null
if the attribute is set but
has no value.buf
- String buffer to which the formatted attribute is appended.Copyright © 2001-2013 the JGloss developers. All Rights Reserved.