protected NumericValueWidget numericPref(String label,
final PrefValue<Integer> prefValue)
{
final NumericValueWidget widget = new NumericValueWidget(label);
lessSpaced(widget);
registerEnsureVisibleHandler(widget);
widget.setValue(prefValue.getGlobalValue() + "");
onApplyCommands_.add(new Command()
{
public void execute()
{
try
{
prefValue.setGlobalValue(Integer.parseInt(widget.getValue()));
}
catch (Exception e)
{
// It's OK for this to be invalid if we got past validation--
// that means the associated checkbox wasn't checked