void changeIntervalType() { int selectedIdx = view.getSelectedIntervalTypeIndex(); DateIntervalType intervalType = INTERVAL_TYPES.get(selectedIdx); timeInstant.setIntervalType(intervalType); onChangeCommand.execute(); initIntervalTypeSelector(); } }
void changeIntervalType() { int selectedIdx = view.getSelectedIntervalTypeIndex(); DateIntervalType intervalType = INTERVAL_TYPES.get(selectedIdx); timeInstant.setIntervalType(intervalType); onChangeCommand.execute(); initIntervalTypeSelector(); } }
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(); }
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(); }
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(); }
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(); }