use of org.eclipse.swt.layout.FillLayout in project bndtools by bndtools.
the class TestSuitesPage method createFormContent.
@Override
protected void createFormContent(IManagedForm managedForm) {
managedForm.setInput(model);
FormToolkit toolkit = managedForm.getToolkit();
ScrolledForm form = managedForm.getForm();
form.setText("Tests");
form.setImage(junitImg);
toolkit.decorateFormHeading(form.getForm());
form.getForm().addMessageHyperlinkListener(new MessageHyperlinkAdapter(getEditor()));
Composite body = form.getBody();
MDSashForm sashForm = new MDSashForm(body, SWT.HORIZONTAL, managedForm);
sashForm.setSashWidth(6);
toolkit.adapt(sashForm, false, false);
Composite leftPanel = toolkit.createComposite(sashForm);
Composite rightPanel = toolkit.createComposite(sashForm);
TestSuitesPart suitesPart = new TestSuitesPart(leftPanel, toolkit, Section.TITLE_BAR | Section.EXPANDED);
managedForm.addPart(suitesPart);
SaneDetailsPart detailsPart = new SaneDetailsPart();
managedForm.addPart(detailsPart);
// TODO: add details pages here
detailsPart.createContents(toolkit, rightPanel);
sashForm.hookResizeListener();
// LAYOUT
body.setLayout(new FillLayout());
GridLayout layout;
GridData gd;
layout = new GridLayout();
leftPanel.setLayout(layout);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
suitesPart.getSection().setLayoutData(gd);
layout = new GridLayout();
rightPanel.setLayout(layout);
}
use of org.eclipse.swt.layout.FillLayout in project bndtools by bndtools.
the class ProjectBuildPage method createFormContent.
@Override
protected void createFormContent(IManagedForm managedForm) {
managedForm.setInput(model);
FormToolkit tk = managedForm.getToolkit();
ScrolledForm form = managedForm.getForm();
form.setText("Project Build");
tk.decorateFormHeading(form.getForm());
form.getForm().addMessageHyperlinkListener(new MessageHyperlinkAdapter(getEditor()));
GridLayout layout;
GridData gd;
// Create Controls
Composite body = form.getBody();
body.setLayout(new FillLayout());
MDSashForm sashForm = new MDSashForm(body, SWT.HORIZONTAL, managedForm);
sashForm.setSashWidth(6);
tk.adapt(sashForm, false, false);
sashForm.hookResizeListener();
Composite leftPanel = tk.createComposite(sashForm);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
leftPanel.setLayoutData(gd);
layout = new GridLayout(1, false);
leftPanel.setLayout(layout);
SubBundlesPart subBundlesPart = new SubBundlesPart(leftPanel, tk, Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION);
managedForm.addPart(subBundlesPart);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
subBundlesPart.getSection().setLayoutData(gd);
BuildPathPart buildPathPart = new BuildPathPart(leftPanel, tk, Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION);
managedForm.addPart(buildPathPart);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
gd.widthHint = 50;
gd.heightHint = 50;
buildPathPart.getSection().setLayoutData(gd);
Composite rightPanel = tk.createComposite(sashForm);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
rightPanel.setLayoutData(gd);
BuildOperationsPart buildOpsPart = new BuildOperationsPart(rightPanel, tk, Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION);
managedForm.addPart(buildOpsPart);
gd = new GridData(SWT.FILL, SWT.FILL, true, false);
buildOpsPart.getSection().setLayoutData(gd);
layout = new GridLayout(1, false);
rightPanel.setLayout(layout);
reportProblemsInHeader();
}
use of org.eclipse.swt.layout.FillLayout in project azure-tools-for-java by Microsoft.
the class SignInDialog method createDialogArea.
/**
* Create contents of the dialog.
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
setTitle("Azure Sign In");
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayout(new FillLayout(SWT.HORIZONTAL));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite composite = new Composite(container, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
Group group = new Group(composite, SWT.NONE);
group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
group.setText("Authentication Method");
group.setLayout(new GridLayout(1, false));
rbtnInteractive = new Button(group, SWT.RADIO);
rbtnInteractive.setSelection(true);
rbtnInteractive.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
enableAutomatedAuthControls(false);
}
});
rbtnInteractive.setText("Interactive");
Composite compositeInteractive = new Composite(group, SWT.NONE);
GridData gd_compositeInteractive = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_compositeInteractive.heightHint = 38;
gd_compositeInteractive.widthHint = 66;
compositeInteractive.setLayoutData(gd_compositeInteractive);
compositeInteractive.setLayout(new GridLayout(1, false));
lblInteractiveInfo = new Label(compositeInteractive, SWT.WRAP);
GridData gd_lblInteractiveInfo = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
gd_lblInteractiveInfo.horizontalIndent = 11;
lblInteractiveInfo.setLayoutData(gd_lblInteractiveInfo);
lblInteractiveInfo.setText("You will manually sign in using your Azure credentials as needed.");
rbtnAutomated = new Button(group, SWT.RADIO);
rbtnAutomated.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
enableAutomatedAuthControls(true);
}
});
rbtnAutomated.setText("Automated");
Composite compositeAutomated = new Composite(group, SWT.NONE);
compositeAutomated.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
compositeAutomated.setLayout(new GridLayout(2, false));
lblAutomatedInfo = new Label(compositeAutomated, SWT.WRAP | SWT.HORIZONTAL);
lblAutomatedInfo.setEnabled(false);
GridData gd_lblAutomatedInfo = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
gd_lblAutomatedInfo.widthHint = 483;
gd_lblAutomatedInfo.horizontalIndent = 11;
gd_lblAutomatedInfo.heightHint = 49;
lblAutomatedInfo.setLayoutData(gd_lblAutomatedInfo);
lblAutomatedInfo.setText("An authentication file with credentials for an Azure Active Directory service principal will be used for automated sign ins.");
lblAuthenticationFile = new Label(compositeAutomated, SWT.NONE);
lblAuthenticationFile.setEnabled(false);
GridData gd_lblAuthenticationFile = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblAuthenticationFile.horizontalIndent = 10;
lblAuthenticationFile.setLayoutData(gd_lblAuthenticationFile);
lblAuthenticationFile.setText("Authentication file:");
new Label(compositeAutomated, SWT.NONE);
textAuthenticationFilePath = new Text(compositeAutomated, SWT.BORDER | SWT.READ_ONLY);
textAuthenticationFilePath.setEnabled(false);
GridData gd_textAuthenticationFilePath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_textAuthenticationFilePath.horizontalIndent = 10;
textAuthenticationFilePath.setLayoutData(gd_textAuthenticationFilePath);
btnBrowse = new Button(compositeAutomated, SWT.NONE);
btnBrowse.setEnabled(false);
btnBrowse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
doSelectCredFilepath();
}
});
btnBrowse.setText("Browse...");
new Label(compositeAutomated, SWT.NONE);
btnCreateAuthenticationFile = new Button(compositeAutomated, SWT.NONE);
btnCreateAuthenticationFile.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
doCreateServicePrincipal();
}
});
btnCreateAuthenticationFile.setEnabled(false);
btnCreateAuthenticationFile.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
btnCreateAuthenticationFile.setText("New...");
link = new Link(compositeAutomated, SWT.NONE);
link.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL("https://go.microsoft.com/fwlink/?linkid=847862"));
} catch (PartInitException | MalformedURLException ex) {
LOG.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "widgetSelected@SelectionAdapter@link@SignInDialog", ex));
}
}
});
GridData gd_link = new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1);
gd_link.widthHint = 312;
link.setLayoutData(gd_link);
link.setText("Follow these manual <a>steps</a> if Azure Toolkit fails to create an authentication file programmatically.");
fileDialog = new FileDialog(btnBrowse.getShell(), SWT.OPEN);
fileDialog.setText("Select Authentication File");
fileDialog.setFilterPath(System.getProperty("user.home"));
fileDialog.setFilterExtensions(new String[] { "*.azureauth", "*.*" });
return area;
}
use of org.eclipse.swt.layout.FillLayout in project azure-tools-for-java by Microsoft.
the class WindowsAzureActivityLogView method createPartControl.
@Override
public void createPartControl(Composite parent) {
parent.setLayout(new FillLayout());
viewer = new TableViewer(createTable(parent));
// Create the help context id for the viewer's control
PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "com.microsoft.azuretools.core.ui.views.WindowsAzureActivityLogView");
registerDeploymentListener();
}
use of org.eclipse.swt.layout.FillLayout in project azure-tools-for-java by Microsoft.
the class ErrorWindow method createDialogArea.
/**;
* Create contents of the dialog.
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
setTitle("Error Window");
setMessage("Error details");
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayout(new FillLayout(SWT.HORIZONTAL));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
text = new Text(container, SWT.BORDER | SWT.WRAP | SWT.MULTI);
return area;
}
Aggregations