代码拉取完成,页面将自动刷新
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.6.0_18) on Fri Sep 26 17:01:27 PDT 2014 -->
<title>Bidi (Java Platform SE 7 )</title>
<meta name="date" content="2014-09-26">
<meta name="keywords" content="java.text.Bidi class">
<meta name="keywords" content="DIRECTION_LEFT_TO_RIGHT">
<meta name="keywords" content="DIRECTION_RIGHT_TO_LEFT">
<meta name="keywords" content="DIRECTION_DEFAULT_LEFT_TO_RIGHT">
<meta name="keywords" content="DIRECTION_DEFAULT_RIGHT_TO_LEFT">
<meta name="keywords" content="createLineBidi()">
<meta name="keywords" content="isMixed()">
<meta name="keywords" content="isLeftToRight()">
<meta name="keywords" content="isRightToLeft()">
<meta name="keywords" content="getLength()">
<meta name="keywords" content="baseIsLeftToRight()">
<meta name="keywords" content="getBaseLevel()">
<meta name="keywords" content="getLevelAt()">
<meta name="keywords" content="getRunCount()">
<meta name="keywords" content="getRunLevel()">
<meta name="keywords" content="getRunStart()">
<meta name="keywords" content="getRunLimit()">
<meta name="keywords" content="requiresBidi()">
<meta name="keywords" content="reorderVisually()">
<meta name="keywords" content="toString()">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Bidi (Java Platform SE 7 )";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Bidi.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><strong>Java™ Platform<br>Standard Ed. 7</strong></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../java/text/AttributedString.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/BreakIterator.html" title="class in java.text"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?java/text/Bidi.html" target="_top">Frames</a></li>
<li><a href="Bidi.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">java.text</div>
<h2 title="Class Bidi" class="title">Class Bidi</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>java.text.Bidi</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="strong">Bidi</span>
extends <a href="../../java/lang/Object.html" title="class in java.lang">Object</a></pre>
<div class="block">This class implements the Unicode Bidirectional Algorithm.
<p>
A Bidi object provides information on the bidirectional reordering of the text
used to create it. This is required, for example, to properly display Arabic
or Hebrew text. These languages are inherently mixed directional, as they order
numbers from left-to-right while ordering most other text from right-to-left.
<p>
Once created, a Bidi object can be queried to see if the text it represents is
all left-to-right or all right-to-left. Such objects are very lightweight and
this text is relatively easy to process.
<p>
If there are multiple runs of text, information about the runs can be accessed
by indexing to get the start, limit, and level of a run. The level represents
both the direction and the 'nesting level' of a directional run. Odd levels
are right-to-left, while even levels are left-to-right. So for example level
0 represents left-to-right text, while level 1 represents right-to-left text, and
level 2 represents left-to-right text embedded in a right-to-left run.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.4</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#DIRECTION_DEFAULT_LEFT_TO_RIGHT">DIRECTION_DEFAULT_LEFT_TO_RIGHT</a></strong></code>
<div class="block">Constant indicating that the base direction depends on the first strong
directional character in the text according to the Unicode
Bidirectional Algorithm.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#DIRECTION_DEFAULT_RIGHT_TO_LEFT">DIRECTION_DEFAULT_RIGHT_TO_LEFT</a></strong></code>
<div class="block">Constant indicating that the base direction depends on the first strong
directional character in the text according to the Unicode
Bidirectional Algorithm.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#DIRECTION_LEFT_TO_RIGHT">DIRECTION_LEFT_TO_RIGHT</a></strong></code>
<div class="block">Constant indicating base direction is left-to-right.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#DIRECTION_RIGHT_TO_LEFT">DIRECTION_RIGHT_TO_LEFT</a></strong></code>
<div class="block">Constant indicating base direction is right-to-left.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../java/text/Bidi.html#Bidi(java.text.AttributedCharacterIterator)">Bidi</a></strong>(<a href="../../java/text/AttributedCharacterIterator.html" title="interface in java.text">AttributedCharacterIterator</a> paragraph)</code>
<div class="block">Create Bidi from the given paragraph of text.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../java/text/Bidi.html#Bidi(char[],%20int,%20byte[],%20int,%20int,%20int)">Bidi</a></strong>(char[] text,
int textStart,
byte[] embeddings,
int embStart,
int paragraphLength,
int flags)</code>
<div class="block">Create Bidi from the given text, embedding, and direction information.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../java/text/Bidi.html#Bidi(java.lang.String,%20int)">Bidi</a></strong>(<a href="../../java/lang/String.html" title="class in java.lang">String</a> paragraph,
int flags)</code>
<div class="block">Create Bidi from the given paragraph of text and base direction.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#baseIsLeftToRight()">baseIsLeftToRight</a></strong>()</code>
<div class="block">Return true if the base direction is left-to-right.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../java/text/Bidi.html" title="class in java.text">Bidi</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#createLineBidi(int,%20int)">createLineBidi</a></strong>(int lineStart,
int lineLimit)</code>
<div class="block">Create a Bidi object representing the bidi information on a line of text within
the paragraph represented by the current Bidi.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#getBaseLevel()">getBaseLevel</a></strong>()</code>
<div class="block">Return the base level (0 if left-to-right, 1 if right-to-left).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#getLength()">getLength</a></strong>()</code>
<div class="block">Return the length of text in the line.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#getLevelAt(int)">getLevelAt</a></strong>(int offset)</code>
<div class="block">Return the resolved level of the character at offset.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#getRunCount()">getRunCount</a></strong>()</code>
<div class="block">Return the number of level runs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#getRunLevel(int)">getRunLevel</a></strong>(int run)</code>
<div class="block">Return the level of the nth logical run in this line.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#getRunLimit(int)">getRunLimit</a></strong>(int run)</code>
<div class="block">Return the index of the character past the end of the nth logical run in this line, as
an offset from the start of the line.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#getRunStart(int)">getRunStart</a></strong>(int run)</code>
<div class="block">Return the index of the character at the start of the nth logical run in this line, as
an offset from the start of the line.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#isLeftToRight()">isLeftToRight</a></strong>()</code>
<div class="block">Return true if the line is all left-to-right text and the base direction is left-to-right.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#isMixed()">isMixed</a></strong>()</code>
<div class="block">Return true if the line is not left-to-right or right-to-left.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#isRightToLeft()">isRightToLeft</a></strong>()</code>
<div class="block">Return true if the line is all right-to-left text, and the base direction is right-to-left.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#reorderVisually(byte[],%20int,%20java.lang.Object[],%20int,%20int)">reorderVisually</a></strong>(byte[] levels,
int levelStart,
<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>[] objects,
int objectStart,
int count)</code>
<div class="block">Reorder the objects in the array into visual order based on their levels.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#requiresBidi(char[],%20int,%20int)">requiresBidi</a></strong>(char[] text,
int start,
int limit)</code>
<div class="block">Return true if the specified text requires bidi analysis.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../java/lang/String.html" title="class in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../java/text/Bidi.html#toString()">toString</a></strong>()</code>
<div class="block">Display the bidi internal state, used in debugging.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="../../java/lang/Object.html" title="class in java.lang">Object</a></h3>
<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#wait()">wait</a>, <a href="../../java/lang/Object.html#wait(long)">wait</a>, <a href="../../java/lang/Object.html#wait(long,%20int)">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DIRECTION_LEFT_TO_RIGHT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DIRECTION_LEFT_TO_RIGHT</h4>
<pre>public static final int DIRECTION_LEFT_TO_RIGHT</pre>
<div class="block">Constant indicating base direction is left-to-right.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.Bidi.DIRECTION_LEFT_TO_RIGHT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DIRECTION_RIGHT_TO_LEFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DIRECTION_RIGHT_TO_LEFT</h4>
<pre>public static final int DIRECTION_RIGHT_TO_LEFT</pre>
<div class="block">Constant indicating base direction is right-to-left.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.Bidi.DIRECTION_RIGHT_TO_LEFT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DIRECTION_DEFAULT_LEFT_TO_RIGHT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DIRECTION_DEFAULT_LEFT_TO_RIGHT</h4>
<pre>public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT</pre>
<div class="block">Constant indicating that the base direction depends on the first strong
directional character in the text according to the Unicode
Bidirectional Algorithm. If no strong directional character is present,
the base direction is left-to-right.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DIRECTION_DEFAULT_RIGHT_TO_LEFT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DIRECTION_DEFAULT_RIGHT_TO_LEFT</h4>
<pre>public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT</pre>
<div class="block">Constant indicating that the base direction depends on the first strong
directional character in the text according to the Unicode
Bidirectional Algorithm. If no strong directional character is present,
the base direction is right-to-left.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../constant-values.html#java.text.Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Bidi(java.lang.String, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Bidi</h4>
<pre>public Bidi(<a href="../../java/lang/String.html" title="class in java.lang">String</a> paragraph,
int flags)</pre>
<div class="block">Create Bidi from the given paragraph of text and base direction.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>paragraph</code> - a paragraph of text</dd><dd><code>flags</code> - a collection of flags that control the algorithm. The
algorithm understands the flags DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT,
DIRECTION_DEFAULT_LEFT_TO_RIGHT, and DIRECTION_DEFAULT_RIGHT_TO_LEFT.
Other values are reserved.</dd></dl>
</li>
</ul>
<a name="Bidi(java.text.AttributedCharacterIterator)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Bidi</h4>
<pre>public Bidi(<a href="../../java/text/AttributedCharacterIterator.html" title="interface in java.text">AttributedCharacterIterator</a> paragraph)</pre>
<div class="block">Create Bidi from the given paragraph of text.
<p>
The RUN_DIRECTION attribute in the text, if present, determines the base
direction (left-to-right or right-to-left). If not present, the base
direction is computes using the Unicode Bidirectional Algorithm, defaulting to left-to-right
if there are no strong directional characters in the text. This attribute, if
present, must be applied to all the text in the paragraph.
<p>
The BIDI_EMBEDDING attribute in the text, if present, represents embedding level
information. Negative values from -1 to -62 indicate overrides at the absolute value
of the level. Positive values from 1 to 62 indicate embeddings. Where values are
zero or not defined, the base embedding level as determined by the base direction
is assumed.
<p>
The NUMERIC_SHAPING attribute in the text, if present, converts European digits to
other decimal digits before running the bidi algorithm. This attribute, if present,
must be applied to all the text in the paragraph.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>paragraph</code> - a paragraph of text with optional character and paragraph attribute information</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../java/awt/font/TextAttribute.html#BIDI_EMBEDDING"><code>TextAttribute.BIDI_EMBEDDING</code></a>,
<a href="../../java/awt/font/TextAttribute.html#NUMERIC_SHAPING"><code>TextAttribute.NUMERIC_SHAPING</code></a>,
<a href="../../java/awt/font/TextAttribute.html#RUN_DIRECTION"><code>TextAttribute.RUN_DIRECTION</code></a></dd></dl>
</li>
</ul>
<a name="Bidi(char[], int, byte[], int, int, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Bidi</h4>
<pre>public Bidi(char[] text,
int textStart,
byte[] embeddings,
int embStart,
int paragraphLength,
int flags)</pre>
<div class="block">Create Bidi from the given text, embedding, and direction information.
The embeddings array may be null. If present, the values represent embedding level
information. Negative values from -1 to -61 indicate overrides at the absolute value
of the level. Positive values from 1 to 61 indicate embeddings. Where values are
zero, the base embedding level as determined by the base direction is assumed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - an array containing the paragraph of text to process.</dd><dd><code>textStart</code> - the index into the text array of the start of the paragraph.</dd><dd><code>embeddings</code> - an array containing embedding values for each character in the paragraph.
This can be null, in which case it is assumed that there is no external embedding information.</dd><dd><code>embStart</code> - the index into the embedding array of the start of the paragraph.</dd><dd><code>paragraphLength</code> - the length of the paragraph in the text and embeddings arrays.</dd><dd><code>flags</code> - a collection of flags that control the algorithm. The
algorithm understands the flags DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT,
DIRECTION_DEFAULT_LEFT_TO_RIGHT, and DIRECTION_DEFAULT_RIGHT_TO_LEFT.
Other values are reserved.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="createLineBidi(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createLineBidi</h4>
<pre>public <a href="../../java/text/Bidi.html" title="class in java.text">Bidi</a> createLineBidi(int lineStart,
int lineLimit)</pre>
<div class="block">Create a Bidi object representing the bidi information on a line of text within
the paragraph represented by the current Bidi. This call is not required if the
entire paragraph fits on one line.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lineStart</code> - the offset from the start of the paragraph to the start of the line.</dd><dd><code>lineLimit</code> - the offset from the start of the paragraph to the limit of the line.</dd></dl>
</li>
</ul>
<a name="isMixed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isMixed</h4>
<pre>public boolean isMixed()</pre>
<div class="block">Return true if the line is not left-to-right or right-to-left. This means it either has mixed runs of left-to-right
and right-to-left text, or the base direction differs from the direction of the only run of text.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the line is not left-to-right or right-to-left.</dd></dl>
</li>
</ul>
<a name="isLeftToRight()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLeftToRight</h4>
<pre>public boolean isLeftToRight()</pre>
<div class="block">Return true if the line is all left-to-right text and the base direction is left-to-right.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the line is all left-to-right text and the base direction is left-to-right</dd></dl>
</li>
</ul>
<a name="isRightToLeft()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRightToLeft</h4>
<pre>public boolean isRightToLeft()</pre>
<div class="block">Return true if the line is all right-to-left text, and the base direction is right-to-left.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the line is all right-to-left text, and the base direction is right-to-left</dd></dl>
</li>
</ul>
<a name="getLength()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre>public int getLength()</pre>
<div class="block">Return the length of text in the line.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the length of text in the line</dd></dl>
</li>
</ul>
<a name="baseIsLeftToRight()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>baseIsLeftToRight</h4>
<pre>public boolean baseIsLeftToRight()</pre>
<div class="block">Return true if the base direction is left-to-right.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the base direction is left-to-right</dd></dl>
</li>
</ul>
<a name="getBaseLevel()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBaseLevel</h4>
<pre>public int getBaseLevel()</pre>
<div class="block">Return the base level (0 if left-to-right, 1 if right-to-left).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the base level</dd></dl>
</li>
</ul>
<a name="getLevelAt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLevelAt</h4>
<pre>public int getLevelAt(int offset)</pre>
<div class="block">Return the resolved level of the character at offset. If offset is <0 or >=
the length of the line, return the base direction level.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>offset</code> - the index of the character for which to return the level</dd>
<dt><span class="strong">Returns:</span></dt><dd>the resolved level of the character at offset</dd></dl>
</li>
</ul>
<a name="getRunCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunCount</h4>
<pre>public int getRunCount()</pre>
<div class="block">Return the number of level runs.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of level runs</dd></dl>
</li>
</ul>
<a name="getRunLevel(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunLevel</h4>
<pre>public int getRunLevel(int run)</pre>
<div class="block">Return the level of the nth logical run in this line.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>run</code> - the index of the run, between 0 and <code>getRunCount()</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the level of the run</dd></dl>
</li>
</ul>
<a name="getRunStart(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunStart</h4>
<pre>public int getRunStart(int run)</pre>
<div class="block">Return the index of the character at the start of the nth logical run in this line, as
an offset from the start of the line.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>run</code> - the index of the run, between 0 and <code>getRunCount()</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the start of the run</dd></dl>
</li>
</ul>
<a name="getRunLimit(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunLimit</h4>
<pre>public int getRunLimit(int run)</pre>
<div class="block">Return the index of the character past the end of the nth logical run in this line, as
an offset from the start of the line. For example, this will return the length
of the line for the last run on the line.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>run</code> - the index of the run, between 0 and <code>getRunCount()</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>limit the limit of the run</dd></dl>
</li>
</ul>
<a name="requiresBidi(char[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requiresBidi</h4>
<pre>public static boolean requiresBidi(char[] text,
int start,
int limit)</pre>
<div class="block">Return true if the specified text requires bidi analysis. If this returns false,
the text will display left-to-right. Clients can then avoid constructing a Bidi object.
Text in the Arabic Presentation Forms area of Unicode is presumed to already be shaped
and ordered for display, and so will not cause this function to return true.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text containing the characters to test</dd><dd><code>start</code> - the start of the range of characters to test</dd><dd><code>limit</code> - the limit of the range of characters to test</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the range of characters requires bidi analysis</dd></dl>
</li>
</ul>
<a name="reorderVisually(byte[], int, java.lang.Object[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reorderVisually</h4>
<pre>public static void reorderVisually(byte[] levels,
int levelStart,
<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>[] objects,
int objectStart,
int count)</pre>
<div class="block">Reorder the objects in the array into visual order based on their levels.
This is a utility function to use when you have a collection of objects
representing runs of text in logical order, each run containing text
at a single level. The elements at <code>index</code> from
<code>objectStart</code> up to <code>objectStart + count</code>
in the objects array will be reordered into visual order assuming
each run of text has the level indicated by the corresponding element
in the levels array (at <code>index - objectStart + levelStart</code>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>levels</code> - an array representing the bidi level of each object</dd><dd><code>levelStart</code> - the start position in the levels array</dd><dd><code>objects</code> - the array of objects to be reordered into visual order</dd><dd><code>objectStart</code> - the start position in the objects array</dd><dd><code>count</code> - the number of objects to reorder</dd></dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public <a href="../../java/lang/String.html" title="class in java.lang">String</a> toString()</pre>
<div class="block">Display the bidi internal state, used in debugging.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../java/lang/Object.html#toString()">toString</a></code> in class <code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a string representation of the object.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Bidi.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><strong>Java™ Platform<br>Standard Ed. 7</strong></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../java/text/AttributedString.html" title="class in java.text"><span class="strong">Prev Class</span></a></li>
<li><a href="../../java/text/BreakIterator.html" title="class in java.text"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?java/text/Bidi.html" target="_top">Frames</a></li>
<li><a href="Bidi.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size="-1"> <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a> <br>For further API reference and developer documentation, see <a href="http://docs.oracle.com/javase/7/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="../../../legal/cpyr.html">Copyright</a> © 1993, 2014, Oracle and/or its affiliates. All rights reserved. </font></small></p>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。