gridbagconstraints.html

来自「API資料大全」· HTML 代码 · 共 877 行 · 第 1/3 页

HTML
877
字号
<A NAME="gridheight"><!-- --></A><H3>gridheight</H3><PRE>public int <B>gridheight</B></PRE><DL><DD>Specifies the number of cells in a column for the component's  display area.  <p> Use <code>REMAINDER</code> to specify that the component be the  last one in its column. Use <code>RELATIVE</code> to specify that  the component be the next-to-last one in its column.  <p> gridheight should be a non-negative value and the default value is 1.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#gridwidth"><CODE>gridwidth</CODE></A></DL></DD></DL><HR><A NAME="weightx"><!-- --></A><H3>weightx</H3><PRE>public double <B>weightx</B></PRE><DL><DD>Specifies how to distribute extra horizontal space.  <p> The grid bag layout manager calculates the weight of a column to  be the maximum <code>weightx</code> of all the components in a  column. If the resulting layout is smaller horizontally than the area  it needs to fill, the extra space is distributed to each column in  proportion to its weight. A column that has a weight of zero receives  no extra space.  <p> If all the weights are zero, all the extra space appears between  the grids of the cell and the left and right edges.  <p> The default value of this field is <code>0</code>. weightx should be a non-negative value.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#weighty"><CODE>weighty</CODE></A></DL></DD></DL><HR><A NAME="weighty"><!-- --></A><H3>weighty</H3><PRE>public double <B>weighty</B></PRE><DL><DD>Specifies how to distribute extra vertical space.  <p> The grid bag layout manager calculates the weight of a row to be  the maximum <code>weighty</code> of all the components in a row.  If the resulting layout is smaller vertically than the area it  needs to fill, the extra space is distributed to each row in  proportion to its weight. A row that has a weight of zero receives no  extra space.  <p> If all the weights are zero, all the extra space appears between  the grids of the cell and the top and bottom edges.  <p> The default value of this field is <code>0</code>.  weighty should be a non-negative value.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#weightx"><CODE>weightx</CODE></A></DL></DD></DL><HR><A NAME="anchor"><!-- --></A><H3>anchor</H3><PRE>public int <B>anchor</B></PRE><DL><DD>This field is used when the component is smaller than its display  area. It determines where, within the display area, to place the  component. Possible values are <code>CENTER</code>,  <code>NORTH</code>, <code>NORTHEAST</code>, <code>EAST</code>,  <code>SOUTHEAST</code>, <code>SOUTH</code>, <code>SOUTHWEST</code>,  <code>WEST</code>, and <code>NORTHWEST</code>. The default value is <code>CENTER</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A></DL></DD></DL><HR><A NAME="fill"><!-- --></A><H3>fill</H3><PRE>public int <B>fill</B></PRE><DL><DD>This field is used when the component's display area is larger  than the component's requested size. It determines whether to  resize the component, and if so, how.  <p> The following values are valid for <code>fill</code>:  <p> <ul> <li> <code>NONE</code>: Do not resize the component.  <li> <code>HORIZONTAL</code>: Make the component wide enough to fill          its display area horizontally, but do not change its height.  <li> <code>VERTICAL</code>: Make the component tall enough to fill its          display area vertically, but do not change its width.  <li> <code>BOTH</code>: Make the component fill its display area          entirely.  </ul> <p> The default value is <code>NONE</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A></DL></DD></DL><HR><A NAME="insets"><!-- --></A><H3>insets</H3><PRE>public <A HREF="../../java/awt/Insets.html">Insets</A> <B>insets</B></PRE><DL><DD>This field specifies the external padding of the component, the  minimum amount of space between the component and the edges of its  display area.  <p> The default value is <code>new Insets(0, 0, 0, 0)</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A></DL></DD></DL><HR><A NAME="ipadx"><!-- --></A><H3>ipadx</H3><PRE>public int <B>ipadx</B></PRE><DL><DD>This field specifies the internal padding of the component, how much  space to add to the minimum width of the component. The width of  the component is at least its minimum width plus  <code>(ipadx&nbsp;*&nbsp;2)</code> pixels.  <p> The default value is <code>0</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#ipady"><CODE>ipady</CODE></A></DL></DD></DL><HR><A NAME="ipady"><!-- --></A><H3>ipady</H3><PRE>public int <B>ipady</B></PRE><DL><DD>This field specifies the internal padding, that is, how much  space to add to the minimum height of the component. The height of  the component is at least its minimum height plus  <code>(ipady&nbsp;*&nbsp;2)</code> pixels.  <p> The default value is 0.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#clone()"><CODE>clone()</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#ipadx"><CODE>ipadx</CODE></A></DL></DD></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="GridBagConstraints()"><!-- --></A><H3>GridBagConstraints</H3><PRE>public <B>GridBagConstraints</B>()</PRE><DL><DD>Creates a <code>GridBagConstraint</code> object with  all of its fields set to their default value.</DL><HR><A NAME="GridBagConstraints(int, int, int, int, double, double, int, int, java.awt.Insets, int, int)"><!-- --></A><H3>GridBagConstraints</H3><PRE>public <B>GridBagConstraints</B>(int&nbsp;gridx,                          int&nbsp;gridy,                          int&nbsp;gridwidth,                          int&nbsp;gridheight,                          double&nbsp;weightx,                          double&nbsp;weighty,                          int&nbsp;anchor,                          int&nbsp;fill,                          <A HREF="../../java/awt/Insets.html">Insets</A>&nbsp;insets,                          int&nbsp;ipadx,                          int&nbsp;ipady)</PRE><DL><DD>Creates a <code>GridBagConstraints</code> object with all of its fields set to the passed-in arguments.  Note: Because the use of this constructor hinders readability of source code, this constructor should only be used by automatic source code generation tools.<DD><DL><DT><B>Parameters:</B><DD><CODE>gridx</CODE> - The initial gridx value.<DD><CODE>gridy</CODE> - The initial gridy value.<DD><CODE>gridwidth</CODE> - The initial gridwidth value.<DD><CODE>gridheight</CODE> - The initial gridheight value.<DD><CODE>weightx</CODE> - The initial weightx value.<DD><CODE>weighty</CODE> - The initial weighty value.<DD><CODE>anchor</CODE> - The initial anchor value.<DD><CODE>fill</CODE> - The initial fill value.<DD><CODE>insets</CODE> - The initial insets value.<DD><CODE>ipadx</CODE> - The initial ipadx value.<DD><CODE>ipady</CODE> - The initial ipady value.<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html#gridx"><CODE>gridx</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#gridy"><CODE>gridy</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#gridwidth"><CODE>gridwidth</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#gridheight"><CODE>gridheight</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#weightx"><CODE>weightx</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#weighty"><CODE>weighty</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#anchor"><CODE>anchor</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#fill"><CODE>fill</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#insets"><CODE>insets</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#ipadx"><CODE>ipadx</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#ipady"><CODE>ipady</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>clone</B>()</PRE><DL><DD>Creates a copy of this grid bag constraint.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a copy of this grid bag constraint</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" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GridBagConstraints.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/awt/GraphicsEnvironment.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/awt/GridBagLayout.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="GridBagConstraints.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="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" CLASS="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>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?