Thanks for the quick feedback!

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#newcode22
user/src/com/google/gwt/user/client/ui/NumberLabel.java:22: * A
ValueLabel that uses {...@link DoubleRenderer}.
On 2010/11/11 15:35:57, jat wrote:
Should be NumberFormatRenderer, right?

Done.

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 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?

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)

http://gwt-code-reviews.appspot.com/1099801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to