<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jun 29 05:57:41 GMT+01:00 1999 -->
<TITLE>
Swing 1.1 API Specification: Class  SizeRequirements
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/SizeRequirements.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/ScrollPaneLayout.UIResource.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/SwingUtilities.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SizeRequirements.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.swing</FONT>
<BR>
Class  SizeRequirements</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.swing.SizeRequirements</B>
</PRE>
<HR>
<DL>
<DT>public class <B>SizeRequirements</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>

<P>
For the convenience of layout managers,
 calculates information about the size and position of components.
 All size and position calculation methods are class methods
 that take arrays of SizeRequirements as arguments.
 The SizeRequirements class supports two types of layout:

 <blockquote>
 <dl>
 <dt> tiled
 <dd> The components are placed end-to-end,
      starting at coordinate 0
      (the leftmost or topmost position).

 <dt> aligned
 <dd> The components are aligned as specified
      by each component's X or Y alignment value.
 </dl>
 </blockquote>

 <p>

 Each SizeRequirements object contains information
 about either the width (and X alignment)
 or height (and Y alignment)
 of a single component or a group of components:

 <blockquote>
 <dl>
 <dt> <code>minimum</code>
 <dd> The smallest reasonable width/height of the component
      or component group, in pixels.

 <dt> <code>preferred</code>
 <dd> The natural width/height of the component
      or component group, in pixels.

 <dt> <code>maximum</code>
 <dd> The largest reasonable width/height of the component
      or component group, in pixels.

 <dt> <code>alignment</code>
 <dd> The X/Y alignment of the component
      or component group.
 </dl>
 </blockquote>
 <p>
 <strong>Warning:</strong>
 Serialized objects of this class will not be compatible with
 future Swing releases.  The current serialization support is appropriate
 for short term storage or RMI between applications running the same
 version of Swing.  A future release of Swing will provide support for
 long term persistence.
<P>
<DL>
<DT><B>See Also: </B><DD><CODE>Component.getMinimumSize()</CODE>, 
<CODE>Component.getPreferredSize()</CODE>, 
<CODE>Component.getMaximumSize()</CODE>, 
<CODE>Component.getAlignmentX()</CODE>, 
<CODE>Component.getAlignmentY()</CODE>, <A HREF="../../serialized-form.html#javax.swing.SizeRequirements">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#alignment">alignment</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The alignment, specified as a value between 0.0 and 1.0,
 inclusive.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#maximum">maximum</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum size allowed.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#minimum">minimum</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The minimum size required.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#preferred">preferred</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The preferred (natural) size.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#SizeRequirements()">SizeRequirements</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a SizeRequirements object with the minimum, preferred,
 and maximum sizes set to zero and an alignment value of 0.5
 (centered).</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#SizeRequirements(int, int, int, float)">SizeRequirements</A></B>(int&nbsp;min,
                 int&nbsp;pref,
                 int&nbsp;max,
                 float&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a SizeRequirements object with the specified minimum, preferred,
 and maximum sizes and the specified alignment.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#adjustSizes(int, javax.swing.SizeRequirements[])">adjustSizes</A></B>(int&nbsp;delta,
            <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adjust a specified array of sizes by a given amount.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#calculateAlignedPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements[], int[], int[])">calculateAlignedPositions</A></B>(int&nbsp;allocated,
                          <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>&nbsp;total,
                          <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children,
                          int[]&nbsp;offsets,
                          int[]&nbsp;spans)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a bunch of offset/span pairs specifying how to
 lay out a set of components with the specified alignments.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#calculateTiledPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements[], int[], int[])">calculateTiledPositions</A></B>(int&nbsp;allocated,
                        <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>&nbsp;total,
                        <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children,
                        int[]&nbsp;offsets,
                        int[]&nbsp;spans)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a bunch of offset/span pairs representing how to
 lay out a set of components end-to-end.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#getAlignedSizeRequirements(javax.swing.SizeRequirements[])">getAlignedSizeRequirements</A></B>(<A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the total space necessary to
 align a set of components.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#getTiledSizeRequirements(javax.swing.SizeRequirements[])">getTiledSizeRequirements</A></B>(<A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the total space necessary to
 place a set of components end-to-end.</TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/swing/SizeRequirements.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string describing the minimum, preferred, and maximum
 size requirements, along with the alignment.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" ID="TableRowColor">
