use of bndtools.editor.contents.DescriptionDeveloperPart in project bndtools by bndtools.
the class BundleDescriptionPage method createFormContent.
@Override
protected void createFormContent(IManagedForm managedForm) {
FormToolkit toolkit = managedForm.getToolkit();
managedForm.setInput(model);
ScrolledForm scrolledForm = managedForm.getForm();
scrolledForm.setText("Bundle Description");
Form form = scrolledForm.getForm();
toolkit.decorateFormHeading(form);
form.addMessageHyperlinkListener(new MessageHyperlinkAdapter(getEditor()));
Composite body = form.getBody();
greyTitleBarColour = new Color(body.getDisplay(), 210, 245, 210);
// Create controls
MDSashForm sashForm = new MDSashForm(body, SWT.HORIZONTAL, managedForm);
sashForm.setSashWidth(2);
toolkit.adapt(sashForm, false, false);
Composite leftPanel = toolkit.createComposite(sashForm);
DescriptionBundlePart infoPart = new DescriptionBundlePart(leftPanel, toolkit, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
managedForm.addPart(infoPart);
DescriptionRightsPart rightsPart = new DescriptionRightsPart(leftPanel, toolkit, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
managedForm.addPart(rightsPart);
DescriptionVendorPart vendorPart = new DescriptionVendorPart(leftPanel, toolkit, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
managedForm.addPart(vendorPart);
DescriptionDeveloperPart developerPart = new DescriptionDeveloperPart(leftPanel, toolkit, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
managedForm.addPart(developerPart);
// LAYOUT
GridData gd;
GridLayout layout;
layout = new GridLayout(1, false);
leftPanel.setLayout(layout);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
infoPart.getSection().setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
rightsPart.getSection().setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
vendorPart.getSection().setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
developerPart.getSection().setLayoutData(gd);
sashForm.hookResizeListener();
// Layout
body.setLayout(new FillLayout());
}
Aggregations