| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final char |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static int[] | computeContiguousOrder(int[] values, int start, int limit)
Compute a contiguous order for the range start, limit. |
| public static int[] | Returns: the contiguous valuesan array containing the discontiguous values values)Return an array containing contiguous values from 0 to length having the same ordering as the source array. |
| public static int[] | Returns: the inverse arraythe source ordering array values)Return the inverse position map. |
| public static int[] | Returns: the normalized mapthe source mapping values, byte[] the levels corresponding to the values levels, int the starting offset in the values and levels arrays start, int the limiting offset in the values and levels arrays limit)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. |
| public static int[] | Returns: the mapping array from visual to logicalthe levels array levels)Given level data, compute a visual to logical mapping. |
| public static void | |
| public static byte[] | |
| public static void | reorderVisually(byte[]
an array representing the bidi level of each object levels, Object[] the array of objects to be reordered into visual order objects)Reorder the objects in the array into visual order based on their levels. |
| NUMLEVELS | back to summary |
|---|---|
| pack-priv static final char NUMLEVELS | |
| BidiUtils | back to summary |
|---|---|
| public BidiUtils() | |
| computeContiguousOrder | back to summary |
|---|---|
| private static int[] computeContiguousOrder(int[] values, int start, int limit) Compute a contiguous order for the range start, limit. | |
| createContiguousOrder | back to summary |
|---|---|
| public static int[] createContiguousOrder(int[] values) 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.
| |
| createInverseMap | back to summary |
|---|---|
| public static int[] createInverseMap(int[] 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
| |
| createNormalizedMap | back to summary |
|---|---|
| public static int[] createNormalizedMap(int[] values, byte[] levels, int start, int limit) 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[].
| |
| createVisualToLogicalMap | back to summary |
|---|---|
| public static int[] createVisualToLogicalMap(byte[] levels) Given level data, compute 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
| |
| getLevels | back to summary |
|---|---|
| public static void getLevels(Bidi bidi, byte[] levels, int start) 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.
| |
| getLevels | back to summary |
|---|---|
| public static byte[] getLevels(Bidi bidi) Return an array containing the resolved bidi level of each character, in logical order.
| |
| reorderVisually | back to summary |
|---|---|
| public static void reorderVisually(byte[] levels, Object[] objects) 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.
| |