<TD><CODE>clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="minimum"><!-- --></A><H3>
minimum</H3>
<PRE>
public int <B>minimum</B></PRE>
<DL>
<DD>The minimum size required.
 For a component <code>comp</code>, this should be equal to either
 <code>comp.getMinimumSize().width</code> or
 <code>comp.getMinimumSize().height</code>.</DL>
<HR>

<A NAME="preferred"><!-- --></A><H3>
preferred</H3>
<PRE>
public int <B>preferred</B></PRE>
<DL>
<DD>The preferred (natural) size.
 For a component <code>comp</code>, this should be equal to either
 <code>comp.getPreferredSize().width</code> or
 <code>comp.getPreferredSize().height</code>.</DL>
<HR>

<A NAME="maximum"><!-- --></A><H3>
maximum</H3>
<PRE>
public int <B>maximum</B></PRE>
<DL>
<DD>The maximum size allowed.
 For a component <code>comp</code>, this should be equal to either
 <code>comp.getMaximumSize().width</code> or
 <code>comp.getMaximumSize().height</code>.</DL>
<HR>

<A NAME="alignment"><!-- --></A><H3>
alignment</H3>
<PRE>
public float <B>alignment</B></PRE>
<DL>
<DD>The alignment, specified as a value between 0.0 and 1.0,
 inclusive.
 To specify centering, the alignment should be 0.5.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="SizeRequirements()"><!-- --></A><H3>
SizeRequirements</H3>
<PRE>
public <B>SizeRequirements</B>()</PRE>
<DL>
<DD>Creates a SizeRequirements object with the minimum, preferred,
 and maximum sizes set to zero and an alignment value of 0.5
 (centered).</DL>
<HR>

<A NAME="SizeRequirements(int, int, int, float)"><!-- --></A><H3>
SizeRequirements</H3>
<PRE>
public <B>SizeRequirements</B>(int&nbsp;min,
                        int&nbsp;pref,
                        int&nbsp;max,
                        float&nbsp;a)</PRE>
<DL>
<DD>Creates a SizeRequirements object with the specified minimum, preferred,
 and maximum sizes and the specified alignment.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>min</CODE> - the minimum size >= 0<DD><CODE>pref</CODE> - the preferred size >= 0<DD><CODE>max</CODE> - the maximum size >= 0<DD><CODE>a</CODE> - the alignment >= 0.0f && <= 1.0f</DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a string describing the minimum, preferred, and maximum
 size requirements, along with the alignment.<DD><DL>
<DT><B>Returns:</B><DD>the string<DT><B>Overrides:</B><DD>toString in class java.lang.Object</DL>
</DD>
</DL>
<HR>

<A NAME="getTiledSizeRequirements(javax.swing.SizeRequirements[])"><!-- --></A><H3>
getTiledSizeRequirements</H3>
<PRE>
public static <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A> <B>getTiledSizeRequirements</B>(<A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children)</PRE>
<DL>
<DD>Determines the total space necessary to
 place a set of components end-to-end.  The needs
 of each component in the set are represented by an entry in the
 passed-in SizeRequirements array.
 The returned SizeRequirements object has an alignment of 0.5
 (centered).  The space requirement is never more than
 Integer.MAX_VALUE.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>children</CODE> - the space requirements for a set of components.
   The vector may be of zero length, which will result in a
   default SizeRequirements object instance being passed back.<DT><B>Returns:</B><DD>the total space requirements.</DL>
</DD>
</DL>
<HR>

