@Test public void setText() { TextPM pModel = new TextPM(); Counter l = new Counter(); pModel.addPropertyChangeListener(l); pModel.setText("hello, world!"); assertEquals("l.eventCount", 2, l.eventCount); pModel.setText("hello, moon!"); assertEquals("l.eventCount", 3, l.eventCount); pModel.setText("hello, moon!"); assertEquals("l.eventCount", 3, l.eventCount); }
public void setText(String aText) { if (aText == null) { aText = ""; } if (equals(text, aText)) { return; } String old = text; text = aText; revalidate(); updateModified(); getPropertyChangeSupport().firePropertyChange("text", old, text); }
TextPM extends AbstractValuePM implements ITextPM { public void setText(String aText) { if (aText == null) { aText = ""; } if (equals(text, aText)) { return; } String old = text; text = aText; revalidate(); updateModified(); getPropertyChangeSupport().firePropertyChange("text", old, text); } }
TextPM extends AbstractValuePM implements ITextPM { public void setText(String aText) { if (aText == null) { aText = ""; } if (equals(text, aText)) { return; } String old = text; text = aText; revalidate(); updateModified(); getPropertyChangeSupport().firePropertyChange("text", old, text); } TextPM(String initialText);  TextPM(); }
TextPM extends AbstractValuePM implements ITextPM { public void setText(String aText) { if (aText == null) { aText = ""; } if (equals(text, aText)) { return; } String old = text; text = aText; revalidate(); updateModified(); getPropertyChangeSupport().firePropertyChange("text", old, text); } TextPM(String initialText);  TextPM(); String getText(); String getText(boolean convertWhitespaceStringToNull); void setText(String aText); boolean isRestrictedToOptions(); void setRestrictedToOptions(boolean restrictedToOptions); boolean isEmpty(); boolean isModified(); void reset(); void preset(); void reformat(); Options getOptions(); void setOptions(Options newOptions); @Override Comparable<?> getComparable(); }
TextPM extends AbstractValuePM implements ITextPM { public void setText(String aText) { if (aText == null) { aText = ""; } if (equals(text, aText)) { return; } String old = text; text = aText; revalidate(); updateModified(); getPropertyChangeSupport().firePropertyChange("text", old, text); } TextPM(String initialText);  TextPM(); String getText(); String getText(boolean convertWhitespaceStringToNull); void setText(String aText); boolean isRestrictedToOptions(); void setRestrictedToOptions(boolean restrictedToOptions); boolean isEmpty(); boolean isModified(); void reset(); void preset(); void reformat(); Options getOptions(); void setOptions(Options newOptions); @Override Comparable<?> getComparable();  }