use of org.eclipse.ui.forms.ManagedForm in project hale by halestudio.
the class MdlEditorView method createPartControl.
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
this.formToolkit = new FormToolkit(parent.getDisplay());
this.overviewForm = this.formToolkit.createScrolledForm(parent);
this.managedForm = new ManagedForm(this.formToolkit, this.overviewForm);
this.block = new MismatchPropertiesBlock();
// $NON-NLS-1$
this.overviewForm.setText("Mismatch Overview");
this.overviewForm.setToolTipText("Select a Mismatch and get overview " + "information.");
block.createContent(this.managedForm);
this.block.setContentWeight(new int[] { 25, 75 });
this.overviewForm.setBackgroundImage(MdlUiPlugin.getDefault().getImage(MdlUiPlugin.IMG_FORM_BG));
}
use of org.eclipse.ui.forms.ManagedForm in project azure-tools-for-java by Microsoft.
the class AzureExportDockerSshKeysDialog method createDialogArea.
/**
* Create contents of the dialog.
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
setTitle("Export SSH Keys");
setMessage(pathToolTip);
Composite area = (Composite) super.createDialogArea(parent);
Composite mainContainer = new Composite(area, SWT.NONE);
mainContainer.setLayout(new GridLayout(2, false));
mainContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
exportSshPathTextField = new Text(mainContainer, SWT.BORDER);
exportSshPathTextField.setToolTipText(pathToolTip);
exportSshPathTextField.setText(path);
exportSshPathTextField.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent event) {
path = (((Text) event.getSource()).getText());
if (Files.isDirectory(Paths.get(path))) {
errDispatcher.removeMessage("exportSshPathTextField", exportSshPathTextField);
setErrorMessage(null);
} else {
errDispatcher.addMessage("exportSshPathTextField", pathToolTip, null, IMessageProvider.ERROR, exportSshPathTextField);
setErrorMessage("Invalid directory path");
}
}
});
GridData gd_exportSshPathTextField = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_exportSshPathTextField.verticalIndent = 5;
gd_exportSshPathTextField.horizontalIndent = 5;
exportSshPathTextField.setLayoutData(gd_exportSshPathTextField);
Button exportSshPathBrowseButton = new Button(mainContainer, SWT.NONE);
exportSshPathBrowseButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
DirectoryDialog directoryDialog = new DirectoryDialog(exportSshPathTextField.getShell());
directoryDialog.setText("Select SSH Keys Directory");
directoryDialog.setFilterPath(System.getProperty("user.home"));
String pathSelected = directoryDialog.open();
if (pathSelected == null) {
return;
}
path = pathSelected;
exportSshPathTextField.setText(path);
}
});
GridData gd_exportSshPathBrowseButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_exportSshPathBrowseButton.verticalIndent = 5;
exportSshPathBrowseButton.setLayoutData(gd_exportSshPathBrowseButton);
exportSshPathBrowseButton.setText("Browse...");
Label lblNote = new Label(mainContainer, SWT.NONE);
GridData gd_lblNote = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblNote.verticalIndent = 5;
gd_lblNote.horizontalIndent = 5;
lblNote.setLayoutData(gd_lblNote);
lblNote.setText("Note:");
new Label(mainContainer, SWT.NONE);
Label lblAnyExistingidrsa = new Label(mainContainer, SWT.NONE);
GridData gd_lblAnyExistingidrsa = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblAnyExistingidrsa.horizontalIndent = 20;
lblAnyExistingidrsa.setLayoutData(gd_lblAnyExistingidrsa);
lblAnyExistingidrsa.setText("Any existing \"id_rsa\" and \"id_rsa.pub\" files in the selected directory");
Label lblWillBeOverwritten = new Label(mainContainer, SWT.NONE);
GridData gd_lblWillBeOverwritten = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblWillBeOverwritten.horizontalIndent = 20;
lblWillBeOverwritten.setLayoutData(gd_lblWillBeOverwritten);
lblWillBeOverwritten.setText("will be overwritten!");
new Label(mainContainer, SWT.NONE);
FormToolkit toolkit = new FormToolkit(mainContainer.getDisplay());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
managedForm = new ManagedForm(mainContainer);
errMsgForm = managedForm.getForm();
errMsgForm.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
errMsgForm.setBackground(mainContainer.getBackground());
errDispatcher = managedForm.getMessageManager();
// return area;
return super.createDialogArea(parent);
}
use of org.eclipse.ui.forms.ManagedForm in project azure-tools-for-java by Microsoft.
the class AzureNewDockerConfigPage method createControl.
/**
* Create contents of the wizard.
* @param parent
*/
public void createControl(Composite parent) {
Composite mainContainer = new Composite(parent, SWT.NONE);
setControl(mainContainer);
mainContainer.setLayout(new GridLayout(3, false));
Label lblName = new Label(mainContainer, SWT.NONE);
GridData gd_lblName = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblName.horizontalIndent = 5;
lblName.setLayoutData(gd_lblName);
lblName.setText("Name:");
dockerHostNameTextField = new Text(mainContainer, SWT.BORDER);
GridData gd_dockerHostNameTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_dockerHostNameTextField.horizontalIndent = 3;
gd_dockerHostNameTextField.widthHint = 200;
dockerHostNameTextField.setLayoutData(gd_dockerHostNameTextField);
Label lblNewLabel = new Label(mainContainer, SWT.NONE);
GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblNewLabel.horizontalIndent = 5;
lblNewLabel.setLayoutData(gd_lblNewLabel);
lblNewLabel.setText("Subscription:");
dockerSubscriptionComboViewer = new ComboViewer(mainContainer, SWT.READ_ONLY);
dockerSubscriptionCombo = dockerSubscriptionComboViewer.getCombo();
dockerSubscriptionCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
new Label(mainContainer, SWT.NONE);
Label lblId = new Label(mainContainer, SWT.NONE);
GridData gd_lblId = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblId.horizontalIndent = 5;
lblId.setLayoutData(gd_lblId);
lblId.setText("Id:");
dockerSubscriptionIdTextField = new Text(mainContainer, SWT.NONE);
GridData gd_dockerSubscriptionIdTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerSubscriptionIdTextField.horizontalIndent = 3;
gd_dockerSubscriptionIdTextField.widthHint = 300;
dockerSubscriptionIdTextField.setLayoutData(gd_dockerSubscriptionIdTextField);
dockerSubscriptionIdTextField.setEditable(false);
dockerSubscriptionIdTextField.setBackground(mainContainer.getBackground());
new Label(mainContainer, SWT.NONE);
Label lblRegion = new Label(mainContainer, SWT.NONE);
GridData gd_lblRegion = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblRegion.horizontalIndent = 5;
lblRegion.setLayoutData(gd_lblRegion);
lblRegion.setText("Region:");
dockerLocationComboBox = new Combo(mainContainer, SWT.READ_ONLY);
GridData gd_dockerLocationComboBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerLocationComboBox.widthHint = 200;
dockerLocationComboBox.setLayoutData(gd_dockerLocationComboBox);
new Label(mainContainer, SWT.NONE);
hostDetailsTabFolder = new TabFolder(mainContainer, SWT.NONE);
GridData gd_hostDetailsTabFolder = new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1);
gd_hostDetailsTabFolder.heightHint = 128;
hostDetailsTabFolder.setLayoutData(gd_hostDetailsTabFolder);
vmKindTableItem = new TabItem(hostDetailsTabFolder, SWT.NONE);
vmKindTableItem.setText("OS and Size");
vmKindComposite = new Composite(hostDetailsTabFolder, SWT.NONE);
vmKindTableItem.setControl(vmKindComposite);
vmKindComposite.setLayout(new GridLayout(3, false));
Label lblNewLabel_1 = new Label(vmKindComposite, SWT.NONE);
lblNewLabel_1.setText("Host OS:");
dockerHostOSTypeComboBox = new Combo(vmKindComposite, SWT.READ_ONLY);
GridData gd_dockerHostOSTypeComboBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostOSTypeComboBox.widthHint = 200;
dockerHostOSTypeComboBox.setLayoutData(gd_dockerHostOSTypeComboBox);
new Label(vmKindComposite, SWT.NONE);
Label lblSize = new Label(vmKindComposite, SWT.NONE);
lblSize.setText("Size:");
dockerHostVMSizeComboBox = new Combo(vmKindComposite, SWT.READ_ONLY);
GridData gd_dockerHostVMSizeComboBox = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
gd_dockerHostVMSizeComboBox.widthHint = 200;
dockerHostVMSizeComboBox.setLayoutData(gd_dockerHostVMSizeComboBox);
Link dockerPricingHyperlink = new Link(vmKindComposite, SWT.NONE);
dockerPricingHyperlink.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL("https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/"));
} catch (Exception ex) {
DefaultLoader.getUIHelper().logError(ex.getMessage(), ex);
}
}
});
dockerPricingHyperlink.setText("<a>Pricing</a>");
GridData gd_dockerPricingHyperlink = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 2);
dockerPricingHyperlink.setLayoutData(gd_dockerPricingHyperlink);
dockerHostVMPreferredSizesCheckBox = new Button(vmKindComposite, SWT.CHECK);
dockerHostVMPreferredSizesCheckBox.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1));
dockerHostVMPreferredSizesCheckBox.setText("Show preferred sizes only");
rgTableItem = new TabItem(hostDetailsTabFolder, SWT.NONE);
rgTableItem.setText("Resource Group");
Composite rgComposite = new Composite(hostDetailsTabFolder, SWT.NONE);
rgTableItem.setControl(rgComposite);
rgComposite.setLayout(new GridLayout(2, false));
dockerHostNewRGRadioButton = new Button(rgComposite, SWT.RADIO);
dockerHostNewRGRadioButton.setText("New resource group:");
dockerHostRGTextField = new Text(rgComposite, SWT.BORDER);
GridData gd_dockerHostRGTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostRGTextField.horizontalIndent = 3;
gd_dockerHostRGTextField.widthHint = 200;
dockerHostRGTextField.setLayoutData(gd_dockerHostRGTextField);
dockerHostSelectRGRadioButton = new Button(rgComposite, SWT.RADIO);
dockerHostSelectRGRadioButton.setText("Existing resource group:");
dockerHostSelectRGComboBox = new Combo(rgComposite, SWT.READ_ONLY);
GridData gd_dockerHostSelectRGComboBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostSelectRGComboBox.widthHint = 220;
dockerHostSelectRGComboBox.setLayoutData(gd_dockerHostSelectRGComboBox);
networkTableItem = new TabItem(hostDetailsTabFolder, SWT.NONE);
networkTableItem.setText("Network");
Composite networkComposite = new Composite(hostDetailsTabFolder, SWT.NONE);
networkTableItem.setControl(networkComposite);
networkComposite.setLayout(new GridLayout(2, false));
dockerHostNewVNetRadioButton = new Button(networkComposite, SWT.RADIO);
dockerHostNewVNetRadioButton.setText("New virtual network");
dockerHostNewVNetNameTextField = new Text(networkComposite, SWT.BORDER);
GridData gd_dockerHostNewVNetNameTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostNewVNetNameTextField.horizontalIndent = 3;
gd_dockerHostNewVNetNameTextField.widthHint = 200;
dockerHostNewVNetNameTextField.setLayoutData(gd_dockerHostNewVNetNameTextField);
Label lblAddressSpacecdir = new Label(networkComposite, SWT.NONE);
GridData gd_lblAddressSpacecdir = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblAddressSpacecdir.horizontalIndent = 18;
lblAddressSpacecdir.setLayoutData(gd_lblAddressSpacecdir);
lblAddressSpacecdir.setText("Address space (CDIR):");
dockerHostNewVNetAddrSpaceTextField = new Text(networkComposite, SWT.BORDER);
GridData gd_dockerHostNewVNetAddrSpaceTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostNewVNetAddrSpaceTextField.horizontalIndent = 3;
gd_dockerHostNewVNetAddrSpaceTextField.widthHint = 200;
dockerHostNewVNetAddrSpaceTextField.setLayoutData(gd_dockerHostNewVNetAddrSpaceTextField);
dockerHostSelectVNetRadioButton = new Button(networkComposite, SWT.RADIO);
dockerHostSelectVNetRadioButton.setText("Existing virtual network:");
dockerHostSelectVnetComboBox = new Combo(networkComposite, SWT.READ_ONLY);
GridData gd_dockerHostSelectVnetComboBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostSelectVnetComboBox.widthHint = 220;
dockerHostSelectVnetComboBox.setLayoutData(gd_dockerHostSelectVnetComboBox);
Label lblSubnet = new Label(networkComposite, SWT.NONE);
GridData gd_lblSubnet = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblSubnet.horizontalIndent = 18;
lblSubnet.setLayoutData(gd_lblSubnet);
lblSubnet.setText("Subnet:");
dockerHostSelectSubnetComboBox = new Combo(networkComposite, SWT.READ_ONLY);
GridData gd_dockerHostSelectSubnetComboBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostSelectSubnetComboBox.widthHint = 220;
dockerHostSelectSubnetComboBox.setLayoutData(gd_dockerHostSelectSubnetComboBox);
storageTableItem = new TabItem(hostDetailsTabFolder, SWT.NONE);
storageTableItem.setText("Storage");
Composite storageComposite = new Composite(hostDetailsTabFolder, SWT.NONE);
storageTableItem.setControl(storageComposite);
storageComposite.setLayout(new GridLayout(2, false));
dockerHostNewStorageRadioButton = new Button(storageComposite, SWT.RADIO);
dockerHostNewStorageRadioButton.setText("New storage account:");
dockerNewStorageTextField = new Text(storageComposite, SWT.BORDER);
GridData gd_dockerNewStorageTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerNewStorageTextField.horizontalIndent = 3;
gd_dockerNewStorageTextField.widthHint = 200;
dockerNewStorageTextField.setLayoutData(gd_dockerNewStorageTextField);
dockerHostSelectStorageRadioButton = new Button(storageComposite, SWT.RADIO);
dockerHostSelectStorageRadioButton.setText("Existing storage account:");
dockerSelectStorageComboBox = new Combo(storageComposite, SWT.READ_ONLY);
GridData gd_dockerSelectStorageComboBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerSelectStorageComboBox.widthHint = 220;
dockerSelectStorageComboBox.setLayoutData(gd_dockerSelectStorageComboBox);
FormToolkit toolkit = new FormToolkit(mainContainer.getDisplay());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
managedForm = new ManagedForm(mainContainer);
errMsgForm = managedForm.getForm();
errMsgForm.setVisible(false);
// errMsgForm.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));
// errMsgForm.setBackground(mainContainer.getBackground());
errDispatcher = managedForm.getMessageManager();
initUIMainContainer(mainContainer);
}
use of org.eclipse.ui.forms.ManagedForm in project azure-tools-for-java by Microsoft.
the class AzureConfigureDockerContainerStep method createControl.
/**
* Create contents of the wizard.
* @param parent
*/
public void createControl(Composite parent) {
Composite mainContainer = new Composite(parent, SWT.NULL);
setControl(mainContainer);
mainContainer.setLayout(new GridLayout(3, false));
Label lblDockerContainerName = new Label(mainContainer, SWT.NONE);
GridData gd_lblDockerContainerName = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblDockerContainerName.horizontalIndent = 1;
lblDockerContainerName.setLayoutData(gd_lblDockerContainerName);
lblDockerContainerName.setText("Container name:");
dockerContainerNameTextField = new Text(mainContainer, SWT.BORDER);
dockerContainerNameTextField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
new Label(mainContainer, SWT.NONE);
Label lblNewLabel = new Label(mainContainer, SWT.NONE);
GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblNewLabel.horizontalIndent = 1;
lblNewLabel.setLayoutData(gd_lblNewLabel);
lblNewLabel.setText("Dockerfile settings");
Label lblDockerfileSettings = new Label(mainContainer, SWT.SEPARATOR | SWT.HORIZONTAL);
lblDockerfileSettings.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1));
predefinedDockerfileRadioButton = new Button(mainContainer, SWT.RADIO);
GridData gd_predefinedDockerfileRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_predefinedDockerfileRadioButton.horizontalIndent = 3;
predefinedDockerfileRadioButton.setLayoutData(gd_predefinedDockerfileRadioButton);
predefinedDockerfileRadioButton.setText("Predefined Docker image");
new Label(mainContainer, SWT.NONE);
dockerfileComboBox = new Combo(mainContainer, SWT.NONE);
GridData gd_dockerfileComboBox = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
gd_dockerfileComboBox.horizontalIndent = 22;
dockerfileComboBox.setLayoutData(gd_dockerfileComboBox);
new Label(mainContainer, SWT.NONE);
customDockerfileRadioButton = new Button(mainContainer, SWT.RADIO);
GridData gd_customDockerfileRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_customDockerfileRadioButton.horizontalIndent = 3;
customDockerfileRadioButton.setLayoutData(gd_customDockerfileRadioButton);
customDockerfileRadioButton.setText("Custom Dockerfile");
new Label(mainContainer, SWT.NONE);
customDockerfileTextField = new Text(mainContainer, SWT.BORDER);
GridData gd_customDockerfileTextField = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
gd_customDockerfileTextField.horizontalIndent = 22;
customDockerfileTextField.setLayoutData(gd_customDockerfileTextField);
customDockerfileBrowseButton = new Button(mainContainer, SWT.NONE);
customDockerfileBrowseButton.setText("Browse...");
Label label = new Label(mainContainer, SWT.SEPARATOR | SWT.HORIZONTAL);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
Label lblPortSettings = new Label(mainContainer, SWT.NONE);
GridData gd_lblPortSettings = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblPortSettings.horizontalIndent = 1;
lblPortSettings.setLayoutData(gd_lblPortSettings);
lblPortSettings.setText("Port settings:");
dockerContainerPortSettings = new Text(mainContainer, SWT.BORDER);
dockerContainerPortSettings.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
new Label(mainContainer, SWT.NONE);
Label lblForExampletcp = new Label(mainContainer, SWT.NONE);
GridData gd_lblForExampletcp = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblForExampletcp.horizontalIndent = 22;
lblForExampletcp.setLayoutData(gd_lblForExampletcp);
lblForExampletcp.setText("For example \"10022:22\"");
new Label(mainContainer, SWT.NONE);
FormToolkit toolkit = new FormToolkit(mainContainer.getDisplay());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
managedForm = new ManagedForm(mainContainer);
errMsgForm = managedForm.getForm();
errMsgForm.setVisible(false);
// errMsgForm.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));
// errMsgForm.setBackground(mainContainer.getBackground());
errDispatcher = managedForm.getMessageManager();
// errMsgForm.setMessage("This is an error message", IMessageProvider.ERROR);
initUIMainContainer(mainContainer);
}
use of org.eclipse.ui.forms.ManagedForm in project azure-tools-for-java by Microsoft.
the class AzureSelectDockerHostPage method createControl.
/**
* Create contents of the wizard.
* @param parent
*/
public void createControl(Composite parent) {
mainContainer = new Composite(parent, SWT.NULL);
setControl(mainContainer);
mainContainer.setLayout(new GridLayout(4, false));
Label lblNewLabel = new Label(mainContainer, SWT.NONE);
GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblNewLabel.verticalIndent = 1;
gd_lblNewLabel.horizontalIndent = 1;
lblNewLabel.setLayoutData(gd_lblNewLabel);
lblNewLabel.setText("Docker image name:");
dockerImageNameTextField = new Text(mainContainer, SWT.BORDER);
GridData gd_dockerImageNameTextField = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_dockerImageNameTextField.verticalIndent = 1;
dockerImageNameTextField.setLayoutData(gd_dockerImageNameTextField);
new Label(mainContainer, SWT.NONE);
Label lblNewLabel_1 = new Label(mainContainer, SWT.NONE);
GridData gd_lblNewLabel_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblNewLabel_1.horizontalIndent = 1;
lblNewLabel_1.setLayoutData(gd_lblNewLabel_1);
lblNewLabel_1.setText("Artifact to deploy (.WAR or .JAR):");
dockerArtifactPathTextField = new Text(mainContainer, SWT.BORDER);
dockerArtifactPathTextField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
dockerArtifactPathBrowseButton = new Button(mainContainer, SWT.NONE);
dockerArtifactPathBrowseButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
dockerArtifactPathBrowseButton.setText("Browse...");
Label lblHosts = new Label(mainContainer, SWT.NONE);
lblHosts.setText("Hosts");
Label label = new Label(mainContainer, SWT.SEPARATOR | SWT.HORIZONTAL);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1));
dockerHostsTableViewer = new TableViewer(mainContainer, SWT.SINGLE | SWT.CHECK | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
dockerHostsTable = dockerHostsTableViewer.getTable();
dockerHostsTable.setHeaderVisible(true);
dockerHostsTable.setLinesVisible(true);
dockerHostsTable.setToolTipText("Check a Docker host from the list or create a new host");
GridData gd_dockerHostsTableView = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 7);
gd_dockerHostsTableView.horizontalIndent = 1;
gd_dockerHostsTableView.heightHint = 155;
dockerHostsTable.setLayoutData(gd_dockerHostsTableView);
dockerHostsRefreshButton = new Button(mainContainer, SWT.NONE);
GridData gd_dockerHostsRefreshButton = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
gd_dockerHostsRefreshButton.verticalIndent = 1;
dockerHostsRefreshButton.setLayoutData(gd_dockerHostsRefreshButton);
dockerHostsRefreshButton.setText(REFRESH);
dockerHostsViewButton = new Button(mainContainer, SWT.NONE);
dockerHostsViewButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
dockerHostsViewButton.setText(VIEW);
dockerHostsAddButton = new Button(mainContainer, SWT.NONE);
dockerHostsAddButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
dockerHostsAddButton.setText(ADD);
dockerHostsDeleteButton = new Button(mainContainer, SWT.NONE);
dockerHostsDeleteButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
dockerHostsDeleteButton.setText("Delete");
dockerHostsEditButton = new Button(mainContainer, SWT.NONE);
dockerHostsEditButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
dockerHostsEditButton.setText("Edit");
new Label(mainContainer, SWT.NONE);
new Label(mainContainer, SWT.NONE);
FormToolkit toolkit = new FormToolkit(mainContainer.getDisplay());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
managedForm = new ManagedForm(mainContainer);
errMsgForm = managedForm.getForm();
errMsgForm.setVisible(false);
// errMsgForm.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));
// errMsgForm.setBackground(mainContainer.getBackground());
errDispatcher = managedForm.getMessageManager();
// errMsgForm.setMessage("This is an error message", IMessageProvider.ERROR);
initUIMainContainer(mainContainer);
}
Aggregations