<A NAME="getAlignedSizeRequirements(javax.swing.SizeRequirements[])"><!-- --></A><H3>
getAlignedSizeRequirements</H3>
<PRE>
public static <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A> <B>getAlignedSizeRequirements</B>(<A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children)</PRE>
<DL>
<DD>Determines the total space necessary to
 align a set of components.  The needs
 of each component in the set are represented by an entry in the
 passed-in SizeRequirements array.  The total space required will
 never be more than Integer.MAX_VALUE.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>children</CODE> - the set of child requirements.  If of zero length,
  the returns result will be a default instance of SizeRequirements.<DT><B>Returns:</B><DD>the total space requirements.</DL>
</DD>
</DL>
<HR>

<A NAME="calculateTiledPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements[], int[], int[])"><!-- --></A><H3>
calculateTiledPositions</H3>
<PRE>
public static void <B>calculateTiledPositions</B>(int&nbsp;allocated,
                                           <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>&nbsp;total,
                                           <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children,
                                           int[]&nbsp;offsets,
                                           int[]&nbsp;spans)</PRE>
<DL>
<DD>Creates a bunch of offset/span pairs representing how to
 lay out a set of components end-to-end.
 This method requires that you specify
 the total amount of space to be allocated,
 the size requirements for each component to be placed
 (specified as an array of SizeRequirements), and
 the total size requirement of the set of components.
 You can get the total size requirement
 by invoking the getTiledSizeRequirements method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>allocated</CODE> - the total span to be allocated >= 0.<DD><CODE>total</CODE> - the total of the children requests.  This argument
  is optional and may be null.<DD><CODE>children</CODE> - the size requirements for each component.<DD><CODE>offsets</CODE> - the offset from 0 for each child where
   the spans were allocated (determines placement of the span).<DD><CODE>spans</CODE> - the span allocated for each child to make the
   total target span.</DL>
</DD>
</DL>
<HR>

<A NAME="calculateAlignedPositions(int, javax.swing.SizeRequirements, javax.swing.SizeRequirements[], int[], int[])"><!-- --></A><H3>
calculateAlignedPositions</H3>
<PRE>
public static void <B>calculateAlignedPositions</B>(int&nbsp;allocated,
                                             <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>&nbsp;total,
                                             <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children,
                                             int[]&nbsp;offsets,
                                             int[]&nbsp;spans)</PRE>
<DL>
<DD>Creates a bunch of offset/span pairs specifying how to
 lay out a set of components with the specified alignments.
 The resulting span allocations will overlap, with each one
 fitting as well as possible into the given total allocation.
 This method requires that you specify
 the total amount of space to be allocated,
 the size requirements for each component to be placed
 (specified as an array of SizeRequirements), and
 the total size requirements of the set of components
 (only the alignment field of which is actually used).
 You can get the total size requirement by invoking
 getAlignedSizeRequirements.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>allocated</CODE> - the total span to be allocated >= 0.<DD><CODE>total</CODE> - the total of the children requests.<DD><CODE>children</CODE> - the size requirements for each component.<DD><CODE>offsets</CODE> - the offset from 0 for each child where
   the spans were allocated (determines placement of the span).<DD><CODE>spans</CODE> - the span allocated for each child to make the
   total target span.</DL>
</DD>
</DL>
<HR>

<A NAME="adjustSizes(int, javax.swing.SizeRequirements[])"><!-- --></A><H3>
adjustSizes</H3>
<PRE>
public static int[] <B>adjustSizes</B>(int&nbsp;delta,
                                <A HREF="../../javax/swing/SizeRequirements.html">SizeRequirements</A>[]&nbsp;children)</PRE>
<DL>
<DD>Adjust a specified array of sizes by a given amount.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>delta</CODE> - an int specifying the size difference<DD><CODE>children</CODE> - an array of SizeRequirements objects<DT><B>Returns:</B><DD>an array of ints containing the final size for each item</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> &nbsp;<FONT ID="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="class-use/SizeRequirements.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" ID="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Swing 1.1</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/swing/ScrollPaneLayout.UIResource.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/swing/SwingUtilities.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SizeRequirements.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.<br>Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
