Mercurial > projects > dwt-addons
comparison dwtx/jface/internal/text/TableOwnerDrawSupport.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | a9566845f1cb |
children | c3583c6ec027 |
comparison
equal
deleted
inserted
replaced
161:f8d52b926852 | 162:1a5b8f8129df |
---|---|
59 * @param item table item | 59 * @param item table item |
60 * @param column the column index | 60 * @param column the column index |
61 * @param ranges the styled ranges or <code>null</code> to remove them | 61 * @param ranges the styled ranges or <code>null</code> to remove them |
62 */ | 62 */ |
63 public static void storeStyleRanges(TableItem item, int column, StyleRange[] ranges) { | 63 public static void storeStyleRanges(TableItem item, int column, StyleRange[] ranges) { |
64 item.setData(STYLED_RANGES_KEY + column, ranges); | 64 item.setData(STYLED_RANGES_KEY ~ Integer.toString(column), new ArrayWrapperObject(arraycast!(Object)(ranges))); |
65 } | 65 } |
66 | 66 |
67 /** | 67 /** |
68 * Returns the styled ranges which are stored in the given table item. | 68 * Returns the styled ranges which are stored in the given table item. |
69 * | 69 * |
70 * @param item table item | 70 * @param item table item |
71 * @param column the column index | 71 * @param column the column index |
72 * @return the styled ranges | 72 * @return the styled ranges |
73 */ | 73 */ |
74 private static StyleRange[] getStyledRanges(TableItem item, int column) { | 74 private static StyleRange[] getStyledRanges(TableItem item, int column) { |
75 return arraycast!(StyleRange)(item.getData(STYLED_RANGES_KEY + column)); | 75 return arrayFromObject!(StyleRange)(item.getData(STYLED_RANGES_KEY ~ Integer.toString(column))); |
76 } | 76 } |
77 | 77 |
78 private this(Table table) { | 78 private this(Table table) { |
79 int orientation= table.getStyle() & (DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT); | 79 int orientation= table.getStyle() & (DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT); |
80 fLayout= new TextLayout(table.getDisplay()); | 80 fLayout= new TextLayout(table.getDisplay()); |