com.google.gwt.user.datepicker.client.DatePicker.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中com.google.gwt.user.datepicker.client.DatePicker.getValue()方法的一些代码示例,展示了DatePicker.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DatePicker.getValue()方法的具体详情如下:
包路径:com.google.gwt.user.datepicker.client.DatePicker
类名称:DatePicker
方法名:getValue

DatePicker.getValue介绍

[英]Returns the selected date, or null if none is selected.
[中]返回所选日期,如果未选择任何日期,则返回null。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

public void setValue(Date date, boolean fireEvents) {
 setValue(picker.getValue(), date, fireEvents, true);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

private void updateDateFromTextBox() {
  Date parsedDate = parseDate(true);
  if (fireNullValues || (parsedDate != null)) {
   setValue(picker.getValue(), parsedDate, true, false);
  }
 }
}

代码示例来源:origin: org.kuali.student.core/ks-common-ui

public void onKeyDown(KeyDownEvent event) {
  if(event.getNativeKeyCode() == KeyCodes.KEY_TAB){
    popup.hide();
    if(picker.getValue() != null){
      selectedDate = picker.getValue();
    }
  }
}

代码示例来源:origin: net.wetheinter/gwt-user

public void setValue(Date date, boolean fireEvents) {
 setValue(picker.getValue(), date, fireEvents, true);
}

代码示例来源:origin: org.kie.guvnor/guvnor-commons-ui

public void onClose( CloseEvent<PopupPanel> event ) {
    setValue( datePicker.getValue() );
  }
} );

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

public void setValue(Date date, boolean fireEvents) {
 setValue(picker.getValue(), date, fireEvents, true);
}

代码示例来源:origin: org.kuali.student.core/ks-common-ui

public void onValueChange(ValueChangeEvent<Date> event) {
    if(picker.getValue() != null){
      dateField.setText(df.format(picker.getValue()));
      selectedDate = picker.getValue();
    }
    dateField.setFocus(true);
    popup.hide();
    justPicked = true;
    focus.setSuppressed(false);
    fireValueChangeEvent();
  }
});

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

private void updateDateFromTextBox() {
  Date parsedDate = parseDate(true);
  if (fireNullValues || (parsedDate != null)) {
   setValue(picker.getValue(), parsedDate, true, false);
  }
 }
}

代码示例来源:origin: net.wetheinter/gwt-user

private void updateDateFromTextBox() {
  Date parsedDate = parseDate(true);
  if (fireNullValues || (parsedDate != null)) {
   setValue(picker.getValue(), parsedDate, true, false);
  }
 }
}

代码示例来源:origin: de.esoco/gewt

/***************************************
 * Returns the currently selected date value of this component.
 *
 * @return The current date value (will be NULL if edit field is empty)
 */
@Override
public Date getDate()
{
  Date rDate = null;
  if (getDateWidget().getTextBox().getText().length() > 0)
  {
    rDate = getDateWidget().getDatePicker().getValue();
  }
  return rDate;
}

代码示例来源:origin: sk.seges.acris/acris-widgets-beantable

public void onClick(ClickEvent sender) {
  for (int i = 0; i < supportedOperators.length; i++) {
   if (operator == supportedOperators[i]) {
    if (i < supportedOperators.length - 1) {
     operator = supportedOperators[i + 1];
    } else {
     operator = supportedOperators[0];
    }
    break;
   }
  }
  if (operator == Operator.BETWEEN) {
   secondaryDateBox.setVisible(true);
   horizontalPanel.setCellWidth(primaryDateBox, "50%");
   horizontalPanel.setCellWidth(secondaryDateBox, "50%");
  } else {
   horizontalPanel.setCellWidth(primaryDateBox, "100%");
   secondaryDateBox.setVisible(false);
  }
  setButtonText(((PushButton) operatorButton), operator);
  Date primaryDate = primaryDateBox.getDatePicker().getValue();
  Date secondaryDate = secondaryDateBox.getDatePicker().getValue();
  fireColumnFilterChangedEvent(primaryDate, secondaryDate);
 }
};

代码示例来源:origin: org.kuali.student.core/ks-common-ui

public void onKeyUp(KeyUpEvent event) {
  String dateText = dateField.getText();
  if(!isDeleteOrBackspaceKey(event.getNativeKeyCode())){
    if(dateText.length() == 2){
      dateField.setText(dateText + "/");
      String current = df.format(currentDate);
      Date newDate = df.parse(dateField.getText()+ "01" + current.substring(5));
      picker.setCurrentMonth(newDate);
    }
    else if(dateText.length() == 5){
      dateField.setText(dateText + "/");
      String current = df.format(currentDate);
      Date newDate = df.parse(dateField.getText() + current.substring(6));
      dateField.setText(df.format(newDate).substring(0, 6));
      picker.setCurrentMonth(newDate);
      picker.setValue(newDate, false);
    }
    else if(dateText.length() == 10){
      Date newDate = df.parse(dateField.getText());
      picker.setCurrentMonth(newDate);
      picker.setValue(newDate, false);
      selectedDate = picker.getValue();
    }
  }
}

代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl

@Override
public void onClick(ClickEvent event) {
  if (event.getSource() == okButton) {
    Date value = calendarWidget.getValue();
    if (resolution == Resolution.MONTH) {
      value = calendarWidget.getCurrentMonth();
    } else if (resolution == Resolution.TIME) {
      value = trySetTimeFromTimeBoxText(value);
    }
    ValueChangeEvent.fire(CalendarOverlay.this, value);
    this.hide();
  } else if (event.getSource() == cancelButton) {
    this.hide(false);
  }
}

相关文章