textlayout.html
来自「API資料大全」· HTML 代码 · 共 1,381 行 · 第 1/5 页
HTML
1,381 行
<TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#TextLayout(java.lang.String, java.awt.Font, java.awt.font.FontRenderContext)">TextLayout</A></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)</CODE><BR> Constructs a <code>TextLayout</code> from a <code>String</code> and a <A HREF="../../../java/awt/Font.html"><CODE>Font</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#TextLayout(java.lang.String, java.util.Map, java.awt.font.FontRenderContext)">TextLayout</A></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)</CODE><BR> Constructs a <code>TextLayout</code> from a <code>String</code> and an attribute set.</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>protected <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#clone()">clone</A></B>()</CODE><BR> Creates a copy of this <code>TextLayout</code>.</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="../../../java/awt/font/TextLayout.html#draw(java.awt.Graphics2D, float, float)">draw</A></B>(<A HREF="../../../java/awt/Graphics2D.html">Graphics2D</A> g2, float x, float y)</CODE><BR> Renders this <code>TextLayout</code> at the specified location in the specified <A HREF="../../../java/awt/Graphics2D.html"><CODE>Graphics2D</CODE></A> context.</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#equals(java.lang.Object)">equals</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> obj)</CODE><BR> Returns <code>true</code> if the specified <code>Object</code> is a <code>TextLayout</code> object and if the specified <code>Object</code> equals this <code>TextLayout</code>.</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#equals(java.awt.font.TextLayout)">equals</A></B>(<A HREF="../../../java/awt/font/TextLayout.html">TextLayout</A> rhs)</CODE><BR> Returns <code>true</code> if the two layouts are equal.</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#getAdvance()">getAdvance</A></B>()</CODE><BR> Returns the advance 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#getAscent()">getAscent</A></B>()</CODE><BR> Returns the ascent of this <code>TextLayout</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getBaseline()">getBaseline</A></B>()</CODE><BR> Returns the baseline for 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#getBaselineOffsets()">getBaselineOffsets</A></B>()</CODE><BR> Returns the offsets array for the baselines used for 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/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getBlackBoxBounds(int, int)">getBlackBoxBounds</A></B>(int firstEndpoint, int secondEndpoint)</CODE><BR> Returns the black box bounds of the characters in the specified range.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getBounds()">getBounds</A></B>()</CODE><BR> Returns the bounds 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#getCaretInfo(java.awt.font.TextHitInfo)">getCaretInfo</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> hit)</CODE><BR> Returns information about the caret corresponding to <code>hit</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#getCaretInfo(java.awt.font.TextHitInfo, java.awt.geom.Rectangle2D)">getCaretInfo</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> hit, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> bounds)</CODE><BR> Returns information about the caret corresponding to <code>hit</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#getCaretShape(java.awt.font.TextHitInfo)">getCaretShape</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> hit)</CODE><BR> Returns a <code>Shape</code> representing the caret at the specified hit inside the natural bounds 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/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getCaretShape(java.awt.font.TextHitInfo, java.awt.geom.Rectangle2D)">getCaretShape</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> hit, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> bounds)</CODE><BR> Returns a <A HREF="../../../java/awt/Shape.html"><CODE>Shape</CODE></A> representing the caret at the specified hit inside the specified 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#getCaretShapes(int)">getCaretShapes</A></B>(int offset)</CODE><BR> Returns two paths corresponding to the strong and weak caret.</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#getCaretShapes(int, java.awt.geom.Rectangle2D)">getCaretShapes</A></B>(int offset, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> bounds)</CODE><BR> Returns two paths corresponding to the strong and weak caret.</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#getCaretShapes(int, java.awt.geom.Rectangle2D, java.awt.font.TextLayout.CaretPolicy)">getCaretShapes</A></B>(int offset, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> bounds, <A HREF="../../../java/awt/font/TextLayout.CaretPolicy.html">TextLayout.CaretPolicy</A> policy)</CODE><BR> Returns two paths corresponding to the strong and weak caret.</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#getCharacterCount()">getCharacterCount</A></B>()</CODE><BR> Returns the number of characters represented by this <code>TextLayout</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getCharacterLevel(int)">getCharacterLevel</A></B>(int index)</CODE><BR> Returns the level of the character at <code>index</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#getDescent()">getDescent</A></B>()</CODE><BR> Returns the descent 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/TextLayout.html">TextLayout</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getJustifiedLayout(float)">getJustifiedLayout</A></B>(float justificationWidth)</CODE><BR> Creates a copy of this <code>TextLayout</code> justified to the specified width.</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#getLeading()">getLeading</A></B>()</CODE><BR> Returns the leading of the <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/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getLogicalHighlightShape(int, int)">getLogicalHighlightShape</A></B>(int firstEndpoint, int secondEndpoint)</CODE><BR> Returns a <code>Shape</code> enclosing the logical selection in the specified range, extended to the natural bounds 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/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextLayout.html#getLogicalHighlightShape(int, int, java.awt.geom.Rectangle2D)">getLogicalHighlightShape</A></B>(int firstEndpoint, int secondEndpoint, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> bounds)</CODE><BR> Returns a <code>Shape</code> enclosing the logical selection in the specified range, extended to the specified <code>bounds</code>.</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#getLogicalRangesForVisualSelection(java.awt.font.TextHitInfo, java.awt.font.TextHitInfo)">getLogicalRangesForVisualSelection</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 the logical ranges of text corresponding to a visual selection.</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#getNextLeftHit(int)">getNextLeftHit</A></B>(int offset)</CODE><BR> Returns the hit for the next caret to the left (top); 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#getNextLeftHit(int, java.awt.font.TextLayout.CaretPolicy)">getNextLeftHit</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 left (top); 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#getNextLeftHit(java.awt.font.TextHitInfo)">getNextLeftHit</A></B>(<A HREF="../../../java/awt/font/TextHitInfo.html">TextHitInfo</A> hit)</CODE><BR> Returns the hit for the next caret to the left (top); if no such
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?