textlayout.html
来自「API資料大全」· HTML 代码 · 共 1,381 行 · 第 1/5 页
HTML
1,381 行
hit, returns <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getNextRightHit(int)">getNextRightHit</A></B>(int offset)</CODE><BR> Returns the hit for the next caret to the right (bottom); if no such hit, returns <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getNextRightHit(int, java.awt.font.TextLayout.CaretPolicy)">getNextRightHit</A></B>(int offset, <A HREF="../../../java/awt/font/TextLayout.CaretPolicy.html">TextLayout.CaretPolicy</A> policy)</CODE><BR> Returns the hit for the next caret to the right (bottom); if no such hit, returns <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getNextRightHit(java.awt.font.TextHitInfo)">getNextRightHit</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> hit)</CODE><BR> Returns the hit for the next caret to the right (bottom); if there is no such hit, returns <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getOutline(java.awt.geom.AffineTransform)">getOutline</A></B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A> tx)</CODE><BR> Returns a <code>Shape</code> representing the outline of this <code>TextLayout</code>.</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/font/TextLayout.html#getVisibleAdvance()">getVisibleAdvance</A></B>()</CODE><BR> Returns the advance of this <code>TextLayout</code>, minus trailing whitespace.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getVisualHighlightShape(java.awt.font.TextHitInfo, java.awt.font.TextHitInfo)">getVisualHighlightShape</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> firstEndpoint, <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> secondEndpoint)</CODE><BR> Returns a <code>Shape</code> enclosing the visual selection in the specified range, extended to the bounds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getVisualHighlightShape(java.awt.font.TextHitInfo, java.awt.font.TextHitInfo, java.awt.geom.Rectangle2D)">getVisualHighlightShape</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> firstEndpoint, <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> secondEndpoint, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> bounds)</CODE><BR> Returns a path enclosing the visual selection in the specified range, extended to <code>bounds</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getVisualOtherHit(java.awt.font.TextHitInfo)">getVisualOtherHit</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> hit)</CODE><BR> Returns the hit on the opposite side of the specified hit's caret.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#handleJustify(float)">handleJustify</A></B>(float justificationWidth)</CODE><BR> Justify this layout.</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="../../../java/awt/font/TextLayout.html#hashCode()">hashCode</A></B>()</CODE><BR> Returns the hash code of this <code>TextLayout</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#hitTestChar(float, float)">hitTestChar</A></B>(float x, float y)</CODE><BR> Returns a <code>TextHitInfo</code> corresponding to the specified point.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#hitTestChar(float, float, java.awt.geom.Rectangle2D)">hitTestChar</A></B>(float x, float y, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> bounds)</CODE><BR> Returns a <code>TextHitInfo</code> corresponding to the specified point.</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="../../../java/awt/font/TextLayout.html#isLeftToRight()">isLeftToRight</A></B>()</CODE><BR> Returns <code>true</code> if this <code>TextLayout</code> has a left-to-right base direction or <code>false</code> if it has a right-to-left base direction.</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="../../../java/awt/font/TextLayout.html#isVertical()">isVertical</A></B>()</CODE><BR> Returns <code>true</code> if this <code>TextLayout</code> is vertical.</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="../../../java/awt/font/TextLayout.html#toString()">toString</A></B>()</CODE><BR> Returns debugging information for this <code>TextLayout</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#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</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#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></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_CARET_POLICY"><!-- --></A><H3>DEFAULT_CARET_POLICY</H3><PRE>public static final <A HREF="../../../java/awt/font/TextLayout.CaretPolicy.html">TextLayout.CaretPolicy</A> <B>DEFAULT_CARET_POLICY</B></PRE><DL><DD>This <code>CaretPolicy</code> is used when a policy is not specified by the client. With this policy, a hit on a character whose direction is the same as the line direction is stronger than a hit on a counterdirectional character. If the characters' directions are the same, a hit on the leading edge of a character is stronger than a hit on the trailing edge of a character.</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="TextLayout(java.lang.String, java.awt.Font, java.awt.font.FontRenderContext)"><!-- --></A><H3>TextLayout</H3><PRE>public <B>TextLayout</B>(<A HREF="../../../java/lang/String.html">String</A> string, <A HREF="../../../java/awt/Font.html">Font</A> font, <A HREF="../../../java/awt/font/FontRenderContext.html">FontRenderContext</A> frc)</PRE><DL><DD>Constructs a <code>TextLayout</code> from a <code>String</code> and a <A HREF="../../../java/awt/Font.html"><CODE>Font</CODE></A>. All the text is styled using the specified <code>Font</code>. <p> The <code>String</code> must specify a single paragraph of text, because an entire paragraph is required for the bidirectional algorithm.<DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - the text to display<DD><CODE>font</CODE> - a <code>Font</code> used to style the text<DD><CODE>frc</CODE> - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the <code>TextLayout</code> and user space.</DL></DD></DL><HR><A NAME="TextLayout(java.lang.String, java.util.Map, java.awt.font.FontRenderContext)"><!-- --></A><H3>TextLayout</H3><PRE>public <B>TextLayout</B>(<A HREF="../../../java/lang/String.html">String</A> string, <A HREF="../../../java/util/Map.html">Map</A> attributes, <A HREF="../../../java/awt/font/FontRenderContext.html">FontRenderContext</A> frc)</PRE><DL><DD>Constructs a <code>TextLayout</code> from a <code>String</code> and an attribute set. <p> All the text is styled using the provided attributes. <p> <code>string</code> must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm.<DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - the text to display<DD><CODE>attributes</CODE> - the attributes used to style the text<DD><CODE>frc</CODE> - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the <code>TextLayout</code> and user space.</DL></DD></DL><HR><A NAME="TextLayout(java.text.AttributedCharacterIterator, java.awt.font.FontRenderContext)"><!-- --></A><H3>TextLayout</H3><PRE>public <B>TextLayout</B>(<A HREF="../../../java/text/AttributedCharacterIterator.html">AttributedCharacterIterator</A> text, <A HREF="../../../java/awt/font/FontRenderContext.html">FontRenderContext</A> frc)</PRE><DL><DD>Constructs a <code>TextLayout</code> from an iterator over styled text. <p> The iterator must specify a single paragraph of text because an entire paragraph is required for the bidirectional algorithm.<DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - the styled text to display<DD><CODE>frc</CODE> - contains information about a graphics device which is needed to measure the text correctly. Text measurements can vary slightly depending on the device resolution, and attributes such as antialiasing. This parameter does not specify a translation between the <code>TextLayout</code> and user space.</DL></DD></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="clone()"><!-- --></A><H3>clone</H3><PRE>protected <A HREF="../../../java/lang/Object.html">Object</A> <B>clone</B>()</PRE><DL><DD>Creates a copy of this <code>TextLayout</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD>Following copied from class: <CODE>java.lang.Object</CODE></DD><DD><DL><DT><B>Returns:</B><DD>a clone of this instance.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/CloneNotSupportedException.html">CloneNotSupportedException</A></CODE> - if the object's class does not support the <code>Cloneable</code> interface. Subclasses that override the <code>clone</code> method can also throw this exception to indicate that an instance cannot
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?