gridbagconstraints.html

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

HTML
877
字号
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resize the component vertically but not horizontally.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagConstraints.html#weightx">weightx</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies how to distribute extra horizontal space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagConstraints.html#weighty">weighty</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies how to distribute extra vertical space.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagConstraints.html#WEST">WEST</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put the component on the left side of its display area,  centered vertically.</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../java/awt/GridBagConstraints.html#GridBagConstraints()">GridBagConstraints</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>GridBagConstraint</code> object with  all of its fields set to their default value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../java/awt/GridBagConstraints.html#GridBagConstraints(int, int, int, int, double, double, int, int, java.awt.Insets, int, int)">GridBagConstraints</A></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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <code>GridBagConstraints</code> object with all of its fields set to the passed-in arguments.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagConstraints.html#clone()">clone</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a copy of this grid bag constraint.</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" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></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" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="RELATIVE"><!-- --></A><H3>RELATIVE</H3><PRE>public static final int <B>RELATIVE</B></PRE><DL><DD>Specify that this component is the next-to-last component in its  column or row (<code>gridwidth</code>, <code>gridheight</code>),  or that this component be placed next to the previously added  component (<code>gridx</code>, <code>gridy</code>).<DD><DL><DT><B>See Also: </B><DD><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#gridx"><CODE>gridx</CODE></A>, <A HREF="../../java/awt/GridBagConstraints.html#gridy"><CODE>gridy</CODE></A></DL></DD></DL><HR><A NAME="REMAINDER"><!-- --></A><H3>REMAINDER</H3><PRE>public static final int <B>REMAINDER</B></PRE><DL><DD>Specify that this component is the  last component in its column or row.</DL><HR><A NAME="NONE"><!-- --></A><H3>NONE</H3><PRE>public static final int <B>NONE</B></PRE><DL><DD>Do not resize the component.</DL><HR><A NAME="BOTH"><!-- --></A><H3>BOTH</H3><PRE>public static final int <B>BOTH</B></PRE><DL><DD>Resize the component both horizontally and vertically.</DL><HR><A NAME="HORIZONTAL"><!-- --></A><H3>HORIZONTAL</H3><PRE>public static final int <B>HORIZONTAL</B></PRE><DL><DD>Resize the component horizontally but not vertically.</DL><HR><A NAME="VERTICAL"><!-- --></A><H3>VERTICAL</H3><PRE>public static final int <B>VERTICAL</B></PRE><DL><DD>Resize the component vertically but not horizontally.</DL><HR><A NAME="CENTER"><!-- --></A><H3>CENTER</H3><PRE>public static final int <B>CENTER</B></PRE><DL><DD>Put the component in the center of its display area.</DL><HR><A NAME="NORTH"><!-- --></A><H3>NORTH</H3><PRE>public static final int <B>NORTH</B></PRE><DL><DD>Put the component at the top of its display area, centered horizontally.</DL><HR><A NAME="NORTHEAST"><!-- --></A><H3>NORTHEAST</H3><PRE>public static final int <B>NORTHEAST</B></PRE><DL><DD>Put the component at the top-right corner of its display area.</DL><HR><A NAME="EAST"><!-- --></A><H3>EAST</H3><PRE>public static final int <B>EAST</B></PRE><DL><DD>Put the component on the right side of its display area,  centered vertically.</DL><HR><A NAME="SOUTHEAST"><!-- --></A><H3>SOUTHEAST</H3><PRE>public static final int <B>SOUTHEAST</B></PRE><DL><DD>Put the component at the bottom-right corner of its display area.</DL><HR><A NAME="SOUTH"><!-- --></A><H3>SOUTH</H3><PRE>public static final int <B>SOUTH</B></PRE><DL><DD>Put the component at the bottom of its display area, centered  horizontally.</DL><HR><A NAME="SOUTHWEST"><!-- --></A><H3>SOUTHWEST</H3><PRE>public static final int <B>SOUTHWEST</B></PRE><DL><DD>Put the component at the bottom-left corner of its display area.</DL><HR><A NAME="WEST"><!-- --></A><H3>WEST</H3><PRE>public static final int <B>WEST</B></PRE><DL><DD>Put the component on the left side of its display area,  centered vertically.</DL><HR><A NAME="NORTHWEST"><!-- --></A><H3>NORTHWEST</H3><PRE>public static final int <B>NORTHWEST</B></PRE><DL><DD>Put the component at the top-left corner of its display area.</DL><HR><A NAME="gridx"><!-- --></A><H3>gridx</H3><PRE>public int <B>gridx</B></PRE><DL><DD>Specifies the cell at the left of the component's display area,  where the leftmost cell has <code>gridx=0</code>. The value  <code>RELATIVE</code> specifies that the component be placed just  to the right of the component that was added to the container just  before this component was added.  <p> The default value is <code>RELATIVE</code>.  gridx 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#gridy"><CODE>gridy</CODE></A></DL></DD></DL><HR><A NAME="gridy"><!-- --></A><H3>gridy</H3><PRE>public int <B>gridy</B></PRE><DL><DD>Specifies the cell at the top of the component's display area,  where the topmost cell has <code>gridy=0</code>. The value  <code>RELATIVE</code> specifies that the component be placed just  below the component that was added to the container just before  this component was added.  <p> The default value is <code>RELATIVE</code>. gridy 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#gridx"><CODE>gridx</CODE></A></DL></DD></DL><HR><A NAME="gridwidth"><!-- --></A><H3>gridwidth</H3><PRE>public int <B>gridwidth</B></PRE><DL><DD>Specifies the number of cells in a row for the component's  display area.  <p> Use <code>REMAINDER</code> to specify that the component be the  last one in its row. Use <code>RELATIVE</code> to specify that the  component be the next-to-last one in its row.  <p> gridwidth should be non-negative 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#gridheight"><CODE>gridheight</CODE></A></DL></DD></DL><HR>

⌨️ 快捷键说明

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