protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { Point topSize = contextHelpPart.getControl().computeSize(wHint, hHint, flushCache); Point botSize = dynamicHelpPart.getControl().computeSize(wHint, hHint, flushCache); Point size = new Point(0, 0); size.x = Math.max(topSize.x, botSize.x); size.y = VSPACE + topSize.y + VSPACE + botSize.y; return size; }
protected void layout(Composite composite, boolean flushCache) { Rectangle carea = composite.getClientArea(); Point topSize = contextHelpPart.getControl().computeSize( carea.width, SWT.DEFAULT, flushCache); Point botSize = dynamicHelpPart.getControl().computeSize( carea.width, SWT.DEFAULT, flushCache); int y = VSPACE; contextHelpPart.getControl().setBounds(0, y, carea.width, topSize.y); y += topSize.y + VSPACE; dynamicHelpPart.getControl().setBounds(0, y, carea.width, botSize.y); }