@Override protected final void createClient(Composite parent) { // ugly HACK to make subclasses work FlatFormLayout layout = new FlatFormLayout(); layout.marginHeight = layout.marginWidth = 0; parent.setLayout(layout); createClient2(parent); }
/** * Override this method. Call this version if the subclass wants its own composite with margin and * black border. */ protected void createClient2(Composite parent) { if (isDefaultCompositeOpaque()) { fComposite = fWidgetFactory.createPlainComposite(parent, SWT.NONE); } else { fComposite = fWidgetFactory.createComposite(parent); } FlatFormLayout layout = new FlatFormLayout(); layout.marginWidth = 0; // IDetailsAreaConstants.HMARGIN; layout.marginHeight = 0; // IDetailsAreaConstants.VMARGIN; fComposite.setLayout(layout); FlatFormData data = new FlatFormData(); data.left = new FlatFormAttachment(0, 0); data.right = new FlatFormAttachment(100, 0); data.top = new FlatFormAttachment(0, 0); data.bottom = new FlatFormAttachment(100, 0); // data.borderType = IBorderConstants.BORDER_1P1_BLACK; fComposite.setLayoutData(data); }