(int column, int row)
| 290 | } |
| 291 | |
| 292 | synchronized char[] getChars(int column, int row) { |
| 293 | if (vData==null) |
| 294 | return null; |
| 295 | if (row>=vData.size()) |
| 296 | return null; |
| 297 | char[] chars = row>=0&&row<vData.size()?(char[])(vData.elementAt(row)):null; |
| 298 | if (chars==null || chars.length==0) |
| 299 | return null; |
| 300 | |
| 301 | if (iColCount==1) |
| 302 | return chars; |
| 303 | |
| 304 | int start = 0; |
| 305 | int tabs = 0; |
| 306 | int length = chars.length; |
| 307 | |
| 308 | while (column>tabs) { |
| 309 | if (chars[start]=='\t') |
| 310 | tabs++; |
| 311 | start++; |
| 312 | if (start>=length) |
| 313 | return null; |
| 314 | }; |
| 315 | if (start<0 || start>=chars.length) { |
| 316 | System.out.println("start="+start+", chars.length="+chars.length); |
| 317 | return null; |
| 318 | } |
| 319 | if (chars[start]=='\t') |
| 320 | return null; |
| 321 | |
| 322 | int end = start; |
| 323 | while (chars[end]!='\t' && end<(length-1)) |
| 324 | end++; |
| 325 | if (chars[end]=='\t') |
| 326 | end--; |
| 327 | |
| 328 | char[] chars2 = new char[end-start+1]; |
| 329 | for (int i=0,j=start; i<chars2.length; i++,j++) { |
| 330 | chars2[i] = chars[j]; |
| 331 | } |
| 332 | return chars2; |
| 333 | } |
| 334 | |
| 335 | synchronized void adjustVScroll() { |
| 336 | if(iRowHeight==0) return; |
no test coverage detected