Beispiel #1
0
  public DateMenu() {
    picker = new DatePicker();
    picker.addValueChangeHandler(
        new ValueChangeHandler<Date>() {

          @Override
          public void onValueChange(ValueChangeEvent<Date> event) {
            onPickerSelect(event);
          }
        });

    add(picker);
    getAppearance().applyDateMenu(getElement());
    plain = true;
    showSeparator = false;
    setEnableScrolling(false);
  }
Beispiel #2
0
 /**
  * Sets the menu's date.
  *
  * @param date the date
  */
 public void setDate(Date date) {
   picker.setValue(date);
 }
Beispiel #3
0
 /**
  * Returns the selected date.
  *
  * @return the date
  */
 public Date getDate() {
   return picker.getValue();
 }
Beispiel #4
0
 @Override
 public void focus() {
   super.focus();
   picker.getElement().focus();
 }