String drawingText = data.drawingText;
if (data.needRedrawingText) {
drawingText = item.getText(index);
- int textWidth = TextSizeUtil.stringExtend(getFont(), drawingText).x;
+ int textWidth = TextSizeUtil.stringExtend(FontResources.ITEM_FONT, drawingText).x;
if (textWidth > (rect.width - itemSize.x - 10)) {
while((textWidth > (rect.width - 10) - TextSizeUtil.OMITLEN)
&& drawingText.length() > 1) {
drawingText = drawingText.substring(0, drawingText.length() - 1);
- textWidth = TextSizeUtil.stringExtend(getFont(), drawingText).x;
+ textWidth = TextSizeUtil.stringExtend(FontResources.ITEM_FONT, drawingText).x;
}
drawingText = drawingText + TextSizeUtil.OMIT;
}
data.needRedrawingText = false;
data.drawingText = drawingText;
- data.drawingTextWidth = TextSizeUtil.stringExtend(getFont(), drawingText).x;
+ data.drawingTextWidth = TextSizeUtil.stringExtend(FontResources.ITEM_FONT, drawingText).x;
}
int spacing = hasItem ? 5 : 0;
switch(item.getParentTable().getColumn(index).getAlignment()) {
case SWT.LEFT:
- itemX += (hasItem ? 5 : 0);
+ itemX += 5;
textX += itemX + itemSize.x + spacing;
break;
case SWT.RIGHT: