class TimeInstantEditor implements IsWidget {

    void changeTimeMode() {
        int selectedIdx = view.getTimeModeSelectedIndex();

        TimeInstant.TimeMode mode = TimeInstant.TimeMode.getByIndex(selectedIdx);
        timeInstant.setTimeMode(mode);
        TimeAmount timeAmount = timeInstant.getTimeAmount();
        if (timeAmount != null) {
            timeAmount.setQuantity(0);
        }

        onChangeCommand.execute();
        initIntervalTypeSelector();
    }

    @Inject public  TimeInstantEditor(View view, TimeAmountEditor timeAmountEditor);

}