📄 texttitle.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/chart/TextTitle.html#getPreferredHeight(java.awt.Graphics2D)">getPreferredHeight</A></B>(java.awt.Graphics2D g2)</CODE><BR> Returns the preferred height of the title.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/chart/TextTitle.html#getPreferredWidth(java.awt.Graphics2D)">getPreferredWidth</A></B>(java.awt.Graphics2D g2)</CODE><BR> Returns the preferred width of the title.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/chart/TextTitle.html#getText()">getText</A></B>()</CODE><BR> Returns the title text.</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="../../../org/jfree/chart/TextTitle.html#isValidPosition(int)">isValidPosition</A></B>(int position)</CODE><BR> Returns true for the positions that are valid for TextTitle (TOP and BOTTOM for now) and false for all other positions.</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="../../../org/jfree/chart/TextTitle.html#setBackgroundPaint(java.awt.Paint)">setBackgroundPaint</A></B>(java.awt.Paint paint)</CODE><BR> Sets the background paint.</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="../../../org/jfree/chart/TextTitle.html#setFont(java.awt.Font)">setFont</A></B>(java.awt.Font font)</CODE><BR> Sets the font used to display the title string.</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="../../../org/jfree/chart/TextTitle.html#setPaint(java.awt.Paint)">setPaint</A></B>(java.awt.Paint paint)</CODE><BR> Sets the paint used to display the title string.</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="../../../org/jfree/chart/TextTitle.html#setText(java.lang.String)">setText</A></B>(java.lang.String text)</CODE><BR> Sets the title to the specified text.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.jfree.chart.AbstractTitle"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class org.jfree.chart.<A HREF="../../../org/jfree/chart/AbstractTitle.html">AbstractTitle</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../org/jfree/chart/AbstractTitle.html#addChangeListener(org.jfree.chart.event.TitleChangeListener)">addChangeListener</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#clone()">clone</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#getHorizontalAlignment()">getHorizontalAlignment</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#getNotify()">getNotify</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#getPosition()">getPosition</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#getSpacer()">getSpacer</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#getVerticalAlignment()">getVerticalAlignment</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#isValidHorizontalAlignment(int)">isValidHorizontalAlignment</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#isValidVerticalAlignment(int)">isValidVerticalAlignment</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#notifyListeners(org.jfree.chart.event.TitleChangeEvent)">notifyListeners</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#removeChangeListener(org.jfree.chart.event.TitleChangeListener)">removeChangeListener</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#setHorizontalAlignment(int)">setHorizontalAlignment</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#setNotify(boolean)">setNotify</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#setPosition(int)">setPosition</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#setSpacer(org.jfree.chart.Spacer)">setSpacer</A>, <A HREF="../../../org/jfree/chart/AbstractTitle.html#setVerticalAlignment(int)">setVerticalAlignment</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.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="DEFAULT_FONT"><!-- --></A><H3>DEFAULT_FONT</H3><PRE>public static final java.awt.Font <B>DEFAULT_FONT</B></PRE><DL><DD>The default font.<P><DL></DL></DL><HR><A NAME="DEFAULT_TEXT_PAINT"><!-- --></A><H3>DEFAULT_TEXT_PAINT</H3><PRE>public static final java.awt.Paint <B>DEFAULT_TEXT_PAINT</B></PRE><DL><DD>The default text color.<P><DL></DL></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="TextTitle(java.lang.String)"><!-- --></A><H3>TextTitle</H3><PRE>public <B>TextTitle</B>(java.lang.String text)</PRE><DL><DD>Creates a new title, using default attributes where necessary.<P><DT><B>Parameters:</B><DD><CODE>text</CODE> - the title text.</DL><HR><A NAME="TextTitle(java.lang.String, java.awt.Font)"><!-- --></A><H3>TextTitle</H3><PRE>public <B>TextTitle</B>(java.lang.String text, java.awt.Font font)</PRE><DL><DD>Creates a new title, using default attributes where necessary.<P><DT><B>Parameters:</B><DD><CODE>text</CODE> - the title text.<DD><CODE>font</CODE> - the title font.</DL><HR><A NAME="TextTitle(java.lang.String, java.awt.Font, java.awt.Paint)"><!-- --></A><H3>TextTitle</H3><PRE>public <B>TextTitle</B>(java.lang.String text, java.awt.Font font, java.awt.Paint paint)</PRE><DL><DD>Creates a new title, using default attributes where necessary.<P><DT><B>Parameters:</B><DD><CODE>text</CODE> - the title text.<DD><CODE>font</CODE> - the title font.<DD><CODE>paint</CODE> - the title color.</DL><HR><A NAME="TextTitle(java.lang.String, java.awt.Font, int)"><!-- --></A><H3>TextTitle</H3><PRE>public <B>TextTitle</B>(java.lang.String text, java.awt.Font font, int horizontalAlignment)</PRE><DL><DD>Creates a new title, using default attributes where necessary. <P> For the horizontal alignment, use the constants (LEFT, RIGHT and CENTER) defined in the AbstractTitle class.<P><DT><B>Parameters:</B><DD><CODE>text</CODE> - the title text.<DD><CODE>font</CODE> - the title font.<DD><CODE>horizontalAlignment</CODE> - the horizontal alignment.</DL><HR><A NAME="TextTitle(java.lang.String, java.awt.Font, java.awt.Paint, int, int, int, org.jfree.chart.Spacer)"><!-- --></A><H3>TextTitle</H3><PRE>public <B>TextTitle</B>(java.lang.String text, java.awt.Font font, java.awt.Paint paint, int position, int horizontalAlignment, int verticalAlignment, <A HREF="../../../org/jfree/chart/Spacer.html">Spacer</A> spacer)</PRE><DL><DD>Constructs a TextTitle with the specified properties. <p> For the titlePosition, horizontalAlignment and verticalAlignment, use the constants defined in the AbstractTitle class.<P><DT><B>Parameters:</B><DD><CODE>text</CODE> - the text for the title.<DD><CODE>font</CODE> - the title font.<DD><CODE>paint</CODE> - the title color.<DD><CODE>position</CODE> - the title position.<DD><CODE>horizontalAlignment</CODE> - the horizontal alignment.<DD><CODE>verticalAlignment</CODE> - the vertical alignment.<DD><CODE>spacer</CODE> - the space to leave around the outside of the title.</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="getText()"><!-- --></A><H3>getText</H3><PRE>public java.lang.String <B>getText</B>()</PRE><DL><DD>Returns the title text.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the text.</DL></DD></DL><HR><A NAME="setText(java.lang.String)"><!-- --></A><H3>setText</H3><PRE>public void <B>setText</B>(java.lang.String text)</PRE><DL><DD>Sets the title to the specified text. This method notifies registered listeners that the title has been modified.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - the new text.</DL></DD></DL><HR><A NAME="getFont()"><!-- --></A><H3>getFont</H3><PRE>public java.awt.Font <B>getFont</B>()</PRE><DL><DD>Returns the font used to display the title string.<P><DD><DL></DL></DD><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -