Search in sources :

Example 1 with DescriptionDeveloperPart

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());
}
Also used : DescriptionDeveloperPart(bndtools.editor.contents.DescriptionDeveloperPart) MessageHyperlinkAdapter(bndtools.utils.MessageHyperlinkAdapter) FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) Composite(org.eclipse.swt.widgets.Composite) MDSashForm(bndtools.editor.common.MDSashForm) DescriptionBundlePart(bndtools.editor.contents.DescriptionBundlePart) IManagedForm(org.eclipse.ui.forms.IManagedForm) Form(org.eclipse.ui.forms.widgets.Form) ScrolledForm(org.eclipse.ui.forms.widgets.ScrolledForm) MDSashForm(bndtools.editor.common.MDSashForm) Color(org.eclipse.swt.graphics.Color) FillLayout(org.eclipse.swt.layout.FillLayout) DescriptionRightsPart(bndtools.editor.contents.DescriptionRightsPart) GridLayout(org.eclipse.swt.layout.GridLayout) ScrolledForm(org.eclipse.ui.forms.widgets.ScrolledForm) DescriptionVendorPart(bndtools.editor.contents.DescriptionVendorPart) GridData(org.eclipse.swt.layout.GridData)

Aggregations

MDSashForm (bndtools.editor.common.MDSashForm)1 DescriptionBundlePart (bndtools.editor.contents.DescriptionBundlePart)1 DescriptionDeveloperPart (bndtools.editor.contents.DescriptionDeveloperPart)1 DescriptionRightsPart (bndtools.editor.contents.DescriptionRightsPart)1 DescriptionVendorPart (bndtools.editor.contents.DescriptionVendorPart)1 MessageHyperlinkAdapter (bndtools.utils.MessageHyperlinkAdapter)1 Color (org.eclipse.swt.graphics.Color)1 FillLayout (org.eclipse.swt.layout.FillLayout)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 IManagedForm (org.eclipse.ui.forms.IManagedForm)1 Form (org.eclipse.ui.forms.widgets.Form)1 FormToolkit (org.eclipse.ui.forms.widgets.FormToolkit)1 ScrolledForm (org.eclipse.ui.forms.widgets.ScrolledForm)1