}
});
dateField3.setImmediate(true);
getLayout().addComponent(dateField3);
final InlineDateField dateField2 = new InlineDateField();
dateField2.setValue(new java.util.Date());
dateField2.setResolution(PopupDateField.RESOLUTION_MONTH);
dateField2.addListener(new PopupDateField.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
getMainWindow().showNotification(
"Date now" + event.getProperty());
}
});
dateField2.setImmediate(true);
getLayout().addComponent(dateField2);
CheckBox immediate = new CheckBox(
"Immediate (use sync button to change fields) ");
immediate.setValue(true);
immediate.addListener(new CheckBox.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
boolean immediate = !dateField.isImmediate();
dateField.setImmediate(immediate);
dateField2.setImmediate(immediate);
dateField3.setImmediate(immediate);
}
});
getLayout().addComponent(immediate);