Mark Wielaard wrote:

Hi,

On Sun, 2005-09-18 at 14:44 +0000, David Gilbert wrote:
  /* Size of the largest item in the comboBox
   * This is package-private to avoid an accessor method.
   */
-  Dimension largestItemSize;
+  Dimension displaySize;

Now that we have a protected (so package accessible) method to access
this wouldn't it be a good idea to make all other (inner) classes access
this through the protected method (which might be overridden)?

Cheers,

Mark
Good point. I'll revisit this when I come back to fix the JComboBox.getPrototypeDisplayValue() usage, which is a means to reduce the expense of calling the getDisplaySize() method (which recalculates the display size by iterating through all the items in the list). From reading the API spec, I have a suspicion that the getMinimumSize() and getDisplaySize() both make use of the cachedMinimumSize and isMinimumSizeDirty fields (both unused at present in Classpath). I haven't worked out how it all fits together yet, but I think I'm getting close...

Regards,

Dave


_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to