class DecimalBoxFieldRenderer extends FieldRenderer<DecimalBoxFieldDefinition, DefaultFormGroup> implements RequiresValueConverter {

    @Override
    protected FormGroup getFormGroup(RenderMode renderMode) {
        DefaultFormGroup formGroup = formGroupsInstance.get();

        if (renderMode.equals(RenderMode.PRETTY_MODE)) {
            formGroup.render(new HTML(),
                             field);
        } else {
            String inputId = generateUniqueId();
            decimalBox.setId(inputId);
            decimalBox.setPlaceholder(field.getPlaceHolder());
            decimalBox.setMaxLength(field.getMaxLength());
            decimalBox.setEnabled(!field.getReadOnly());
            formGroup.render(inputId,
                             decimalBox.asWidget(),
                             field);
            registerFieldRendererPart(decimalBox);
        }

        return formGroup;
    }

    @Inject public  DecimalBoxFieldRenderer(DecimalBox decimalBox);

}