📄 titledborder.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#titlePosition">titlePosition</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#TOP">TOP</A></B></CODE><BR> Position the title in the middle of the border's top line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#TRAILING">TRAILING</A></B></CODE><BR> Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation.</TD></TR></TABLE> <!-- ======== 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="../../../javax/swing/border/TitledBorder.html#TitledBorder(javax.swing.border.Border)">TitledBorder</A></B>(<A HREF="../../../javax/swing/border/Border.html">Border</A> border)</CODE><BR> Creates a TitledBorder instance with the specified border and an empty title.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#TitledBorder(javax.swing.border.Border, java.lang.String)">TitledBorder</A></B>(<A HREF="../../../javax/swing/border/Border.html">Border</A> border, <A HREF="../../../java/lang/String.html">String</A> title)</CODE><BR> Creates a TitledBorder instance with the specified border and title.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#TitledBorder(javax.swing.border.Border, java.lang.String, int, int)">TitledBorder</A></B>(<A HREF="../../../javax/swing/border/Border.html">Border</A> border, <A HREF="../../../java/lang/String.html">String</A> title, int titleJustification, int titlePosition)</CODE><BR> Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font)">TitledBorder</A></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)</CODE><BR> Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#TitledBorder(javax.swing.border.Border, java.lang.String, int, int, java.awt.Font, java.awt.Color)">TitledBorder</A></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)</CODE><BR> Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#TitledBorder(java.lang.String)">TitledBorder</A></B>(<A HREF="../../../java/lang/String.html">String</A> title)</CODE><BR> Creates a TitledBorder instance.</TD></TR></TABLE> <!-- ========== 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> <A HREF="../../../javax/swing/border/Border.html">Border</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getBorder()">getBorder</A></B>()</CODE><BR> Returns the border of the titled border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Insets.html">Insets</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getBorderInsets(java.awt.Component)">getBorderInsets</A></B>(<A HREF="../../../java/awt/Component.html">Component</A> c)</CODE><BR> Returns the insets of the border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Insets.html">Insets</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getBorderInsets(java.awt.Component, java.awt.Insets)">getBorderInsets</A></B>(<A HREF="../../../java/awt/Component.html">Component</A> c, <A HREF="../../../java/awt/Insets.html">Insets</A> insets)</CODE><BR> Reinitialize the insets parameter with this Border's current Insets.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../java/awt/Font.html">Font</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getFont(java.awt.Component)">getFont</A></B>(<A HREF="../../../java/awt/Component.html">Component</A> c)</CODE><BR> </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="../../../javax/swing/border/TitledBorder.html#getMinimumSize(java.awt.Component)">getMinimumSize</A></B>(<A HREF="../../../java/awt/Component.html">Component</A> c)</CODE><BR> Returns the minimum dimensions this border requires in order to fully display the border and title.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getTitle()">getTitle</A></B>()</CODE><BR> Returns the title of the titled border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getTitleColor()">getTitleColor</A></B>()</CODE><BR> Returns the title-color of the titled border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Font.html">Font</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getTitleFont()">getTitleFont</A></B>()</CODE><BR> Returns the title-font of the titled border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getTitleJustification()">getTitleJustification</A></B>()</CODE><BR> Returns the title-justification of the titled border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#getTitlePosition()">getTitlePosition</A></B>()</CODE><BR> Returns the title-position of the titled border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/border/TitledBorder.html#isBorderOpaque()">isBorderOpaque</A></B>()</CODE><BR> Returns whether or not the border is opaque.</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="../../../javax/swing/border/TitledBorder.html#paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)">paintBorder</A></B>(<A HREF="../../../java/awt/Component.html">Component</A> c, <A HREF="../../../java/awt/Graphics.html">Graphics</A> g, int x, int y, int width, int height)</CODE><BR> Paints the border for the specified component with the specified position and size.</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="../../../javax/swing/border/TitledBorder.html#setBorder(javax.swing.border.Border)">setBorder</A></B>(<A HREF="../../../javax/swing/border/Border.html">Border</A> border)</CODE><BR> Sets the border of the titled border.</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="../../../javax/swing/border/TitledBorder.html#setTitle(java.lang.String)">setTitle</A></B>(<A HREF="../../../java/lang/String.html">String</A> title)</CODE><BR> Sets the title of the titled border.</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="../../../javax/swing/border/TitledBorder.html#setTitleColor(java.awt.Color)">setTitleColor</A></B>(<A HREF="../../../java/awt/Color.html">Color</A> titleColor)</CODE><BR> Sets the title-color of the titled border.</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="../../../javax/swing/border/TitledBorder.html#setTitleFont(java.awt.Font)">setTitleFont</A></B>(<A HREF="../../../java/awt/Font.html">Font</A> titleFont)</CODE><BR> Sets the title-font of the titled border.</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="../../../javax/swing/border/TitledBorder.html#setTitleJustification(int)">setTitleJustification</A></B>(int titleJustification)</CODE><BR> Sets the title-justification of the titled border.</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="../../../javax/swing/border/TitledBorder.html#setTitlePosition(int)">setTitlePosition</A></B>(int titlePosition)</CODE><BR> Sets the title-position of the titled border.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.swing.border.AbstractBorder"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.swing.border.<A HREF="../../../javax/swing/border/AbstractBorder.html">AbstractBorder</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/border/AbstractBorder.html#getInteriorRectangle(java.awt.Component, javax.swing.border.Border, int, int, int, int)">getInteriorRectangle</A>, <A HREF="../../../javax/swing/border/AbstractBorder.html#getInteriorRectangle(java.awt.Component, int, int, int, int)">getInteriorRectangle</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><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#toString()">toString</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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -