|
|
|
|
|
|
|
|
* the character array containing the text |
|
|
* the character array containing the text |
|
|
*/ |
|
|
*/ |
|
|
public char[] ca; |
|
|
public char[] ca; |
|
|
public int start; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* the length of the character array containing the text |
|
|
* the length of the character array containing the text |
|
|
|
|
|
|
|
|
* |
|
|
* |
|
|
* @param chars array of chars which contains the text in this object (may |
|
|
* @param chars array of chars which contains the text in this object (may |
|
|
* be a superset of the text in this object |
|
|
* be a superset of the text in this object |
|
|
* @param s starting index into char[] for the text in this object |
|
|
|
|
|
* @param e ending index into char[] for the text in this object |
|
|
|
|
|
|
|
|
* @param start starting index into char[] for the text in this object |
|
|
|
|
|
* @param end ending index into char[] for the text in this object |
|
|
* @param ti TextInfo object for the text in this object |
|
|
* @param ti TextInfo object for the text in this object |
|
|
* @param parent FONode that is the parent of this object |
|
|
* @param parent FONode that is the parent of this object |
|
|
*/ |
|
|
*/ |
|
|
public FOText(char[] chars, int s, int e, TextInfo ti, FONode parent) { |
|
|
|
|
|
|
|
|
public FOText(char[] chars, int start, int end, TextInfo ti, FONode parent) { |
|
|
super(parent); |
|
|
super(parent); |
|
|
this.start = 0; |
|
|
|
|
|
this.ca = new char[e - s]; |
|
|
|
|
|
System.arraycopy(chars, s, ca, 0, e - s); |
|
|
|
|
|
this.length = e - s; |
|
|
|
|
|
|
|
|
length = end - start; |
|
|
|
|
|
this.ca = new char[length]; |
|
|
|
|
|
System.arraycopy(chars, start, ca, 0, length); |
|
|
textInfo = ti; |
|
|
textInfo = ti; |
|
|
createBlockPointers(); |
|
|
createBlockPointers(); |
|
|
textTransform(); |
|
|
textTransform(); |
|
|
|
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (int i = start; i < start + length; i++) { |
|
|
|
|
|
|
|
|
for (int i = 0; i < length; i++) { |
|
|
char ch = ca[i]; |
|
|
char ch = ca[i]; |
|
|
if (!((ch == ' ') |
|
|
if (!((ch == ' ') |
|
|
|| (ch == '\n') |
|
|
|| (ch == '\n') |