/[classpath]/classpath/javax/swing/SizeRequirements.java
ViewVC logotype

Diff of /classpath/javax/swing/SizeRequirements.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by rabbit78, Thu Sep 29 22:08:42 2005 UTC revision 1.18 by rabbit78, Tue Oct 4 14:50:31 2005 UTC
# Line 340  public class SizeRequirements implements Line 340  public class SizeRequirements implements
340      // Sum up (maxSize - prefSize) over all children      // Sum up (maxSize - prefSize) over all children
341      int sumDelta = 0;      int sumDelta = 0;
342      for (int i = 0; i < children.length; i++)      for (int i = 0; i < children.length; i++)
343        sumDelta += children[i].maximum - children[i].preferred;        {
344            sumDelta += children[i].maximum - children[i].preferred;
345            if (sumDelta < 0)
346              sumDelta = Integer.MAX_VALUE;
347          }
348    
349      // If we have sumDelta == 0, then all components have prefSize == maxSize      // If we have sumDelta == 0, then all components have prefSize == maxSize
350      // and we can't do anything about it.      // and we can't do anything about it.

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26