BTW, I only reviewed the Number/Date classes, not everything.
http://gwt-code-reviews.appspot.com/1099801/diff/1/8 File user/src/com/google/gwt/user/client/ui/NumberLabel.java (right): http://gwt-code-reviews.appspot.com/1099801/diff/1/8#newcode34 user/src/com/google/gwt/user/client/ui/NumberLabel.java:34: } On 2010/11/11 18:36:23, tbroyer wrote:
On 2010/11/11 15:35:57, jat wrote: > For consistency with DateLabel, shouldn't their be a constructor
that takes a
> NumberFormatRenderer?
Given that if you have a Renderer you can directly use ValueLabel, I
think I'd
rather remove the ctor from DateLabel. What do you think?
I don't care much, as long as they are consistent.
Actually, maybe even DateLabel and NumberLabel aren't needed, as in
many cases I
guess you'll pass a formatter, which means you'll probably use @UiField(provided=true) or a @UiFactory with UiBinder (which probably
defeats
the idea of those datatype-specialized widgets) Or maybe they rather should only have a no-arg ctor, or a
@UiConstructor?
And/or should the renderer be settable in ValueLabel (which would
allow using
setters in NumberLabel and DateLabel to easily customize the format in
UiBinder
without mandating a format, as @UiConstructor would; i.e. setPredefinedFormat(PredefinedFormat) and setCustomFormat(String) in
DateLabel,
and crafting an enum for a similar use in NumberLabel)
UiBinder can't supply arbitrary values, such as a DateTimeFormat, can it? http://gwt-code-reviews.appspot.com/1099801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
