lopezio / wosaic

Automatically exported from code.google.com/p/wosaic
GNU General Public License v2.0
2 stars 0 forks source link

Empty plugin lists resize incorrectly #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Launch the application and go to Advanced Options
2. Either enable or disable all of the plugins
3. Resize the Window a little so the panels repaint, and the empty list
will also resize

What is the expected output? What do you see instead?
Even when the lists are empty, they should remain the same size.  This
seems to be an issue with either the JList component, or the containing
JScrollPane, or the way it's laid-out on the screen altogether-- it's hard
to say.

Original issue reported on code.google.com by swegn...@gmail.com on 5 Mar 2008 at 12:08

GoogleCodeExporter commented 9 years ago
This has been fixed in revision 265.  The associated code is:

// Set the width of the scrollpanes to be the max preferred width of either
// This will depend on the longest source string in either of the lists.
Dimension disabledSize = 
DisabledSourcesList.getPreferredScrollableViewportSize();
Dimension enabledSize = EnabledSourcesList.getPreferredScrollableViewportSize();
Dimension maxSize = (disabledSize.width > enabledSize.width ? disabledSize :
enabledSize);
DisabledSourcesList.getParent().setPreferredSize(maxSize);
EnabledSourcesList.getParent().setPreferredSize(maxSize);

Original comment by swegn...@gmail.com on 5 Mar 2008 at 6:00