layoutmanager2.html
来自「API資料大全」· HTML 代码 · 共 299 行
HTML
299 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:32:13 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface LayoutManager2</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" CLASS="NavBarCell1"><A NAME="navbar_top_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LayoutManager2.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/awt/LayoutManager.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/MenuContainer.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> <A HREF="LayoutManager2.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt</FONT><BR>Interface LayoutManager2</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../java/awt/LayoutManager.html">LayoutManager</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../java/awt/CardLayout.html">CardLayout</A>, <A HREF="../../java/awt/BorderLayout.html">BorderLayout</A>, <A HREF="../../java/awt/GridBagLayout.html">GridBagLayout</A>, <A HREF="../../javax/swing/BoxLayout.html">BoxLayout</A>, <A HREF="../../javax/swing/OverlayLayout.html">OverlayLayout</A>, <A HREF="../../javax/swing/JRootPane.RootLayout.html">JRootPane.RootLayout</A>, <A HREF="../../javax/swing/plaf/basic/BasicSplitPaneUI.BasicHorizontalLayoutManager.html">BasicSplitPaneUI.BasicHorizontalLayoutManager</A></DD></DL><HR><DL><DT>public interface <B>LayoutManager2</B><DT>extends <A HREF="../../java/awt/LayoutManager.html">LayoutManager</A></DL><P>Defines an interface for classes that know how to layout Containers based on a layout constraints object. This interface extends the LayoutManager interface to deal with layouts explicitly in terms of constraint objects that specify how and where components should be added to the layout. <p> This minimal extension to LayoutManager is intended for tool providers who wish to the creation of constraint-based layouts. It does not yet provide full, general support for custom constraint-based layout managers.<P><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/LayoutManager.html"><CODE>LayoutManager</CODE></A>, <A HREF="../../java/awt/Container.html"><CODE>Container</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/LayoutManager2.html#addLayoutComponent(java.awt.Component, java.lang.Object)">addLayoutComponent</A></B>(<A HREF="../../java/awt/Component.html">Component</A> comp, <A HREF="../../java/lang/Object.html">Object</A> constraints)</CODE><BR> 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> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/LayoutManager2.html#getLayoutAlignmentX(java.awt.Container)">getLayoutAlignmentX</A></B>(<A HREF="../../java/awt/Container.html">Container</A> target)</CODE><BR> 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> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/LayoutManager2.html#getLayoutAlignmentY(java.awt.Container)">getLayoutAlignmentY</A></B>(<A HREF="../../java/awt/Container.html">Container</A> target)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/LayoutManager2.html#invalidateLayout(java.awt.Container)">invalidateLayout</A></B>(<A HREF="../../java/awt/Container.html">Container</A> target)</CODE><BR> 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> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/LayoutManager2.html#maximumLayoutSize(java.awt.Container)">maximumLayoutSize</A></B>(<A HREF="../../java/awt/Container.html">Container</A> target)</CODE><BR> Returns the maximum size of this component.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.LayoutManager"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.awt.<A HREF="../../java/awt/LayoutManager.html">LayoutManager</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/LayoutManager.html#addLayoutComponent(java.lang.String, java.awt.Component)">addLayoutComponent</A>, <A HREF="../../java/awt/LayoutManager.html#layoutContainer(java.awt.Container)">layoutContainer</A>, <A HREF="../../java/awt/LayoutManager.html#minimumLayoutSize(java.awt.Container)">minimumLayoutSize</A>, <A HREF="../../java/awt/LayoutManager.html#preferredLayoutSize(java.awt.Container)">preferredLayoutSize</A>, <A HREF="../../java/awt/LayoutManager.html#removeLayoutComponent(java.awt.Component)">removeLayoutComponent</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ 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="addLayoutComponent(java.awt.Component, java.lang.Object)"><!-- --></A><H3>addLayoutComponent</H3><PRE>public void <B>addLayoutComponent</B>(<A HREF="../../java/awt/Component.html">Component</A> comp, <A HREF="../../java/lang/Object.html">Object</A> constraints)</PRE><DL><DD>Adds the specified component to the layout, using the specified constraint object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to be added<DD><CODE>constraints</CODE> - where/how the component is added to the layout.</DL></DD></DL><HR><A NAME="maximumLayoutSize(java.awt.Container)"><!-- --></A><H3>maximumLayoutSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>maximumLayoutSize</B>(<A HREF="../../java/awt/Container.html">Container</A> target)</PRE><DL><DD>Returns the maximum size of this component.<DD><DL></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#getMinimumSize()"><CODE>Component.getMinimumSize()</CODE></A>, <A HREF="../../java/awt/Component.html#getPreferredSize()"><CODE>Component.getPreferredSize()</CODE></A>, <A HREF="../../java/awt/LayoutManager.html"><CODE>LayoutManager</CODE></A></DL></DD></DL><HR><A NAME="getLayoutAlignmentX(java.awt.Container)"><!-- --></A><H3>getLayoutAlignmentX</H3><PRE>public float <B>getLayoutAlignmentX</B>(<A HREF="../../java/awt/Container.html">Container</A> target)</PRE><DL><DD>Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.<DD><DL></DL></DD></DL><HR><A NAME="getLayoutAlignmentY(java.awt.Container)"><!-- --></A><H3>getLayoutAlignmentY</H3><PRE>public float <B>getLayoutAlignmentY</B>(<A HREF="../../java/awt/Container.html">Container</A> target)</PRE><DL><DD>Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.<DD><DL></DL></DD></DL><HR><A NAME="invalidateLayout(java.awt.Container)"><!-- --></A><H3>invalidateLayout</H3><PRE>public void <B>invalidateLayout</B>(<A HREF="../../java/awt/Container.html">Container</A> target)</PRE><DL><DD>Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.<DD><DL></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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LayoutManager2.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/awt/LayoutManager.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/MenuContainer.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> <A HREF="LayoutManager2.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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 + -
显示快捷键?