Search in sources :

Example 6 with ColumnLayout

use of org.eclipse.ui.forms.widgets.ColumnLayout in project hale by halestudio.

the class MismatchDetailsPage method createContents.

/* (non-Javadoc)
	 * @see org.eclipse.ui.forms.IDetailsPage#createContents(org.eclipse.swt.widgets.Composite)
	 */
@Override
public void createContents(Composite parent) {
    ColumnLayout layout = new ColumnLayout();
    layout.topMargin = 5;
    layout.leftMargin = 5;
    layout.rightMargin = 2;
    layout.bottomMargin = 2;
    layout.minNumColumns = 3;
    layout.maxNumColumns = 3;
    parent.setLayout(layout);
    overviewForm.setText("Mismatch Overview");
    overviewForm.getBody().setLayout(layout);
    this.createMismatchSection(parent);
    this.createReasonSection(parent);
    this.createConsequenceSection(parent);
}
Also used : ColumnLayout(org.eclipse.ui.forms.widgets.ColumnLayout)

Example 7 with ColumnLayout

use of org.eclipse.ui.forms.widgets.ColumnLayout in project linuxtools by eclipse.

the class MatchFilterWizardPage method createControl.

@Override
public void createControl(Composite parent) {
    super.createControl(parent);
    Composite comp = new Composite(parent, SWT.NULL);
    comp.setLayout(new FormLayout());
    FormData data1 = new FormData();
    data1.left = new FormAttachment(0, 0);
    data1.top = new FormAttachment(0, 0);
    data1.right = new FormAttachment(40, 0);
    data1.bottom = new FormAttachment(100, 0);
    Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
    cmpFilterOpts.setLayoutData(data1);
    ColumnLayout colLayout = new ColumnLayout();
    colLayout.maxNumColumns = 1;
    cmpFilterOpts.setLayout(colLayout);
    // Column
    Label lblColumn = new Label(cmpFilterOpts, SWT.NONE);
    // $NON-NLS-1$
    lblColumn.setText(Localization.getString("MatchFilterWizardPage.Column"));
    cboColumn = new Combo(cmpFilterOpts, SWT.DROP_DOWN | SWT.READ_ONLY);
    cboColumn.addSelectionListener(selectionListener);
    for (String serie : wizard.series) {
        cboColumn.add(serie);
    }
    // Spacer
    new Label(cmpFilterOpts, SWT.NONE);
    // String to compare to
    Label lblCompare = new Label(cmpFilterOpts, SWT.NONE);
    // $NON-NLS-1$
    lblCompare.setText(Localization.getString("MatchFilterWizardPage.CompareTo"));
    txtCompare = new Text(cmpFilterOpts, SWT.BORDER);
    txtCompare.addModifyListener(modifyListener);
    // Spacer
    new Label(cmpFilterOpts, SWT.NONE);
    // Style
    radKeepMatch = new Button(cmpFilterOpts, SWT.RADIO);
    // $NON-NLS-1$
    radKeepMatch.setText(Localization.getString("MatchFilterWizardPage.KeepMatching"));
    radKeepMatch.addSelectionListener(selectionListener);
    radKeepMatch.setSelection(true);
    radRemoveMatch = new Button(cmpFilterOpts, SWT.RADIO);
    // $NON-NLS-1$
    radRemoveMatch.setText(Localization.getString("MatchFilterWizardPage.RemoveMatching"));
    radRemoveMatch.addSelectionListener(selectionListener);
    cboColumn.select(0);
    createFilter();
    setControl(comp);
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) ColumnLayout(org.eclipse.ui.forms.widgets.ColumnLayout) Label(org.eclipse.swt.widgets.Label) Combo(org.eclipse.swt.widgets.Combo) Text(org.eclipse.swt.widgets.Text) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Example 8 with ColumnLayout

use of org.eclipse.ui.forms.widgets.ColumnLayout in project linuxtools by eclipse.

the class SelectFilterWizardPage method createControl.

