Search in sources :

Example 6 with MessageHyperlinkAdapter

use of bndtools.utils.MessageHyperlinkAdapter 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, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
    managedForm.addPart(infoPart);
    DescriptionRightsPart rightsPart = new DescriptionRightsPart(leftPanel, toolkit, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
    managedForm.addPart(rightsPart);
    DescriptionVendorPart vendorPart = new DescriptionVendorPart(leftPanel, toolkit, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
    managedForm.addPart(vendorPart);
    DescriptionDeveloperPart developerPart = new DescriptionDeveloperPart(leftPanel, toolkit, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.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) ExpandableComposite(org.eclipse.ui.forms.widgets.ExpandableComposite) 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

MessageHyperlinkAdapter (bndtools.utils.MessageHyperlinkAdapter)6 Composite (org.eclipse.swt.widgets.Composite)6 ExpandableComposite (org.eclipse.ui.forms.widgets.ExpandableComposite)6 FormToolkit (org.eclipse.ui.forms.widgets.FormToolkit)6 ScrolledForm (org.eclipse.ui.forms.widgets.ScrolledForm)6 MDSashForm (bndtools.editor.common.MDSashForm)5 FillLayout (org.eclipse.swt.layout.FillLayout)5 GridLayout (org.eclipse.swt.layout.GridLayout)5 GridData (org.eclipse.swt.layout.GridData)4 IManagedForm (org.eclipse.ui.forms.IManagedForm)2 Form (org.eclipse.ui.forms.widgets.Form)2 SaneDetailsPart (bndtools.editor.common.SaneDetailsPart)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 TestSuitesPart (bndtools.editor.contents.TestSuitesPart)1 AvailableBundlesPart (bndtools.editor.project.AvailableBundlesPart)1 BuildOperationsPart (bndtools.editor.project.BuildOperationsPart)1 BuildPathPart (bndtools.editor.project.BuildPathPart)1