/[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.10 by trebligd, Sat Jul 23 19:47:14 2005 UTC revision 1.11 by rabbit78, Tue Sep 13 10:23:50 2005 UTC
# Line 116  public class SizeRequirements implements Line 116  public class SizeRequirements implements
116     */     */
117    public String toString()    public String toString()
118    {    {
119      return null; // TODO      StringBuilder b = new StringBuilder();
120        b.append("<[");
121        b.append(minimum);
122        b.append(',');
123        b.append(preferred);
124        b.append(',');
125        b.append(maximum);
126        b.append("]@");
127        b.append(alignment);
128        b.append('>');
129        return b.toString();
130    }    }
131    
132    /**    /**
# Line 271  public class SizeRequirements implements Line 281  public class SizeRequirements implements
281                                                 SizeRequirements[] children,                                                 SizeRequirements[] children,
282                                                 int[] offsets, int[] spans)                                                 int[] offsets, int[] spans)
283    {    {
284      calculateTiledPositions(allocated, total, children, offsets, spans, true);      calculateAlignedPositions(allocated, total, children, offsets, spans,
285                                  true);
286    }    }
287    
288    /**    /**
# Line 306  public class SizeRequirements implements Line 317  public class SizeRequirements implements
317                                                 int[] offset, int[] spans,                                                 int[] offset, int[] spans,
318                                                 boolean forward)                                                 boolean forward)
319    {    {
320      // TODO      // TODO: Implement this correctly.
321        for (int i = 0; i < children.length; ++i)
322          {
323            // This is only a hack to make things work a little.
324            spans[i] = Math.min(allocated, children[i].maximum);
325          }
326    }    }
327    
328    /**    /**

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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