java.lang.Object | |
↳ | sun.font.BidiUtils |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return an array containing contiguous values from 0 to length
having the same ordering as the source array.
| |||||||||||
Return the inverse position map.
| |||||||||||
Return an array containing the data in the values array from start up to limit,
normalized to fall within the range from 0 up to limit - start.
| |||||||||||
Given level data, compute a a visual to logical mapping.
| |||||||||||
Return an array containing the resolved bidi level of each character, in logical order.
| |||||||||||
Return the level of each character into the levels array starting at start.
| |||||||||||
Reorder the objects in the array into visual order based on their levels.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Return an array containing contiguous values from 0 to length having the same ordering as the source array. If this would be a canonical ltr ordering, return null. The data in values[] is NOT required to be a permutation, but elements in values are required to be distinct.
values | an array containing the discontiguous values |
---|
Return the inverse position map. The source array must map one-to-one (each value
is distinct and the values run from zero to the length of the array minus one).
For example, if values[i] = j
, then inverse[j] = i
.
values | the source ordering array |
---|
Return an array containing the data in the values array from start up to limit, normalized to fall within the range from 0 up to limit - start. If this would be a canonical ltr ordering, return null. NOTE: This method assumes that values[] is a logical to visual map generated from levels[].
values | the source mapping |
---|---|
levels | the levels corresponding to the values |
start | the starting offset in the values and levels arrays |
limit | the limiting offset in the values and levels arrays |
Given level data, compute a a visual to logical mapping.
The leftmost (or topmost) character is at visual index zero. The
logical index of the character is derived from the visual index
by the expression li = map[vi];
.
levels | the levels array |
---|
Return an array containing the resolved bidi level of each character, in logical order.
Return the level of each character into the levels array starting at start. This is a convenience method for clients who prefer to use an explicit levels array instead of iterating over the runs.
levels | the array to receive the character levels |
---|---|
start | the starting offset into the the array |
IndexOutOfBoundsException | if start is less than 0 or
start + getLength() is greater than levels.length .
|
---|
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 in the objects array will be reordered into visual order assuming each run of text has the level provided by the corresponding element in the levels array.
levels | an array representing the bidi level of each object |
---|---|
objects | the array of objects to be reordered into visual order |