use of org.eclipse.ui.forms.widgets.Section 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.Section 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.Section in project hale by halestudio.
the class MismatchPropertiesBlock method createMasterPart.
/* (non-Javadoc)
* @see org.eclipse.ui.forms.MasterDetailsBlock#createMasterPart(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite)
*/
@Override
protected void createMasterPart(final IManagedForm managedForm, Composite parent) {
FormToolkit toolkit = managedForm.getToolkit();
Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
// $NON-NLS-1$
section.setText("Mismatches");
section.setDescription(// $NON-NLS-1$
"Select the Mismatch or one of it's children to view and edit it.");
section.marginWidth = 10;
section.marginHeight = 5;
Composite client = toolkit.createComposite(section, SWT.WRAP);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginWidth = 2;
layout.marginHeight = 2;
client.setLayout(layout);
Tree tree = toolkit.createTree(client, SWT.NULL);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 20;
gd.widthHint = 250;
tree.setLayoutData(gd);
toolkit.paintBordersFor(client);
section.setClient(client);
final SectionPart spart = new SectionPart(section);
managedForm.addPart(spart);
TreeViewer mismatchTreeViewer = new TreeViewer(tree);
mismatchTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
managedForm.fireSelectionChanged(spart, event.getSelection());
}
});
mismatchTreeViewer.setContentProvider(new MismatchTreeContentProvider());
mismatchTreeViewer.setLabelProvider(new MismatchTreeLabelProvider());
mismatchTreeViewer.setInput(getDummyCell());
}
use of org.eclipse.ui.forms.widgets.Section in project sling by apache.
the class ConnectionEditorSection method createSection.
@Override
public void createSection(Composite parent) {
super.createSection(parent);
FormToolkit toolkit = getFormToolkit(parent.getDisplay());
Section section = toolkit.createSection(parent, ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
section.setText("Connection");
section.setDescription("Connection details for this server");
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
// ports
Composite composite = toolkit.createComposite(section);
// layout similar to ServerPropertiesEditorSection
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 5;
layout.marginWidth = 10;
layout.verticalSpacing = 5;
layout.horizontalSpacing = 15;
composite.setLayout(layout);
composite.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
toolkit.paintBordersFor(composite);
section.setClient(composite);
createLabel(toolkit, composite, "Port:");
portText = createText(toolkit, composite, SWT.SINGLE);
createLabel(toolkit, composite, "Debug Port:");
debugPortText = createText(toolkit, composite, SWT.SINGLE);
createLabel(toolkit, composite, "Context path:");
contextPathText = createText(toolkit, composite, SWT.SINGLE);
// TODO wrong parent
Label separator = toolkit.createSeparator(parent, SWT.HORIZONTAL);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 2;
separator.setLayoutData(data);
createLabel(toolkit, composite, "Username:");
usernameText = createText(toolkit, composite, SWT.SINGLE);
createLabel(toolkit, composite, "Password:");
passwordText = createText(toolkit, composite, SWT.PASSWORD);
initialize();
}
use of org.eclipse.ui.forms.widgets.Section in project sling by apache.
the class DebugEditorSection method createSection.
@Override
public void createSection(Composite parent) {
super.createSection(parent);
FormToolkit toolkit = getFormToolkit(parent.getDisplay());
Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
section.setText("Debug");
section.setDescription("Resolving sources when connecting in debug mode ensure that you have up-to-date source attachments which reflect the " + "bundles running in the remote instance. However, initial resolve can be slow.");
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
// ports
Composite composite = toolkit.createComposite(section);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 8;
layout.marginWidth = 8;
composite.setLayout(layout);
GridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
composite.setLayoutData(gridData);
toolkit.paintBordersFor(composite);
section.setClient(composite);
resolveSourcesButton = toolkit.createButton(composite, "Resolve sources when connecting", SWT.CHECK);
GridData data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
resolveSourcesButton.setLayoutData(data);
actionArea = toolkit.createComposite(composite);
RowLayout actionAreaLayout = new RowLayout();
actionAreaLayout.center = true;
actionArea.setLayout(actionAreaLayout);
initialize();
}
Aggregations