|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.util.alg.Bidi
An incomplete implementation of the Bidirectional algorithm. This is the way it should be used: First, find out which character set is used. Constants for this are int the CharIO class. Create a Bidi using the createBidi() method. Call getChars() or getString() to get the rearranged text. Note that the resulting characters should be drawn one by one, DO NOT leave it to the subsystem to find out if it should rearrange the letters. Known bugs relating to the HTML 4 pilot: - If more than one text element are on the same line, they will be drawn LTR. - In combo boxes, the drawing of the characters is left to the subsystem, so it depends on the platform whether the rendering is correct.
| Field Summary | |
protected char[] |
buf
|
protected int |
endPos
|
protected int |
id
|
protected int |
startPos
|
| Constructor Summary | |
protected |
Bidi(int id,
char[] buf,
int pos1,
int pos2)
|
| Method Summary | |
static Bidi |
createBidi(int id,
char[] buf,
int pos1,
int pos2)
Creates an instance of the Bidi class. |
char[] |
getChars()
Returns the rearranged character buffer. |
String |
getString()
Returns a String representing the rearranged character buffer. |
protected StringBuffer |
getStringBuffer()
|
protected char |
mirror(char c)
|
protected void |
reset()
|
void |
setChars(char[] buf,
int pos1,
int pos2)
Updates the character buffer of the Bidi instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected char[] buf
protected int startPos
protected int endPos
protected int id
| Constructor Detail |
protected Bidi(int id,
char[] buf,
int pos1,
int pos2)
| Method Detail |
public static Bidi createBidi(int id,
char[] buf,
int pos1,
int pos2)
id - An integer specifying the preferred character set of the Bidi.buf - The character buffer to rearrange.pos1 - The first position in the buffer.pos2 - The position after the last position in the buffer.
public void setChars(char[] buf,
int pos1,
int pos2)
buf - The new character buffer to rearrange.pos1 - The first position in the buffer.pos2 - The position after the last position in the buffer.public char[] getChars()
public String getString()
protected void reset()
protected StringBuffer getStringBuffer()
protected char mirror(char c)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||