Bidi getBaseLevel Example

Bidi class getBaseLevel example. This example shows you how to use getBaseLevel method.


Bidi class getBaseLevel example. public int getBaseLevel() Return the base level (0 if left-to-right, 1 if right-to-left).

Here is the code
/*
 * @ # GetBaseLevel.java
 * A class repersenting use to getBaseLevel 
 * method of Bidi class in java.text package
 * version 13 June 2008
 * author Rose India 
 */

import java.text.*;

public class GetBaseLevel {

    public static void main(String[] args) {

        String s = "Rose india.net";
        char[] ch = s.toCharArray();
        byte[] embeddings = {1234};
        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("BaseLevel " + bidi.getBaseLevel());
    }
}

Output
BaseLevel 0

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US