Code example for Bidi

Methods: getRunCount

0
        astr.addAttribute(TextAttribute.BIDI_EMBEDDING,
                         new Integer(-3),
                         start,
                         limit);
 
        Bidi bidi = new Bidi(astr.getIterator());
 
        if (bidi.getRunCount() != 6) { // runs of spaces and angles at embedding bound,s and final period, each get level 1
            throw new Error("Bidi embedding processing failed");
        } 
    } 
}