[loc-en-dev] MessageFormat question

Mark Davis ☕ mark at macchiato.com
Mon Aug 8 17:50:20 PDT 2011


It is for lining up columns.

For example, suppose you have a column in a spreadsheet with formatted
numbers. If you pass in
http://download.oracle.com/javase/6/docs/api/java/text/NumberFormat.Field.html#DECIMAL_SEPARATORyou
can find out the start/end position of the decimal separator, no
matter
what language the numbers are formatted in, and align them. In practice,
that one field is probably the only really useful one.

Mark
*— Il meglio è l’inimico del bene —*


On Mon, Aug 8, 2011 at 01:40, Masayoshi Okutsu
<masayoshi.okutsu at oracle.com>wrote:

> I wonder if someone on this mailing list has some idea on my question
> below.
>
> MessageFormat.format takes a FieldPosition defined as follows:
>
> pos - On input: an alignment field, if desired. On output: the offsets of
> the alignment field.
>
> What's the intention of this spec? What's the alignment field?
>
> Thanks in advance,
> Masayoshi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/locale-enhancement-dev/attachments/20110808/b294eed1/attachment.html 


More information about the locale-enhancement-dev mailing list