FileDocCategorySizeDatePackage
VerticalAligner.javaAPI DocAzureus 3.0.3.42328Thu Jan 11 11:53:52 GMT 2007org.gudy.azureus2.ui.swt.views.utils

VerticalAligner

public class VerticalAligner extends Object
Workaround Eclipse Bug Bug 42416 "[Platform Inconsistency] GC(Table) has wrong origin" Fixed in ~3226

Fields Summary
private static boolean
bFixGTKBug
Constructors Summary
Methods Summary
public static intgetTableAdjustHorizontallyBy(org.eclipse.swt.widgets.Table t)

		if (!bFixGTKBug || t == null || t.isDisposed())
			return 0;
		ScrollBar sb = t.getHorizontalBar();
		if (sb == null)
			return 0;
		return sb.getSelection();
	
public static intgetTableAdjustVerticalBy(org.eclipse.swt.widgets.Table t)

		COConfigurationManager.addAndFireParameterListener("SWT_bGTKTableBug",
				new ParameterListener() {
					public void parameterChanged(String parameterName) {
						// some people switch from motif to gtk & back again, so make this
						// only apply to GTK, even if it was enabled prior
						bFixGTKBug = COConfigurationManager
								.getBooleanParameter("SWT_bGTKTableBug")
								&& Utils.isGTK && SWT.getVersion() < 3226;
					}
				});
	
		if (!bFixGTKBug || t == null || t.isDisposed())
			return 0;
		return -t.getHeaderHeight();