Mercurial > projects > dwt-linux
comparison dwt/custom/TableCursor.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | f2e04420fd6c |
children | ce446666f5a2 |
comparison
equal
deleted
inserted
replaced
237:98b80b00af79 | 238:380bad9f6852 |
---|---|
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * Port to the D programming language: | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | 11 * Frank Benoit <benoit@tionex.de> |
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.custom.TableCursor; | 13 module dwt.custom.TableCursor; |
14 | |
15 import dwt.dwthelper.utils; | |
14 | 16 |
15 | 17 |
16 import dwt.DWT; | 18 import dwt.DWT; |
17 import dwt.DWTException; | 19 import dwt.DWTException; |
18 import dwt.events.SelectionEvent; | 20 import dwt.events.SelectionEvent; |
435 Rectangle imageSize = image.getBounds(); | 437 Rectangle imageSize = image.getBounds(); |
436 int imageY = (size.y - imageSize.height) / 2; | 438 int imageY = (size.y - imageSize.height) / 2; |
437 gc.drawImage(image, x, imageY); | 439 gc.drawImage(image, x, imageY); |
438 x += imageSize.width; | 440 x += imageSize.width; |
439 } | 441 } |
440 char[] text = row.getText(columnIndex); | 442 String text = row.getText(columnIndex); |
441 if (text.length > 0) { | 443 if (text.length > 0) { |
442 Rectangle bounds = row.getBounds(columnIndex); | 444 Rectangle bounds = row.getBounds(columnIndex); |
443 Point extent = gc.stringExtent(text); | 445 Point extent = gc.stringExtent(text); |
444 // Temporary code - need a better way to determine table trim | 446 // Temporary code - need a better way to determine table trim |
445 char[] platform = DWT.getPlatform(); | 447 String platform = DWT.getPlatform(); |
446 if ("win32"==platform) { //$NON-NLS-1$ | 448 if ("win32"==platform) { //$NON-NLS-1$ |
447 if (table.getColumnCount() is 0 || columnIndex is 0) { | 449 if (table.getColumnCount() is 0 || columnIndex is 0) { |
448 x += 2; | 450 x += 2; |
449 } else { | 451 } else { |
450 int alignmnent = column.getAlignment(); | 452 int alignmnent = column.getAlignment(); |