Project: Eclipse_Platform_UI
Bug 56593 TableItem.setFont() causes cels to be rendered with ellipsis even when they aren't necessary
Reported: 2004-03-29 11:23:08 | Status: resolved fixed

M8 See the following example and note that the second table (with the fonts set) has ellipis even when there is plenty of space. /** * @since 3.0 */ public class TableItemTest { public static void main(String [] argv) { final Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Table t = new Table(shell, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); TableItem i = new TableItem(t, SWT.NONE); i.setText("Good table item 1"); i = new TableItem(t, SWT.NONE); i.setText("Good table item 2"); i = new TableItem(t, SWT.NONE); i.setText("Good table item 3"); Font f = new Font(shell.getDisplay(), "Courier New", 8, SWT.NORMAL); t = new Table(shell, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); i = new TableItem(t, SWT.NONE); i.setText("Bad table item 1"); i.setFont(f); i = new TableItem(t, SWT.NONE); i.setText("Bad table item 2"); i.setFont(f); i = new TableItem(t, SWT.NONE); i.setText("Bad table item 3"); i.setFont(f); shell.pack(); shell.open(); shell.redraw(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java