}
return tb;
}
private AbstractRestrictedEntryTextBox makeNumericBigIntegerTextBox( final DTCellValue52 value ) {
final AbstractRestrictedEntryTextBox tb = new NumericBigIntegerTextBox( allowEmptyValues );
final BigInteger numericValue = (BigInteger) value.getNumericValue();
tb.setValue( numericValue == null ? "" : numericValue.toString() );
// Wire up update handler
tb.setEnabled( !isReadOnly );
if ( !isReadOnly ) {
tb.addValueChangeHandler( new ValueChangeHandler<String>() {
public void onValueChange( ValueChangeEvent<String> event ) {
try {
value.setNumericValue( new BigInteger( event.getValue() ) );
} catch ( NumberFormatException nfe ) {
if ( allowEmptyValues ) {
value.setNumericValue( (BigInteger) null );
tb.setValue( "" );
} else {
value.setNumericValue( BigInteger.ZERO );
tb.setValue( BigInteger.ZERO.toString() );
}
}
}
} );