gridbaglayout.html
来自「API資料大全」· HTML 代码 · 共 1,184 行 · 第 1/4 页
HTML
1,184 行
<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#clone()">clone</A>, <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#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> <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="MAXGRIDSIZE"><!-- --></A><H3>MAXGRIDSIZE</H3><PRE>protected static final int <B>MAXGRIDSIZE</B></PRE><DL><DD>The maximum number of grid positions (both horizontally and vertically) that can be laid out by the grid bag layout.</DL><HR><A NAME="MINSIZE"><!-- --></A><H3>MINSIZE</H3><PRE>protected static final int <B>MINSIZE</B></PRE><DL><DD>The smallest grid that can be laid out by the grid bag layout.</DL><HR><A NAME="PREFERREDSIZE"><!-- --></A><H3>PREFERREDSIZE</H3><PRE>protected static final int <B>PREFERREDSIZE</B></PRE><DL></DL><HR><A NAME="comptable"><!-- --></A><H3>comptable</H3><PRE>protected <A HREF="../../java/util/Hashtable.html">Hashtable</A> <B>comptable</B></PRE><DL><DD>This hashtable maintains the association between a component and its gridbag constraints. The Keys in comptable are the components and the values are the instances of GridBagConstraints.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagConstraints.html"><CODE>GridBagConstraints</CODE></A></DL></DD></DL><HR><A NAME="defaultConstraints"><!-- --></A><H3>defaultConstraints</H3><PRE>protected <A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A> <B>defaultConstraints</B></PRE><DL><DD>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>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagLayout.html#getConstraints(java.awt.Component)"><CODE>getConstraints(Component)</CODE></A>, <A HREF="../../java/awt/GridBagLayout.html#setConstraints(java.awt.Component, java.awt.GridBagConstraints)"><CODE>setConstraints(Component, GridBagConstraints)</CODE></A>, <A HREF="../../java/awt/GridBagLayout.html#lookupConstraints(java.awt.Component)"><CODE>lookupConstraints(Component)</CODE></A></DL></DD></DL><HR><A NAME="layoutInfo"><!-- --></A><H3>layoutInfo</H3><PRE>protected java.awt.GridBagLayoutInfo <B>layoutInfo</B></PRE><DL><DD>This field holds tha layout information for the gridbag. The information in this field is based on the most recent validation of the gridbag. If <code>layoutInfo</code> is <code>null</code> this indicates that there are no components in the gridbag or if there are components, they have not yet been validated.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagLayout.html#GetLayoutInfo(java.awt.Container, int)"><CODE>GetLayoutInfo(Container, int)</CODE></A></DL></DD></DL><HR><A NAME="columnWidths"><!-- --></A><H3>columnWidths</H3><PRE>public int[] <B>columnWidths</B></PRE><DL><DD>This field holds the overrides to the column minimum width. If this field is non-null the values are applied to the gridbag after all of the minimum columns widths have been calculated. If columnWidths has more elements than the number of columns, columns are added to the gridbag to match the number of elements in columnWidth.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagLayout.html#getLayoutDimensions()"><CODE>getLayoutDimensions()</CODE></A></DL></DD></DL><HR><A NAME="rowHeights"><!-- --></A><H3>rowHeights</H3><PRE>public int[] <B>rowHeights</B></PRE><DL><DD>This field holds the overrides to the row minimum heights. If this field is non-null the values are applied to the gridbag after all of the minimum row heights have been calculated. If rowHeights has more elements than the number of rows, rowa are added to the gridbag to match the number of elements in rowHeights.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/GridBagLayout.html#getLayoutDimensions()"><CODE>getLayoutDimensions()</CODE></A></DL></DD></DL><HR><A NAME="columnWeights"><!-- --></A><H3>columnWeights</H3><PRE>public double[] <B>columnWeights</B></PRE><DL><DD>This field holds the overrides to the column weights. If this field is non-null the values are applied to the gridbag after all of the columns weights have been calculated. If columnWeights[i] > weight for column i, then column i is assigned the weight in columnWeights[i]. If columnWeights has more elements than the number of columns, the excess elements are ignored - they do not cause more columns to be created.</DL><HR><A NAME="rowWeights"><!-- --></A><H3>rowWeights</H3><PRE>public double[] <B>rowWeights</B></PRE><DL><DD>This field holds the overrides to the row weights. If this field is non-null the values are applied to the gridbag after all of the rows weights have been calculated. If rowWeights[i] > weight for row i, then row i is assigned the weight in rowWeights[i]. If rowWeights has more elements than the number of rows, the excess elements are ignored - they do not cause more rows to be created.</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="GridBagLayout()"><!-- --></A><H3>GridBagLayout</H3><PRE>public <B>GridBagLayout</B>()</PRE><DL><DD>Creates a grid bag layout manager.</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="setConstraints(java.awt.Component, java.awt.GridBagConstraints)"><!-- --></A><H3>setConstraints</H3><PRE>public void <B>setConstraints</B>(<A HREF="../../java/awt/Component.html">Component</A> comp, <A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A> constraints)</PRE><DL><DD>Sets the constraints for the specified component in this layout.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to be modified.<DD><CODE>constraints</CODE> - the constraints to be applied.</DL></DD></DL><HR><A NAME="getConstraints(java.awt.Component)"><!-- --></A><H3>getConstraints</H3><PRE>public <A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A> <B>getConstraints</B>(<A HREF="../../java/awt/Component.html">Component</A> comp)</PRE><DL><DD>Gets the constraints for the specified component. A copy of the actual <code>GridBagConstraints</code> object is returned.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to be queried.<DT><B>Returns:</B><DD>the constraint for the specified component in this grid bag layout; a copy of the actual constraint object is returned.</DL></DD></DL><HR><A NAME="lookupConstraints(java.awt.Component)"><!-- --></A><H3>lookupConstraints</H3><PRE>protected <A HREF="../../java/awt/GridBagConstraints.html">GridBagConstraints</A> <B>lookupConstraints</B>(<A HREF="../../java/awt/Component.html">Component</A> comp)</PRE><DL><DD>Retrieves the constraints for the specified component. The return value is not a copy, but is the actual <code>GridBagConstraints</code> object used by the layout mechanism.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to be queried<DT><B>Returns:</B><DD>the contraints for the specified component.</DL></DD></DL><HR><A NAME="getLayoutOrigin()"><!-- --></A><H3>getLayoutOrigin</H3><PRE>public <A HREF="../../java/awt/Point.html">Point</A> <B>getLayoutOrigin</B>()</PRE><DL><DD>Determines the origin of the layout grid. Most applications do not call this method directly.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the origin of the cell in the top-left corner of the layout grid.<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="getLayoutDimensions()"><!-- --></A><H3>getLayoutDimensions</H3><PRE>public int[][] <B>getLayoutDimensions</B>()</PRE><DL><DD>Determines column widths and row heights for the layout grid. <p> Most applications do not call this method directly.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of two arrays, containing the widths of the layout columns and the heights of the layout rows.<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="getLayoutWeights()"><!-- --></A><H3>getLayoutWeights</H3><PRE>public double[][] <B>getLayoutWeights</B>()</PRE><DL><DD>Determines the weights of the layout grid's columns and rows. Weights are used to calculate how much a given column or row stretches beyond its preferred size, if the layout has extra room to fill. <p> Most applications do not call this method directly.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of two arrays, representing the horizontal weights of the layout columns and the vertical weights of the layout rows.<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="location(int, int)"><!-- --></A><H3>location</H3><PRE>public <A HREF="../../java/awt/Point.html">Point</A> <B>location</B>(int x, int y)</PRE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?