@Test public void events() { DatePM model = new DatePM(); MyPropertyChangeListener l = new MyPropertyChangeListener(); model.addPropertyChangeListener(l); model.setText("14.01.1971"); assertEquals("model.isValid()", true, model.isValid()); assertEquals("l.eventCount", 2, l.eventCount); model.setText("31.02"); assertEquals("model.isValid()", false, model.isValid()); assertEquals("l.eventCount", 4, l.eventCount); model.setDate(new Date()); assertEquals("l.eventCount", 6, l.eventCount); }
public void setDate(Date date) { if (date == null) { setText(null); } else { String str = format.format(date); setText(str); } }
DatePM extends TextPM implements IDatePM { public void setDate(Date date) { if (date == null) { setText(null); } else { String str = format.format(date); setText(str); } } }
DatePM extends TextPM implements IDatePM { public void setDate(Date date) { if (date == null) { setText(null); } else { String str = format.format(date); setText(str); } } DatePM(); }
DatePM extends TextPM implements IDatePM { public void setDate(Date date) { if (date == null) { setText(null); } else { String str = format.format(date); setText(str); } } DatePM(); static synchronized DateFormatProvider getDefaultDateFormatProvider(); static synchronized void setDefaultDateFormatProvider(DateFormatProvider provider); DateFormat getFormat(); void setFormat(DateFormat newFormat); Date getDate(); void setDate(Date date); void setDefaultDate(Date date); @Override Comparable<?> getComparable(); }
DatePM extends TextPM implements IDatePM { public void setDate(Date date) { if (date == null) { setText(null); } else { String str = format.format(date); setText(str); } } DatePM(); static synchronized DateFormatProvider getDefaultDateFormatProvider(); static synchronized void setDefaultDateFormatProvider(DateFormatProvider provider); DateFormat getFormat(); void setFormat(DateFormat newFormat); Date getDate(); void setDate(Date date); void setDefaultDate(Date date); @Override Comparable<?> getComparable();  }