Lines Matching refs:levels

45      * Return the level of each character into the levels array starting at start.
46 * This is a convenience method for clients who prefer to use an explicit levels
49 * @param levels the array to receive the character levels
52 * <code>start + getLength()</code> is greater than <code>levels.length</code>.
54 public static void getLevels(Bidi bidi, byte[] levels, int start) {
57 if (start < 0 || limit > levels.length) {
58 throw new IndexOutOfBoundsException("levels.length = " + levels.length +
69 levels[p++] = rlevel;
79 byte[] levels = new byte[bidi.getLength()];
80 getLevels(bidi, levels, 0);
81 return levels;
91 * @param levels the levels array
94 public static int[] createVisualToLogicalMap(byte[] levels) {
95 int len = levels.length;
101 // initialize mapping and levels
106 byte level = levels[i];
119 while (i < len && levels[i] < highestLevel) {
124 if (begin == levels.length) {
128 while (i < len && levels[i] >= highestLevel) {
243 * generated from levels[].
245 * @param levels the levels corresponding to the values
246 * @param start the starting offset in the values and levels arrays
247 * @param limit the limiting offset in the values and levels arrays
250 public static int[] createNormalizedMap(int[] values, byte[] levels,
255 // levels optimization
259 if (levels == null) {
265 if (levels[start] == levels[limit-1]) {
266 primaryLevel = levels[start];
269 // scan for levels below primary
272 if (levels[i] < primaryLevel) {
276 canonical = levels[i] == primaryLevel;
329 * Reorder the objects in the array into visual order based on their levels.
334 * by the corresponding element in the levels array.
335 * @param levels an array representing the bidi level of each object
338 public static void reorderVisually(byte[] levels, Object[] objects) {
339 int len = levels.length;
344 // initialize mapping and levels
347 byte level = levels[i];
360 while (i < len && levels[i] < highestLevel) {
365 if (begin == levels.length) {
369 while (i < len && levels[i] >= highestLevel) {