JDK-4138001 : BasicComboBoxUI prevents incremental download of large lists...
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1998-05-13
  • Updated: 2001-11-13
  • Resolved: 2001-11-13
Related Reports
Duplicate :  
Description

Name: rk38400			Date: 05/13/98


Several methods implemented BasicComboBoxUI determine
size information for the combo box by iterating through
all elements in the combo-box.  This prohibits 
dynamic loading of large lists of items to a client 
PC.

Specifically, the methods are:

protected Dimension getMaxPreferredSize() 
protected Dimension getMaxMinimumSize() 
protected Dimension getMaxMaximumSize() 

In addition, there is no way to specifiy fixed 
height and width to the JList portion of the 
combo-box.  Without this, the JList determines 
the layout for itself by going through each item.
(Review ID: 30255)
======================================================================

Comments
EVALUATION This issue was addressed for J2SE v 1.4 in RFE 4289100
11-06-2004

WORK AROUND Name: rk38400 Date: 05/13/98 I can subclass any implementation derived from BasicComboBoxUI and override the three methods listed with getDefaultSize(), and eliminate the problem with them. An override to the createListbox method in ComboBoxUI allows an opportunity to enforce fixed height and width in the JList. With these two changes, you can get the combo box to work with large numbers of items without downloading all of them simply for the horizontal scrollbar. ======================================================================
11-06-2004