1 11 package org.eclipse.ui.forms.widgets; 12 import org.eclipse.swt.graphics.Point; 13 import org.eclipse.swt.widgets.*; 14 22 class LayoutComposite extends Composite { 23 public LayoutComposite(Composite parent, int style) { 24 super(parent, style); 25 setMenu(parent.getMenu()); 26 } 27 public Point computeSize(int wHint, int hHint, boolean changed) { 28 Layout layout = getLayout(); 29 if (layout instanceof TableWrapLayout) 30 return ((TableWrapLayout) layout).computeSize(this, wHint, hHint, 31 changed); 32 if (layout instanceof ColumnLayout) 33 return ((ColumnLayout) layout).computeSize(this, wHint, hHint, 34 changed); 35 return super.computeSize(wHint, hHint, changed); 36 } 37 } 38 | Popular Tags |