예제 #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);
  }
예제 #2
0
 /**
  * Sets the menu's date.
  *
  * @param date the date
  */
 public void setDate(Date date) {
   picker.setValue(date);
 }
예제 #3
0
 /**
  * Returns the selected date.
  *
  * @return the date
  */
 public Date getDate() {
   return picker.getValue();
 }
예제 #4
0
 @Override
 public void focus() {
   super.focus();
   picker.getElement().focus();
 }