/** @param object */ @Override public void setDate(Date date) { if (date == null) { textControl.setText(""); // $NON-NLS-1$ } else { this.textControl.setText(fDateFormat.format(date)); } }
/** @return the date, or null if a valid date is not set in the control */ @Override public Date getDate() { String text = textControl.getText(); try { return fDateFormat.parse(text); } catch (IllegalArgumentException e) { return null; } }