Bidi createLineBidi Example

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


Bidi class createLineBidi example. public Bidi createLineBidi(int lineStart, int lineLimit) Create a Bidi object representing the bidi information on a line of text within the paragraph represented by the current Bidi. This call is not required if the entire paragraph fits on one line.

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

import java.text.*;

public class CreateLineBidi {

    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);

        Bidi bidi1 = bidi.createLineBidi(14);

        System.out.println("Length of bidi  " + bidi.getLength());
        System.out.println("Length of bidi1 " + bidi1.getLength());
    }
}

Output
Length of bidi  4
Length of bidi1 3

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

HOME | COPYRIGHT | CONTACT US