@Override
public void createControl(Composite parent) {
    wizard = (SelectFilterWizard) super.getWizard();
    Composite comp = new Composite(parent, SWT.NULL);
    comp.setLayout(new FormLayout());
    FormData data1 = new FormData();
    data1.left = new FormAttachment(0, 0);
    data1.top = new FormAttachment(0, 0);
    data1.right = new FormAttachment(40, 0);
    data1.bottom = new FormAttachment(100, 0);
    Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
    cmpFilterOpts.setLayoutData(data1);
    ColumnLayout colLayout = new ColumnLayout();
    colLayout.maxNumColumns = 1;
    cmpFilterOpts.setLayout(colLayout);
    btnFilters = new Button[AvailableFilterTypes.FILTER_IDS.length];
    for (int i = 0; i < btnFilters.length; i++) {
        btnFilters[i] = new Button(cmpFilterOpts, SWT.NONE);
        btnFilters[i].setText(AvailableFilterTypes.getFilterName(AvailableFilterTypes.FILTER_IDS[i]));
        btnFilters[i].addSelectionListener(buttonListener);
        btnFilters[i].setData(AvailableFilterTypes.FILTER_IDS[i]);
    }
    FormData data2 = new FormData();
    data2.left = new FormAttachment(cmpFilterOpts);
    data2.top = new FormAttachment(0, 0);
    data2.right = new FormAttachment(100, 0);
    data2.bottom = new FormAttachment(100, 0);
    lblDesc = new Label(comp, SWT.WRAP);
    lblDesc.setLayoutData(data2);
    setControl(comp);
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) ColumnLayout(org.eclipse.ui.forms.widgets.ColumnLayout) Label(org.eclipse.swt.widgets.Label) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Example 9 with ColumnLayout

use of org.eclipse.ui.forms.widgets.ColumnLayout in project linuxtools by eclipse.

the class UniqueFilterWizardPage method createControl.

@Override
public void createControl(Composite parent) {
    super.createControl(parent);
    Composite comp = new Composite(parent, SWT.NULL);
    comp.setLayout(new FormLayout());
    FormData data1 = new FormData();
    data1.left = new FormAttachment(0, 0);
    data1.top = new FormAttachment(0, 0);
    data1.right = new FormAttachment(40, 0);
    data1.bottom = new FormAttachment(100, 0);
    Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
    cmpFilterOpts.setLayoutData(data1);
    ColumnLayout colLayout = new ColumnLayout();
    colLayout.maxNumColumns = 1;
    cmpFilterOpts.setLayout(colLayout);
    // Column
    Label lblColumn = new Label(cmpFilterOpts, SWT.NONE);
    // $NON-NLS-1$
    lblColumn.setText(Localization.getString("UniqueFilterWizardPage.Column"));
    cboColumn = new Combo(cmpFilterOpts, SWT.DROP_DOWN | SWT.READ_ONLY);
    cboColumn.addSelectionListener(selectionListener);
    for (String series : wizard.series) {
        cboColumn.add(series);
    }
    // Spacer
    new Label(cmpFilterOpts, SWT.NONE);
    // String to compare to
    Label lblAggregate = new Label(cmpFilterOpts, SWT.NONE);
    // $NON-NLS-1$
    lblAggregate.setText(Localization.getString("UniqueFilterWizardPage.Aggregate"));
    btnAggregates = new Button[AggregateFactory.AGGREGATES.length];
    for (int i = 0; i < btnAggregates.length; i++) {
        btnAggregates[i] = new Button(cmpFilterOpts, SWT.RADIO);
        btnAggregates[i].setText(AggregateFactory.getAggregateName(AggregateFactory.AGGREGATES[i]));
        btnAggregates[i].addSelectionListener(btnSelectionListener);
        btnAggregates[i].setData(AggregateFactory.AGGREGATES[i]);
    }
    FormData data2 = new FormData();
    data2.left = new FormAttachment(cmpFilterOpts);
    data2.top = new FormAttachment(0, 0);
    data2.right = new FormAttachment(100, 0);
    data2.bottom = new FormAttachment(100, 0);
    lblDesc = new Label(comp, SWT.WRAP);
    lblDesc.setLayoutData(data2);
    cboColumn.select(0);
    createFilter();
    setControl(comp);
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) ColumnLayout(org.eclipse.ui.forms.widgets.ColumnLayout) Label(org.eclipse.swt.widgets.Label) Combo(org.eclipse.swt.widgets.Combo) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Aggregations

ColumnLayout (org.eclipse.ui.forms.widgets.ColumnLayout)9 Composite (org.eclipse.swt.widgets.Composite)7 FormAttachment (org.eclipse.swt.layout.FormAttachment)5 FormData (org.eclipse.swt.layout.FormData)5 FormLayout (org.eclipse.swt.layout.FormLayout)5 Button (org.eclipse.swt.widgets.Button)5 Label (org.eclipse.swt.widgets.Label)5 Combo (org.eclipse.swt.widgets.Combo)4 TreeViewer (org.eclipse.jface.viewers.TreeViewer)2 Text (org.eclipse.swt.widgets.Text)2 Tree (org.eclipse.swt.widgets.Tree)2 ExpansionAdapter (org.eclipse.ui.forms.events.ExpansionAdapter)2 ExpansionEvent (org.eclipse.ui.forms.events.ExpansionEvent)2 ColumnLayoutData (org.eclipse.ui.forms.widgets.ColumnLayoutData)2 Section (org.eclipse.ui.forms.widgets.Section)2 ScrolledForm (org.eclipse.ui.forms.widgets.ScrolledForm)1