📄 borderfactory.html
字号:
(In a lowered border, shadows are on top and highlights are underneath.)<DD><DL><DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createBevelBorder(int)"><!-- --></A><H3>createBevelBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createBevelBorder</B>(int type)</PRE><DL><DD>Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows. (In a lowered border, shadows are on top and highlights are underneath.)<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - an integer specifying either <code>BevelBorder.LOWERED</code> or <code>BevelBorder.RAISED</code><DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createBevelBorder(int, java.awt.Color, java.awt.Color)"><!-- --></A><H3>createBevelBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createBevelBorder</B>(int type, <A HREF="../../java/awt/Color.html">Color</A> highlight, <A HREF="../../java/awt/Color.html">Color</A> shadow)</PRE><DL><DD>Creates a beveled border of the specified type, using the specified highlighting and shadowing. The outer edge of the highlighted area uses a brighter shade of the highlight color. The inner edge of the shadow area uses a brighter shade of the shadow color.<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - an integer specifying either <code>BevelBorder.LOWERED</code> or <code>BevelBorder.RAISED</code><DD><CODE>highlight</CODE> - a <code>Color</code> object for highlights<DD><CODE>shadow</CODE> - a <code>Color</code> object for shadows<DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createBevelBorder(int, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)"><!-- --></A><H3>createBevelBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createBevelBorder</B>(int type, <A HREF="../../java/awt/Color.html">Color</A> highlightOuter, <A HREF="../../java/awt/Color.html">Color</A> highlightInner, <A HREF="../../java/awt/Color.html">Color</A> shadowOuter, <A HREF="../../java/awt/Color.html">Color</A> shadowInner)</PRE><DL><DD>Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - an integer specifying either <code>BevelBorder.LOWERED</code> or <code>BevelBorder.RAISED</code><DD><CODE>highlightOuter</CODE> - a <code>Color</code> object for the outer edge of the highlight area<DD><CODE>highlightInner</CODE> - a <code>Color</code> object for the inner edge of the highlight area<DD><CODE>shadowOuter</CODE> - a <code>Color</code> object for the outer edge of the shadow area<DD><CODE>shadowInner</CODE> - a <code>Color</code> object for the inner edge of the shadow area<DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createEtchedBorder()"><!-- --></A><H3>createEtchedBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createEtchedBorder</B>()</PRE><DL><DD>Creates a border with an "etched" look using the component's current background color for highlighting and shading.<DD><DL><DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createEtchedBorder(java.awt.Color, java.awt.Color)"><!-- --></A><H3>createEtchedBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createEtchedBorder</B>(<A HREF="../../java/awt/Color.html">Color</A> highlight, <A HREF="../../java/awt/Color.html">Color</A> shadow)</PRE><DL><DD>Creates a border with an "etched" look using the specified highlighting and shading colors.<DD><DL><DT><B>Parameters:</B><DD><CODE>highlight</CODE> - a <code>Color</code> object for the border highlights<DD><CODE>shadow</CODE> - a <code>Color</code> object for the border shadows<DT><B>Returns:</B><DD>the <code>Border</code> object</DL></DD></DL><HR><A NAME="createEtchedBorder(int)"><!-- --></A><H3>createEtchedBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createEtchedBorder</B>(int type)</PRE><DL><DD>Creates a border with an "etched" look using the component's current background color for highlighting and shading.<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - one of <code>EtchedBorder.RAISED</code>, or <code>EtchedBorder.LOWERED</code><DT><B>Returns:</B><DD>the <code>Border</code> object<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if type is not either <code>EtchedBorder.RAISED</code> or <code>EtchedBorder.LOWERED</code><DT><B>Since: </B><DD>1.3</DD></DL></DD></DL><HR><A NAME="createEtchedBorder(int, java.awt.Color, java.awt.Color)"><!-- --></A><H3>createEtchedBorder</H3><PRE>public static <A HREF="../../javax/swing/border/Border.html">Border</A> <B>createEtchedBorder</B>(int type, <A HREF="../../java/awt/Color.html">Color</A> highlight, <A HREF="../../java/awt/Color.html">Color</A> shadow)</PRE><DL><DD>Creates a border with an "etched" look using the specified highlighting and shading colors.<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - one of <code>EtchedBorder.RAISED</code>, or <code>EtchedBorder.LOWERED</code><DD><CODE>highlight</CODE> - a <code>Color</code> object for the border highlights<DD><CODE>shadow</CODE> - a <code>Color</code> object for the border shadows<DT><B>Returns:</B><DD>the <code>Border</code> object<DT><B>Since: </B><DD>1.3</DD></DL></DD></DL><HR><A NAME="createTitledBorder(java.lang.String)"><!-- --></A><H3>createTitledBorder</H3><PRE>public static <A HREF="../../javax/swing/border/TitledBorder.html">TitledBorder</A> <B>createTitledBorder</B>(<A HREF="../../java/lang/String.html">String</A> title)</PRE><DL><DD>Creates a new title border specifying the text of the title, using the default border (etched), using the default text position (sitting on the top line) and default justification (leading) and using the default font and text color determined by the current look and feel.<DD><DL><DT><B>Parameters:</B><DD><CODE>title</CODE> - a <code>String</code> containing the text of the title<DT><B>Returns:</B><DD>the <code>TitledBorder</code> object</DL></DD></DL><HR><A NAME="createTitledBorder(javax.swing.border.Border)"><!-- --></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)</PRE><DL><DD>Creates a new title border with an empty title specifying the border object, using the default text position (sitting on the top line) and default justification (leading) and using the default font, text color, and border determined by the current look and feel. (The Motif and Windows look and feels use an etched border; The Java look and feel uses a gray border.)<DD><DL><DT><B>Parameters:</B><DD><CODE>border</CODE> - the <code>Border</code> object to add the title to<DT><B>Returns:</B><DD>the <code>TitledBorder</code> object</DL></DD></DL><HR><A NAME="createTitledBorder(javax.swing.border.Border, java.lang.String)"><!-- --></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)</PRE><DL><DD>Adds a title to an existing border, specifying the text of the title, using the default positioning (sitting on the top line) and default justification (leading) and using the default font and 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<DT><B>Returns:</B><DD>the <code>TitledBorder</code> object</DL></DD></DL><HR><A NAME="createTitledBorder(javax.swing.border.Border, java.lang.String, int, int)"><!-- --></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)</PRE><DL><DD>Adds a title to an existing border, specifying the text of the title along with its positioning, using the default font and 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><DT><B>Returns:</B><DD>the <code>TitledBorder</code> object</DL></DD></DL><HR><A NAME="createTitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font)"><!-- --></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)</PRE><DL><DD>Adds a title to an existing border, specifying the text of
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -