DatePicker.StandardCss css() { return datePicker.css(); }
/** * Sets the {@link DatePicker}'s value. * * @param newValue the new value for this date picker * @param fireEvents should events be fired. */ public final void setValue(Date newValue, boolean fireEvents) { Date oldValue = value; if (oldValue != null) { removeStyleFromDates(css().dayIsValue(), oldValue); } value = CalendarUtil.copyDate(newValue); if (value != null) { addStyleToDates(css().dayIsValue(), value); } getView().setAriaSelectedCell(newValue); if (fireEvents) { DateChangeEvent.fireIfNotEqualDates(this, oldValue, newValue); } }
/** * Creates a new date picker. * * @param monthAndYearSelector the month selector * @param view the view * @param model the model */ protected DatePicker(MonthSelector monthAndYearSelector, CalendarView view, CalendarModel model) { this.model = model; this.monthAndYearSelector = monthAndYearSelector; monthAndYearSelector.setDatePicker(this); this.view = view; view.setDatePicker(this); view.setup(); monthAndYearSelector.setup(); this.setup(); setCurrentMonth(new Date()); addStyleToDates(css().dayIsToday(), new Date()); }
DatePicker.StandardCss css() { return datePicker.css(); }
DatePicker.StandardCss css() { return datePicker.css(); }
/** * Sets up the date picker. */ protected void setup() { /* * Use a table (VerticalPanel) to get shrink-to-fit behavior. Divs expand to * fill the available width, so we'd need to give it a size. */ VerticalPanel panel = new VerticalPanel(); initWidget(panel); setStyleName(panel.getElement(), css.datePicker()); setStyleName(css().datePicker()); panel.add(this.getMonthSelector()); panel.add(this.getView()); }
/** * Sets the {@link DatePicker}'s value. * * @param newValue the new value for this date picker * @param fireEvents should events be fired. */ public final void setValue(Date newValue, boolean fireEvents) { Date oldValue = value; if (oldValue != null) { removeStyleFromDates(css().dayIsValue(), oldValue); } value = CalendarUtil.copyDate(newValue); if (value != null) { addStyleToDates(css().dayIsValue(), value); } getView().setAriaSelectedCell(newValue); if (fireEvents) { DateChangeEvent.fireIfNotEqualDates(this, oldValue, newValue); } }
/** * Sets the {@link DatePicker}'s value. * * @param newValue the new value for this date picker * @param fireEvents should events be fired. */ public final void setValue(Date newValue, boolean fireEvents) { Date oldValue = value; if (oldValue != null) { removeStyleFromDates(css().dayIsValue(), oldValue); } value = CalendarUtil.copyDate(newValue); if (value != null) { addStyleToDates(css().dayIsValue(), value); } getView().setAriaSelectedCell(newValue); if (fireEvents) { DateChangeEvent.fireIfNotEqualDates(this, oldValue, newValue); } }
/** * Creates a new date picker. * * @param monthAndYearSelector the month selector * @param view the view * @param model the model */ protected DatePicker(MonthSelector monthAndYearSelector, CalendarView view, CalendarModel model) { this.model = model; this.monthAndYearSelector = monthAndYearSelector; monthAndYearSelector.setDatePicker(this); this.view = view; view.setDatePicker(this); view.setup(); monthAndYearSelector.setup(); this.setup(); setCurrentMonth(new Date()); addStyleToDates(css().dayIsToday(), new Date()); }
/** * Creates a new date picker. * * @param monthAndYearSelector the month selector * @param view the view * @param model the model */ protected DatePicker(MonthSelector monthAndYearSelector, CalendarView view, CalendarModel model) { this.model = model; this.monthAndYearSelector = monthAndYearSelector; monthAndYearSelector.setDatePicker(this); this.view = view; view.setDatePicker(this); view.setup(); monthAndYearSelector.setup(); this.setup(); setCurrentMonth(new Date()); addStyleToDates(css().dayIsToday(), new Date()); }
/** * Sets up the date picker. */ protected void setup() { /* * Use a table (VerticalPanel) to get shrink-to-fit behavior. Divs expand to * fill the available width, so we'd need to give it a size. */ VerticalPanel panel = new VerticalPanel(); initWidget(panel); setStyleName(panel.getElement(), css.datePicker()); setStyleName(css().datePicker()); panel.add(this.getMonthSelector()); panel.add(this.getView()); }
/** * Sets up the date picker. */ protected void setup() { /* * Use a table (VerticalPanel) to get shrink-to-fit behavior. Divs expand to * fill the available width, so we'd need to give it a size. */ VerticalPanel panel = new VerticalPanel(); initWidget(panel); setStyleName(panel.getElement(), css.datePicker()); setStyleName(css().datePicker()); panel.add(this.getMonthSelector()); panel.add(this.getView()); }