use of org.eclipse.ui.forms.widgets.ColumnLayoutData in project hale by halestudio.
the class MismatchDetailsPage method createMismatchSection.
@SuppressWarnings("unused")
private void createMismatchSection(Composite parent) {
// create "Mismatch" Section
Section sectionMismatch = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
ColumnLayoutData cd = new ColumnLayoutData();
sectionMismatch.setLayoutData(cd);
sectionMismatch.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
overviewForm.reflow(true);
}
});
sectionMismatch.setText("Mismatch");
sectionMismatch.setDescription("General information on this mismatch.");
Composite sectionMismatchClient = toolkit.createComposite(sectionMismatch);
sectionMismatchClient.setLayout(new GridLayout(2, false));
Label labelType = toolkit.createLabel(sectionMismatchClient, "Type:");
this.textType = toolkit.createText(sectionMismatchClient, "");
this.textType.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
this.textType.setEditable(false);
Label labelProvenance = toolkit.createLabel(sectionMismatchClient, "Provenance:");
this.textProvenance = toolkit.createText(sectionMismatchClient, "");
this.textProvenance.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
this.textProvenance.setEditable(false);
Label labelStatus = toolkit.createLabel(sectionMismatchClient, "Status:");
this.textStatus = toolkit.createText(sectionMismatchClient, "");
this.textStatus.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
Label labelComment = toolkit.createLabel(sectionMismatchClient, "Comments:");
GridData gd = new GridData();
gd.horizontalSpan = 2;
labelComment.setLayoutData(gd);
this.textComment = toolkit.createText(sectionMismatchClient, "", SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
gd = new GridData();
gd.horizontalSpan = 2;
gd.grabExcessVerticalSpace = true;
gd.grabExcessHorizontalSpace = true;
gd.horizontalAlignment = SWT.FILL;
gd.verticalAlignment = SWT.FILL;
gd.heightHint = 40;
textComment.setLayoutData(gd);
toolkit.paintBordersFor(sectionMismatchClient);
sectionMismatch.setClient(sectionMismatchClient);
}
use of org.eclipse.ui.forms.widgets.ColumnLayoutData in project hale by halestudio.
the class MismatchDetailsPage method createReasonSection.
private void createReasonSection(Composite parent) {
// create "Reason" Section
Section sectionReason = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
ColumnLayoutData cd = new ColumnLayoutData();
sectionReason.setLayoutData(cd);
sectionReason.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
overviewForm.reflow(true);
}
});
sectionReason.setText("Reason");
sectionReason.setDescription("Why this mismatch occurs.");
Composite sectionReasonClient = toolkit.createComposite(sectionReason);
ColumnLayout reasonColumnLayout = new ColumnLayout();
reasonColumnLayout.maxNumColumns = 1;
sectionReasonClient.setLayout(reasonColumnLayout);
Tree treeReason = toolkit.createTree(sectionReasonClient, SWT.NULL);
treeReason.setLayout(new ColumnLayout());
ColumnLayoutData treeLayoutData = new ColumnLayoutData(50, 123);
treeReason.setLayoutData(treeLayoutData);
toolkit.paintBordersFor(sectionReasonClient);
sectionReason.setClient(sectionReasonClient);
this.reasonTreeViewer = new TreeViewer(treeReason);
this.reasonTreeViewer.setContentProvider(new ReasonContentProvider());
this.reasonTreeViewer.setLabelProvider(new ReasonLabelProvider());
}
use of org.eclipse.ui.forms.widgets.ColumnLayoutData in project hale by halestudio.
the class MismatchDetailsPage method createConsequenceSection.
private void createConsequenceSection(Composite parent) {
// create "Consequence" Section
Section sectionConsequence = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
ColumnLayoutData cd = new ColumnLayoutData();
sectionConsequence.setLayoutData(cd);
sectionConsequence.addExpansionListener(new ExpansionAdapter() {
public void expansionStateChanged(ExpansionEvent e) {
overviewForm.reflow(true);
}
});
sectionConsequence.setText("Consequence(s)");
sectionConsequence.setDescription("What impacts this mismatch has.");
Composite sectionConsequenceClient = toolkit.createComposite(sectionConsequence);
ColumnLayout consequenceColumnLayout = new ColumnLayout();
consequenceColumnLayout.maxNumColumns = 1;
sectionConsequenceClient.setLayout(consequenceColumnLayout);
Tree treeConsequence = toolkit.createTree(sectionConsequenceClient, SWT.NULL);
treeConsequence.setLayout(new ColumnLayout());
ColumnLayoutData treeLayoutData = new ColumnLayoutData(50, 123);
treeConsequence.setLayoutData(treeLayoutData);
toolkit.paintBordersFor(sectionConsequenceClient);
sectionConsequence.setClient(sectionConsequenceClient);
this.consequenceTreeViewer = new TreeViewer(treeConsequence);
this.consequenceTreeViewer.setContentProvider(new ConsequenceContentProvider());
this.consequenceTreeViewer.setLabelProvider(new ConsequenceLabelProvider());
}
Aggregations