class TimeInstantEditor implements IsWidget {

    public void init(final TimeInstant ti, final Command onChangeCommand) {
        this.timeInstant = ti != null ? ti : new TimeInstant();
        this.onChangeCommand = onChangeCommand;
        this.timeAmountEditor.init(timeInstant.getTimeAmount(), new Command() {
            public void execute() {
                timeInstant.setTimeAmount(timeAmountEditor.getTimeAmount());
                onChangeCommand.execute();
            }
        });
        initTimeModeSelector();
        initIntervalTypeSelector();
    }

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

}