📄 borderfactory.html
字号:
the title along with its positioning and font, using the default text color determined by the current look and feel.<DD><DL><DT><B>Parameters:</B><DD><CODE>border</CODE> - the <code>Border</code> object to add the title to<DD><CODE>title</CODE> - a <code>String</code> containing the text of the title<DD><CODE>titleJustification</CODE> - an integer specifying the justification of the title -- one of the following:<ul><li><code>TitledBorder.LEFT</code><li><code>TitledBorder.CENTER</code><li><code>TitledBorder.RIGHT</code><li><code>TitledBorder.LEADING</code><li><code>TitledBorder.TRAILING<code><li><code>TitledBorder.DEFAULT_JUSTIFICATION</code> (leading)</ul><DD><CODE>titlePosition</CODE> - an integer specifying the vertical position of the text in relation to the border -- one of the following:<ul><li><code> TitledBorder.ABOVE_TOP</code><li>TitledBorder.TOP</code> (sitting on the top line)<li><code>TitledBorder.BELOW_TOP</code><li><code>TitledBorder.ABOVE_BOTTOM</code><li><code>TitledBorder.BOTTOM</code> (sitting on the bottom line)<li><code>TitledBorder.BELOW_BOTTOM</code><li><code>TitledBorder.DEFAULT_POSITION</code> (top)</ul><DD><CODE>titleFont</CODE> - a Font object specifying the title font<DT><B>Returns:</B><DD>the TitledBorder object</DL></DD></DL><HR><A NAME="createTitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color)"><!-- --></A><H3>createTitledBorder</H3><PRE>public static <A HREF="../../javax/swing/border/TitledBorder.html">TitledBorder</A> <B>createTitledBorder</B>(<A HREF="../../javax/swing/border/Border.html">Border</A> border, <A HREF="../../java/lang/String.html">String</A> title, int titleJustification, int titlePosition, <A HREF="../../java/awt/Font.html">Font</A> titleFont, <A HREF="../../java/awt/Color.html">Color</A> titleColor)</PRE><DL><DD>Adds a title to an existing border, specifying the text of the title along with its positioning, font, and color.<DD><DL><DT><B>Parameters:</B><DD><CODE>border</CODE> - the <code>Border</code> object to add the title to<DD><CODE>title</CODE> - a <code>String</code> containing the text of the title<DD><CODE>titleJustification</CODE> - an integer specifying the justification of the title -- one of the following:<ul><li><code>TitledBorder.LEFT</code><li><code>TitledBorder.CENTER</code><li><code>TitledBorder.RIGHT</code><li><code>TitledBorder.LEADING</code><li><code>TitledBorder.TRAILING<code><li><code>TitledBorder.DEFAULT_JUSTIFICATION</code> (leading)</ul><DD><CODE>titlePosition</CODE> - an integer specifying the vertical position of the text in relation to the border -- one of the following:<ul><li><code> TitledBorder.ABOVE_TOP</code><li>TitledBorder.TOP</code> (sitting on the top line)<li><code>TitledBorder.BELOW_TOP</code><li><code>TitledBorder.ABOVE_BOTTOM</code><li><code>TitledBorder.BOTTOM</code> (sitting on the bottom line)<li><code>TitledBorder.BELOW_BOTTOM</code><li><code>TitledBorder.DEFAULT_POSITION</code> (top)</ul><DD><CODE>titleFont</CODE> - a <code>Font</code> object specifying the title font<DD><CODE>titleColor</CODE> - a <code>Color</code> object specifying the title color<DT><B>Returns:</B><DD>the <code>TitledBorder</code> object</DL></DD></DL><HR><A NAME="createEmptyBorder()"><!-- --></A><H3>createEmptyBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createEmptyBorder</B>()</PRE><DL><DD>Creates an empty border that takes up no space. (The width of the top, bottom, left, and right sides are all zero.)<DD><DL><DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createEmptyBorder(int, int, int, int)"><!-- --></A><H3>createEmptyBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createEmptyBorder</B>(int top, int left, int bottom, int right)</PRE><DL><DD>Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.<DD><DL><DT><B>Parameters:</B><DD><CODE>top</CODE> - an integer specifying the width of the top, in pixels<DD><CODE>left</CODE> - an integer specifying the width of the left side, in pixels<DD><CODE>bottom</CODE> - an integer specifying the width of the right side, in pixels<DD><CODE>right</CODE> - an integer specifying the width of the bottom, in pixels<DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createCompoundBorder()"><!-- --></A><H3>createCompoundBorder</H3><PRE>public static <A HREF="../../javax/swing/border/CompoundBorder.html">CompoundBorder</A> <B>createCompoundBorder</B>()</PRE><DL><DD>Creates a compound border with a <code>null</code> inside edge and a <code>null</code> outside edge.<DD><DL><DT><B>Returns:</B><DD>the <code>CompoundBorder</code> object</DL></DD></DL><HR><A NAME="createCompoundBorder(javax.swing.border.Border, javax.swing.border.Border)"><!-- --></A><H3>createCompoundBorder</H3><PRE>public static <A HREF="../../javax/swing/border/CompoundBorder.html">CompoundBorder</A> <B>createCompoundBorder</B>(<A HREF="../../javax/swing/border/Border.html">Border</A> outsideBorder, <A HREF="../../javax/swing/border/Border.html">Border</A> insideBorder)</PRE><DL><DD>Creates a compound border specifying the border objects to use for the outside and inside edges.<DD><DL><DT><B>Parameters:</B><DD><CODE>outsideBorder</CODE> - a <code>Border</code> object for the outer edge of the compound border<DD><CODE>insideBorder</CODE> - a <code>Border</code> object for the inner edge of the compound border<DT><B>Returns:</B><DD>the <code>CompoundBorder</code> object</DL></DD></DL><HR><A NAME="createMatteBorder(int, int, int, int, java.awt.Color)"><!-- --></A><H3>createMatteBorder</H3><PRE>public static <A HREF="../../javax/swing/border/MatteBorder.html">MatteBorder</A> <B>createMatteBorder</B>(int top, int left, int bottom, int right, <A HREF="../../java/awt/Color.html">Color</A> color)</PRE><DL><DD>Creates a matte-look border using a solid color. (The difference between this border and a line border is that you can specify the individual border dimensions.)<DD><DL><DT><B>Parameters:</B><DD><CODE>top</CODE> - an integer specifying the width of the top, in pixels<DD><CODE>left</CODE> - an integer specifying the width of the left side, in pixels<DD><CODE>bottom</CODE> - an integer specifying the width of the right side, in pixels<DD><CODE>right</CODE> - an integer specifying the width of the bottom, in pixels<DD><CODE>color</CODE> - a <code>Color</code> to use for the border<DT><B>Returns:</B><DD>the <code>MatteBorder</code> object</DL></DD></DL><HR><A NAME="createMatteBorder(int, int, int, int, javax.swing.Icon)"><!-- --></A><H3>createMatteBorder</H3><PRE>public static <A HREF="../../javax/swing/border/MatteBorder.html">MatteBorder</A> <B>createMatteBorder</B>(int top, int left, int bottom, int right, <A HREF="../../javax/swing/Icon.html">Icon</A> tileIcon)</PRE><DL><DD>Creates a matte-look border that consists of multiple tiles of a specified icon. Multiple copies of the icon are placed side-by-side to fill up the border area. <p> Note:<br> If the icon doesn't load, the border area is painted gray.<DD><DL><DT><B>Parameters:</B><DD><CODE>top</CODE> - an integer specifying the width of the top, in pixels<DD><CODE>left</CODE> - an integer specifying the width of the left side, in pixels<DD><CODE>bottom</CODE> - an integer specifying the width of the right side, in pixels<DD><CODE>right</CODE> - an integer specifying the width of the bottom, in pixels<DD><CODE>tileIcon</CODE> - the <code>Icon</code> object used for the border tiles<DT><B>Returns:</B><DD>the <code>MatteBorder</code> object</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/BorderFactory.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="../../javax/swing/ActionMap.html"><B>PREV CLASS</B></A> <A HREF="../../javax/swing/Box.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="BorderFactory.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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -