class DataSetDefRefreshIntervalEditor implements IsWidget, org.dashbuilder.dataset.client.editor.DataSetDefRefreshIntervalEditor {

    @Override
    public void setValue(final String value) {
        double quantity = 1;
        int index = -1;
        if (value != null) {
            final TimeAmount timeAmount = TimeAmount.parse(value);
            quantity = timeAmount.getQuantity();
            final DateIntervalType dType = timeAmount.getType();
            index = getIntervalTypeIndex(dType);
        }
        
        view.setQuantity(quantity);
        view.setSelectedIntervalType(index > -1 ? index : getIntervalTypeIndex(DEFAULT_INTERVAL_TYPE));
    }

    @Inject public  DataSetDefRefreshIntervalEditor(final View view,
                                           final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent);

}