I committed this patch (and am about to put the corresponding tests into Mauve):
2005-09-13 David Gilbert <[EMAIL PROTECTED]> * javax/swing/JComboBox.java (getPrototypeDisplayValue): added API docs, (setPrototypeDisplayValue): fire property change event. Regards, Dave Gilbert
Index: javax/swing/JComboBox.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JComboBox.java,v retrieving revision 1.18 diff -u -r1.18 JComboBox.java --- javax/swing/JComboBox.java 27 Jul 2005 12:41:33 -0000 1.18 +++ javax/swing/JComboBox.java 13 Sep 2005 13:27:46 -0000 @@ -551,14 +551,37 @@ return -1; } + /** + * Returns an object that is used as the display value when calculating the + * preferred size for the combo box. This value is, of course, never + * displayed anywhere. + * + * @return The prototype display value (possibly <code>null</code>). + * + * @since 1.4 + * @see #setPrototypeDisplayValue(Object) + */ public Object getPrototypeDisplayValue() { return prototypeDisplayValue; } - public void setPrototypeDisplayValue(Object newPrototypeDisplayValue) + /** + * Sets the object that is assumed to be the displayed item when calculating + * the preferred size for the combo box. A [EMAIL PROTECTED] PropertyChangeEvent} (with + * the name <code>prototypeDisplayValue</code>) is sent to all registered + * listeners. + * + * @param value the new value (<code>null</code> permitted). + * + * @since 1.4 + * @see #getPrototypeDisplayValue() + */ + public void setPrototypeDisplayValue(Object value) { - prototypeDisplayValue = newPrototypeDisplayValue; + Object oldValue = prototypeDisplayValue; + prototypeDisplayValue = value; + firePropertyChange("prototypeDisplayValue", oldValue, value); } /**
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches