gridbaglayout.html

来自「API資料大全」· HTML 代码 · 共 1,184 行 · 第 1/4 页

HTML
1,184
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This field holds the overrides to the column minimum width.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../java/util/Hashtable.html">Hashtable</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#comptable">comptable</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This hashtable maintains the association between a component and its gridbag constraints.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#defaultConstraints">defaultConstraints</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This field holds a gridbag constraints instance containing the default values, so if a component does not have gridbag constraints associated with it, then the component will be assigned a copy of the <code>defaultConstraints</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.awt.GridBagLayoutInfo</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#layoutInfo">layoutInfo</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This field holds tha layout information for the gridbag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#MAXGRIDSIZE">MAXGRIDSIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum number of grid positions (both horizontally and vertically) that can be laid out by the grid bag layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#MINSIZE">MINSIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The smallest grid that can be laid out by the grid bag layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#PREFERREDSIZE">PREFERREDSIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#rowHeights">rowHeights</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This field holds the overrides to the row minimum heights.</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/GridBagLayout.html#rowWeights">rowWeights</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This field holds the overrides to the row weights.</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/GridBagLayout.html#GridBagLayout()">GridBagLayout</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a grid bag layout manager.</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;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#addLayoutComponent(java.awt.Component, java.lang.Object)">addLayoutComponent</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp,                   <A HREF="../../java/lang/Object.html">Object</A>&nbsp;constraints)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the specified component to the layout, using the specified constraint object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#addLayoutComponent(java.lang.String, java.awt.Component)">addLayoutComponent</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name,                   <A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the specified component with the specified name to the layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#AdjustForGravity(java.awt.GridBagConstraints, java.awt.Rectangle)">AdjustForGravity</A></B>(<A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A>&nbsp;constraints,                 <A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#ArrangeGrid(java.awt.Container)">ArrangeGrid</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#getConstraints(java.awt.Component)">getConstraints</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the constraints for the specified component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#getLayoutAlignmentX(java.awt.Container)">getLayoutAlignmentX</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the alignment along the x axis.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#getLayoutAlignmentY(java.awt.Container)">getLayoutAlignmentY</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the alignment along the y axis.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int[][]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#getLayoutDimensions()">getLayoutDimensions</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines column widths and row heights for the layout grid.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.awt.GridBagLayoutInfo</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#GetLayoutInfo(java.awt.Container, int)">GetLayoutInfo</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent,              int&nbsp;sizeflag)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the layout constraints.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Point.html">Point</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#getLayoutOrigin()">getLayoutOrigin</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the origin of the layout grid.</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/GridBagLayout.html#getLayoutWeights()">getLayoutWeights</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the weights of the layout grid's columns and rows.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#GetMinSize(java.awt.Container, java.awt.GridBagLayoutInfo)">GetMinSize</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent,           java.awt.GridBagLayoutInfo&nbsp;info)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#invalidateLayout(java.awt.Container)">invalidateLayout</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#layoutContainer(java.awt.Container)">layoutContainer</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lays out the specified container using this grid bag layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Point.html">Point</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#location(int, int)">location</A></B>(int&nbsp;x,         int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines which cell in the layout grid contains the point specified by <code>(x,&nbsp;y)</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#lookupConstraints(java.awt.Component)">lookupConstraints</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the constraints for the specified component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#maximumLayoutSize(java.awt.Container)">maximumLayoutSize</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum dimensions for this layout given the components in the specified target container.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#minimumLayoutSize(java.awt.Container)">minimumLayoutSize</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the minimum size of the <code>target</code> container using this grid bag layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#preferredLayoutSize(java.awt.Container)">preferredLayoutSize</A></B>(<A HREF="../../java/awt/Container.html">Container</A>&nbsp;parent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the preferred size of the <code>target</code> container using this grid bag layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#removeLayoutComponent(java.awt.Component)">removeLayoutComponent</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the specified component from this layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#setConstraints(java.awt.Component, java.awt.GridBagConstraints)">setConstraints</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp,               <A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A>&nbsp;constraints)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the constraints for the specified component in this layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/GridBagLayout.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string representation of this grid bag layout's values.</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">

⌨️ 快捷键说明

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