@Test public void testSetValueWithZeroValues() { daysInput.value = "something"; hoursInput.value = "something"; minutesInput.value = "something"; secondsInput.value = "something"; view.setValue(new DayTimeValue()); assertEquals(daysInput.value, ""); assertEquals(hoursInput.value, ""); assertEquals(minutesInput.value, ""); assertEquals(secondsInput.value, ""); }
@Override public void setValue(final DayTimeValue value) { daysInput.value = toDisplay(value.getDays()); hoursInput.value = toDisplay(value.getHours()); minutesInput.value = toDisplay(value.getMinutes()); secondsInput.value = toDisplay(value.getSeconds()); }
DayTimeSelectorView implements DayTimeSelector.View { @Override public void setValue(final DayTimeValue value) { daysInput.value = toDisplay(value.getDays()); hoursInput.value = toDisplay(value.getHours()); minutesInput.value = toDisplay(value.getMinutes()); secondsInput.value = toDisplay(value.getSeconds()); } }
DayTimeSelectorView implements DayTimeSelector.View { @Override public void setValue(final DayTimeValue value) { daysInput.value = toDisplay(value.getDays()); hoursInput.value = toDisplay(value.getHours()); minutesInput.value = toDisplay(value.getMinutes()); secondsInput.value = toDisplay(value.getSeconds()); } @Inject  DayTimeSelectorView(final HTMLInputElement daysInput,
                               final HTMLInputElement hoursInput,
                               final HTMLInputElement minutesInput,
                               final HTMLInputElement secondsInput); }
DayTimeSelectorView implements DayTimeSelector.View { @Override public void setValue(final DayTimeValue value) { daysInput.value = toDisplay(value.getDays()); hoursInput.value = toDisplay(value.getHours()); minutesInput.value = toDisplay(value.getMinutes()); secondsInput.value = toDisplay(value.getSeconds()); } @Inject  DayTimeSelectorView(final HTMLInputElement daysInput,
                               final HTMLInputElement hoursInput,
                               final HTMLInputElement minutesInput,
                               final HTMLInputElement secondsInput); @Override void init(final DayTimeSelector presenter); @PostConstruct void setupEventHandlers(); @Override DayTimeValue getValue(); @Override void setValue(final DayTimeValue value); @Override void setOnValueChanged(final Consumer<Event> onValueChangedConsumer); @Override void setOnValueInputBlur(final Consumer<BlurEvent> onValueInputBlurConsumer); @EventHandler("days-input") void onDaysInputBlurEvent(final BlurEvent blurEvent); @EventHandler("hours-input") void onHoursInputBlurEvent(final BlurEvent blurEvent); @EventHandler("minutes-input") void onMinutesInputBlurEvent(final BlurEvent blurEvent); @EventHandler("seconds-input") void onSecondsInputBlurEvent(final BlurEvent blurEvent); @Override void select(); }
DayTimeSelectorView implements DayTimeSelector.View { @Override public void setValue(final DayTimeValue value) { daysInput.value = toDisplay(value.getDays()); hoursInput.value = toDisplay(value.getHours()); minutesInput.value = toDisplay(value.getMinutes()); secondsInput.value = toDisplay(value.getSeconds()); } @Inject  DayTimeSelectorView(final HTMLInputElement daysInput,
                               final HTMLInputElement hoursInput,
                               final HTMLInputElement minutesInput,
                               final HTMLInputElement secondsInput); @Override void init(final DayTimeSelector presenter); @PostConstruct void setupEventHandlers(); @Override DayTimeValue getValue(); @Override void setValue(final DayTimeValue value); @Override void setOnValueChanged(final Consumer<Event> onValueChangedConsumer); @Override void setOnValueInputBlur(final Consumer<BlurEvent> onValueInputBlurConsumer); @EventHandler("days-input") void onDaysInputBlurEvent(final BlurEvent blurEvent); @EventHandler("hours-input") void onHoursInputBlurEvent(final BlurEvent blurEvent); @EventHandler("minutes-input") void onMinutesInputBlurEvent(final BlurEvent blurEvent); @EventHandler("seconds-input") void onSecondsInputBlurEvent(final BlurEvent blurEvent); @Override void select();  }