Bidi getRunStart Example
Bidi class getRunStart example. This example shows you how to use getRunStart method.
Bidi class getRunStart example. public int getRunStart(int run) 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.
Here is the code
/*
* @ # GetRunStart.java
* A class repersenting use to getRunStart
* method of Bidi class in java.text package
* version 13 June 2008
* author Rose India
*/
import java.text.*;
public class GetRunStart {
public static void main(String[] args) {
String s = "Rose india.net";
char[] ch = s.toCharArray();
byte[] embeddings = {1, 2, 3, 4};
int textStart = 0, embStart = 0, paragraphLength = 4;
int flag = Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT;
Bidi bidi = new Bidi(ch, textStart, embeddings,
embStart, paragraphLength, flag);
System.out.println("run level of bidi " + bidi.getRunStart(1));
}
} |
|