forked from bjmashibing/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBidi.html
More file actions
908 lines (908 loc) · 37.4 KB
/
Bidi.html
File metadata and controls
908 lines (908 loc) · 37.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Bidi (Java SE 12 & JDK 12 )</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Bidi (Java SE 12 & JDK 12 )";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":9,"i13":9,"i14":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="../../module-summary.html">Module</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"><div style="margin-top: 14px;"><strong>Java SE 12 & JDK 12</strong> </div></div>
</div>
<div class="subNav">
<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>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="moduleLabelInType">Module</span> <a href="../../module-summary.html">java.base</a></div>
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">java.text</a></div>
<h2 title="Class Bidi" class="title">Class Bidi</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="../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>
<pre>public final class <span class="typeNameLabel">Bidi</span>
extends <a href="../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="simpleTagLabel">Since:</span></dt>
<dd>1.4</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<div class="memberSummary">
<table>
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DIRECTION_DEFAULT_LEFT_TO_RIGHT">DIRECTION_DEFAULT_LEFT_TO_RIGHT</a></span></code></th>
<td class="colLast">
<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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DIRECTION_DEFAULT_RIGHT_TO_LEFT">DIRECTION_DEFAULT_RIGHT_TO_LEFT</a></span></code></th>
<td class="colLast">
<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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DIRECTION_LEFT_TO_RIGHT">DIRECTION_LEFT_TO_RIGHT</a></span></code></th>
<td class="colLast">
<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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DIRECTION_RIGHT_TO_LEFT">DIRECTION_RIGHT_TO_LEFT</a></span></code></th>
<td class="colLast">
<div class="block">Constant indicating base direction is right-to-left.</div>
</td>
</tr>
</tbody>
</table>
</div>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(char%5B%5D,int,byte%5B%5D,int,int,int)">Bidi</a></span>​(char[] text,
int textStart,
byte[] embeddings,
int embStart,
int paragraphLength,
int flags)</code></th>
<td class="colLast">
<div class="block">Create Bidi from the given text, embedding, and direction information.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String,int)">Bidi</a></span>​(<a href="../lang/String.html" title="class in java.lang">String</a> paragraph,
int flags)</code></th>
<td class="colLast">
<div class="block">Create Bidi from the given paragraph of text and base direction.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.text.AttributedCharacterIterator)">Bidi</a></span>​(<a href="AttributedCharacterIterator.html" title="interface in java.text">AttributedCharacterIterator</a> paragraph)</code></th>
<td class="colLast">
<div class="block">Create Bidi from the given paragraph of text.</div>
</td>
</tr>
</tbody>
</table>
</div>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="tableTab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#baseIsLeftToRight()">baseIsLeftToRight</a></span>()</code></th>
<td class="colLast">
<div class="block">Return true if the base direction is left-to-right.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="Bidi.html" title="class in java.text">Bidi</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createLineBidi(int,int)">createLineBidi</a></span>​(int lineStart,
int lineLimit)</code></th>
<td class="colLast">
<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" id="i2">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBaseLevel()">getBaseLevel</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the base level (0 if left-to-right, 1 if right-to-left).</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLength()">getLength</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the length of text in the line.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLevelAt(int)">getLevelAt</a></span>​(int offset)</code></th>
<td class="colLast">
<div class="block">Return the resolved level of the character at offset.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRunCount()">getRunCount</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the number of level runs.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRunLevel(int)">getRunLevel</a></span>​(int run)</code></th>
<td class="colLast">
<div class="block">Return the level of the nth logical run in this line.</div>
</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRunLimit(int)">getRunLimit</a></span>​(int run)</code></th>
<td class="colLast">
<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" id="i8">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRunStart(int)">getRunStart</a></span>​(int run)</code></th>
<td class="colLast">
<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" id="i9">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLeftToRight()">isLeftToRight</a></span>()</code></th>
<td class="colLast">
<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" id="i10">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isMixed()">isMixed</a></span>()</code></th>
<td class="colLast">
<div class="block">Return true if the line is not left-to-right or right-to-left.</div>
</td>
</tr>
<tr class="rowColor" id="i11">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isRightToLeft()">isRightToLeft</a></span>()</code></th>
<td class="colLast">
<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" id="i12">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reorderVisually(byte%5B%5D,int,java.lang.Object%5B%5D,int,int)">reorderVisually</a></span>​(byte[] levels,
int levelStart,
<a href="../lang/Object.html" title="class in java.lang">Object</a>[] objects,
int objectStart,
int count)</code></th>
<td class="colLast">
<div class="block">Reorder the objects in the array into visual order based on their levels.</div>
</td>
</tr>
<tr class="rowColor" id="i13">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#requiresBidi(char%5B%5D,int,int)">requiresBidi</a></span>​(char[] text,
int start,
int limit)</code></th>
<td class="colLast">
<div class="block">Return true if the specified text requires bidi analysis.</div>
</td>
</tr>
<tr class="altColor" id="i14">
<td class="colFirst"><code><a href="../lang/String.html" title="class in java.lang">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Display the bidi internal state, used in debugging.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods declared in class java.lang.<a href="../lang/Object.html" title="class in java.lang">Object</a></h3>
<code><a href="../lang/Object.html#clone()">clone</a>, <a href="../lang/Object.html#equals(java.lang.Object)">equals</a>, <a href="../lang/Object.html#finalize()">finalize</a>, <a href="../lang/Object.html#getClass()">getClass</a>, <a href="../lang/Object.html#hashCode()">hashCode</a>, <a href="../lang/Object.html#notify()">notify</a>, <a href="../lang/Object.html#notifyAll()">notifyAll</a>, <a href="../lang/Object.html#wait()">wait</a>, <a href="../lang/Object.html#wait(long)">wait</a>, <a href="../lang/Object.html#wait(long,int)">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="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="seeLabel">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 id="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="seeLabel">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 id="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="seeLabel">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 id="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="seeLabel">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>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="<init>(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Bidi</h4>
<pre>public Bidi​(<a href="../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="paramLabel">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 id="<init>(java.text.AttributedCharacterIterator)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Bidi</h4>
<pre>public Bidi​(<a href="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="paramLabel">Parameters:</span></dt>
<dd><code>paragraph</code> - a paragraph of text with optional character and paragraph attribute information</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../java.desktop/java/awt/font/TextAttribute.html#BIDI_EMBEDDING"><code>TextAttribute.BIDI_EMBEDDING</code></a>,
<a href="../../../java.desktop/java/awt/font/TextAttribute.html#NUMERIC_SHAPING"><code>TextAttribute.NUMERIC_SHAPING</code></a>,
<a href="../../../java.desktop/java/awt/font/TextAttribute.html#RUN_DIRECTION"><code>TextAttribute.RUN_DIRECTION</code></a></dd>
</dl>
</li>
</ul>
<a id="<init>(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="paramLabel">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>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="createLineBidi(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createLineBidi</h4>
<pre class="methodSignature">public <a href="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="paramLabel">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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>Bidi</code> object</dd>
</dl>
</li>
</ul>
<a id="isMixed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isMixed</h4>
<pre class="methodSignature">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="returnLabel">Returns:</span></dt>
<dd>true if the line is not left-to-right or right-to-left.</dd>
</dl>
</li>
</ul>
<a id="isLeftToRight()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLeftToRight</h4>
<pre class="methodSignature">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="returnLabel">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 id="isRightToLeft()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRightToLeft</h4>
<pre class="methodSignature">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="returnLabel">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 id="getLength()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre class="methodSignature">public int getLength()</pre>
<div class="block">Return the length of text in the line.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the length of text in the line</dd>
</dl>
</li>
</ul>
<a id="baseIsLeftToRight()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>baseIsLeftToRight</h4>
<pre class="methodSignature">public boolean baseIsLeftToRight()</pre>
<div class="block">Return true if the base direction is left-to-right.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the base direction is left-to-right</dd>
</dl>
</li>
</ul>
<a id="getBaseLevel()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBaseLevel</h4>
<pre class="methodSignature">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="returnLabel">Returns:</span></dt>
<dd>the base level</dd>
</dl>
</li>
</ul>
<a id="getLevelAt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLevelAt</h4>
<pre class="methodSignature">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="paramLabel">Parameters:</span></dt>
<dd><code>offset</code> - the index of the character for which to return the level</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resolved level of the character at offset</dd>
</dl>
</li>
</ul>
<a id="getRunCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunCount</h4>
<pre class="methodSignature">public int getRunCount()</pre>
<div class="block">Return the number of level runs.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of level runs</dd>
</dl>
</li>
</ul>
<a id="getRunLevel(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunLevel</h4>
<pre class="methodSignature">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="paramLabel">Parameters:</span></dt>
<dd><code>run</code> - the index of the run, between 0 and <code>getRunCount()</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the level of the run</dd>
</dl>
</li>
</ul>
<a id="getRunStart(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunStart</h4>
<pre class="methodSignature">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="paramLabel">Parameters:</span></dt>
<dd><code>run</code> - the index of the run, between 0 and <code>getRunCount()</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the start of the run</dd>
</dl>
</li>
</ul>
<a id="getRunLimit(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRunLimit</h4>
<pre class="methodSignature">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="paramLabel">Parameters:</span></dt>
<dd><code>run</code> - the index of the run, between 0 and <code>getRunCount()</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>limit the limit of the run</dd>
</dl>
</li>
</ul>
<a id="requiresBidi(char[],int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requiresBidi</h4>
<pre class="methodSignature">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="paramLabel">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="returnLabel">Returns:</span></dt>
<dd>true if the range of characters requires bidi analysis</dd>
</dl>
</li>
</ul>
<a id="reorderVisually(byte[],int,java.lang.Object[],int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reorderVisually</h4>
<pre class="methodSignature">public static void reorderVisually​(byte[] levels,
int levelStart,
<a href="../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="paramLabel">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 id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public <a href="../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><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../lang/Object.html#toString()">toString</a></code> in class <code><a href="../lang/Object.html" title="class in java.lang">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of the object.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="../../module-summary.html">Module</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"><div style="margin-top: 14px;"><strong>Java SE 12 & JDK 12</strong> </div></div>
</div>
<div class="subNav">
<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>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small><a href="https://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> For further API reference and developer documentation see the <a href="https://docs.oracle.com/pls/topic/lookup?ctx=javase12.0.2&id=homepage" target="_blank">Java SE Documentation</a>, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.<br> <a href="../../../../legal/copyright.html">Copyright</a> © 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.<br>All rights reserved. Use is subject to <a href="https://www.oracle.com/technetwork/java/javase/terms/license/java12.0.2speclicense.html">license terms</a> and the <a href="https://www.oracle.com/technetwork/java/redist-137594.html">documentation redistribution policy</a>. <!-- Version 12.0.2+10 --></small></p>
</footer>
</body>
</html>