use of org.eclipse.swt.layout.FormAttachment in project tdi-studio-se by Talend.
the class MemoryRuntimeComposite method createTopGroup.
private Group createTopGroup(Composite parent) {
Composite topComposite = new Composite(parent, SWT.NULL);
FormLayout topLayout = new FormLayout();
FormData topData = new FormData();
topData.left = new FormAttachment(0, 10);
topData.right = new FormAttachment(100, 0);
topData.top = new FormAttachment(0, 0);
topComposite.setLayout(topLayout);
topComposite.setLayoutData(topData);
Group topGroup = new Group(topComposite, SWT.NULL);
//$NON-NLS-1$
topGroup.setText("Monitor Control");
GridLayout groupLayout = new GridLayout(5, false);
FormData groupData = new FormData();
groupData.left = new FormAttachment(0, 0);
groupData.right = new FormAttachment(100, 0);
groupData.top = new FormAttachment(0, 0);
groupData.bottom = new FormAttachment(100, 0);
topGroup.setLayout(groupLayout);
topGroup.setLayoutData(groupData);
return topGroup;
}
use of org.eclipse.swt.layout.FormAttachment in project tdi-studio-se by Talend.
the class AdvanceSettingComposite method createLog4jOptions.
private void createLog4jOptions(Composite parent) {
customLog4j = new Button(parent, SWT.CHECK);
//$NON-NLS-1$
customLog4j.setText(Messages.getString("ProcessComposite.log4jLevel"));
//$NON-NLS-1$
customLog4j.setToolTipText(Messages.getString("ProcessComposite.log4jToolTip"));
FormData layouDatale = new FormData();
layouDatale.left = new FormAttachment(0, 10);
layouDatale.right = new FormAttachment(0, 200);
layouDatale.top = new FormAttachment(watchBtn, 0);
layouDatale.bottom = new FormAttachment(watchBtn, 50);
customLog4j.setLayoutData(layouDatale);
log4jLevel = new Combo(parent, SWT.READ_ONLY);
//$NON-NLS-1$
log4jLevel.setText(Messages.getString("ProcessComposite.log4jInfo"));
log4jLevel.setBackground(parent.getBackground());
log4jLevel.setItems(Log4jPrefsSettingManager.getLevel());
log4jLevel.select(2);
FormData layouDatall = new FormData();
layouDatall.left = new FormAttachment(0, 200);
layouDatall.right = new FormAttachment(0, 260);
layouDatall.top = new FormAttachment(watchBtn, 0);
layouDatall.bottom = new FormAttachment(watchBtn, 50);
log4jLevel.setLayoutData(layouDatall);
log4jLevel.setEnabled(false);
}
use of org.eclipse.swt.layout.FormAttachment in project tdi-studio-se by Talend.
the class LoginFirstTimeStartupActionPage method layoutControl.
@Override
protected void layoutControl() {
super.layoutControl();
FormData formData = null;
formData = new FormData();
formData.left = new FormAttachment(0, 0);
formData.top = new FormAttachment(0, 0);
title.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(title, TAB_VERTICAL_PADDING_LEVEL_1, SWT.BOTTOM);
formData.left = new FormAttachment(title, TAB_HORIZONTAL_PADDING_LEVEL_1, SWT.LEFT);
createNewProject.setLayoutData(formData);
formData = new FormData();
formData.left = new FormAttachment(createNewProject, TAB_HORIZONTAL_PADDING_LEVEL_1, SWT.RIGHT);
formData.right = new FormAttachment(100, 0);
formData.top = new FormAttachment(createNewProject, 0, SWT.CENTER);
formData.bottom = new FormAttachment(createNewProject, 0, SWT.CENTER);
newProjectName.setLayoutData(formData);
formData = new FormData();
formData.left = new FormAttachment(createNewProject, 0, SWT.LEFT);
formData.top = new FormAttachment(createNewProject, TAB_VERTICAL_PADDING_LEVEL_1, SWT.BOTTOM);
importDemoProject.setLayoutData(formData);
formData = new FormData();
formData.left = new FormAttachment(importDemoProject, 0, SWT.LEFT);
formData.top = new FormAttachment(importDemoProject, TAB_VERTICAL_PADDING_LEVEL_1, SWT.BOTTOM);
importExistingProject.setLayoutData(formData);
formData = new FormData();
formData.left = new FormAttachment(title, 0, SWT.LEFT);
formData.width = LoginDialogV2.getNewButtonSize(manageConnections).x;
formData.bottom = new FormAttachment(navigateArea, -1 * TAB_VERTICAL_PADDING_LEVEL_1, SWT.TOP);
manageConnections.setLayoutData(formData);
manageConnections.setBackground(backgroundColor);
}
use of org.eclipse.swt.layout.FormAttachment in project tdi-studio-se by Talend.
the class LoginProjectPage method layoutControl.
@Override
protected void layoutControl() {
/**
* 2. Layout all the control
*/
super.layoutControl();
FormData formData = null;
/**
* 2.1 Layout Bottom Navigation Area
*/
layoutNavigatorArea();
/**
* 2.2 Layout Connection Area
*/
formData = new FormData();
formData.top = new FormAttachment(0, 0);
formData.left = new FormAttachment(0, 0);
title.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(title, TAB_VERTICAL_PADDING_LEVEL_2, SWT.BOTTOM);
formData.left = new FormAttachment(0, 0);
formData.right = new FormAttachment(100, 0);
connectionManageArea.setLayoutData(formData);
GridLayout gridLayout = new GridLayout(2, true);
gridLayout.horizontalSpacing = TAB_HORIZONTAL_PADDING_LEVEL_2;
gridLayout.verticalSpacing = 0;
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
connectionManageArea.setLayout(gridLayout);
// formData = new FormData();
// formData.top = new FormAttachment(title, TAB_VERTICAL_PADDING_LEVEL_2, SWT.BOTTOM);
// formData.right = new FormAttachment(100, 0);
// formData.left = new FormAttachment(100, -1 * LoginDialogV2.getNewButtonSize(manageButton).x);
// manageButton.setLayoutData(formData);
GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
manageButton.setLayoutData(gridData);
// formData = new FormData();
// formData.top = new FormAttachment(manageButton, 0, SWT.CENTER);
// formData.bottom = new FormAttachment(manageButton, 0, SWT.CENTER);
// formData.left = new FormAttachment(title, 0, SWT.LEFT);
// formData.right = new FormAttachment(manageButton, -1 * TAB_HORIZONTAL_PADDING_LEVEL_2, SWT.LEFT);
// connectionsViewer.getControl().setLayoutData(formData);
gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
connectionsViewer.getControl().setLayoutData(gridData);
connectionsViewer.setContentProvider(ArrayContentProvider.getInstance());
connectionsViewer.setLabelProvider(new ConnectionLabelProvider());
/**
* 2.3 Layout Project Operation Area
*/
int operationButtonPadding = 6;
formData = new FormData();
// formData.top = new FormAttachment(manageButton, 0, SWT.BOTTOM);
formData.top = new FormAttachment(connectionManageArea, 0, SWT.BOTTOM);
formData.bottom = new FormAttachment(navigateArea, 0, SWT.TOP);
// formData.left = new FormAttachment(connectionsViewer.getControl(), 0, SWT.LEFT);
formData.left = new FormAttachment(connectionManageArea, 0, SWT.LEFT);
formData.right = new FormAttachment(100, 0);
projectOperationArea.setLayout(new FormLayout());
projectOperationArea.setLayoutData(formData);
formData = new FormData();
formData.bottom = new FormAttachment(100, -1 * TAB_VERTICAL_PADDING_LEVEL_1);
formData.left = new FormAttachment(0, 0);
createSandBoxProject.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(createSandBoxProject, 0, SWT.CENTER);
formData.bottom = new FormAttachment(createSandBoxProject, 0, SWT.CENTER);
formData.right = new FormAttachment(100, -1 * TAB_HORIZONTAL_PADDING_LEVEL_1);
formData.width = LoginDialogV2.getNewButtonSize(executeCreateSandBoxProject, operationButtonPadding).x;
executeCreateSandBoxProject.setLayoutData(formData);
formData = new FormData();
formData.bottom = new FormAttachment(createSandBoxProject, -1 * TAB_VERTICAL_PADDING_LEVEL_1, SWT.TOP);
formData.left = new FormAttachment(0, 0);
importLocalProject.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(importLocalProject, 0, SWT.CENTER);
formData.bottom = new FormAttachment(importLocalProject, 0, SWT.CENTER);
formData.right = new FormAttachment(100, -1 * TAB_HORIZONTAL_PADDING_LEVEL_1);
formData.width = LoginDialogV2.getNewButtonSize(executeImportLocalProject, operationButtonPadding).x;
executeImportLocalProject.setLayoutData(formData);
formData = new FormData();
formData.bottom = new FormAttachment(importLocalProject, -1 * TAB_VERTICAL_PADDING_LEVEL_1, SWT.TOP);
formData.left = new FormAttachment(0, 0);
importDemoProject.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(importDemoProject, 0, SWT.CENTER);
formData.bottom = new FormAttachment(importDemoProject, 0, SWT.CENTER);
formData.right = new FormAttachment(100, -1 * TAB_HORIZONTAL_PADDING_LEVEL_1);
formData.width = LoginDialogV2.getNewButtonSize(executeImportDemoProject, operationButtonPadding).x;
executeImportDemoProject.setLayoutData(formData);
formData = new FormData();
formData.bottom = new FormAttachment(importDemoProject, -1 * TAB_VERTICAL_PADDING_LEVEL_1, SWT.TOP);
formData.left = new FormAttachment(0, 0);
createNewProject.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(createNewProject, 0, SWT.CENTER);
formData.bottom = new FormAttachment(createNewProject, 0, SWT.CENTER);
formData.right = new FormAttachment(100, -1 * TAB_HORIZONTAL_PADDING_LEVEL_1);
formData.width = LoginDialogV2.getNewButtonSize(executeCreateNewProject, operationButtonPadding).x;
executeCreateNewProject.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(createNewProject, 0, SWT.CENTER);
formData.bottom = new FormAttachment(createNewProject, 0, SWT.CENTER);
formData.right = new FormAttachment(executeCreateNewProject, -1 * TAB_HORIZONTAL_PADDING_LEVEL_2, SWT.LEFT);
formData.left = new FormAttachment(createNewProject, TAB_HORIZONTAL_PADDING_LEVEL_2, SWT.RIGHT);
newProjectName.setLayoutData(formData);
formData = new FormData();
formData.top = new FormAttachment(0, TAB_VERTICAL_PADDING_LEVEL_1);
formData.left = new FormAttachment(0, 0);
selectExistingProject.setLayoutData(formData);
formData = new FormData();
formData.left = new FormAttachment(0, TAB_HORIZONTAL_PADDING_LEVEL_1);
formData.right = new FormAttachment(100, 0);
formData.top = new FormAttachment(selectExistingProject, TAB_VERTICAL_PADDING_LEVEL_2, SWT.BOTTOM);
formData.bottom = new FormAttachment(createNewProject, -1 * TAB_VERTICAL_PADDING_LEVEL_1, SWT.TOP);
projectListArea.setLayoutData(formData);
layoutProjectListArea();
}
use of org.eclipse.swt.layout.FormAttachment in project tdi-studio-se by Talend.
the class LoginProjectPage method refreshNecessaryVisible.
protected void refreshNecessaryVisible(boolean isRemote) {
boolean isSVNPluginLoaded = PluginChecker.isSVNProviderPluginLoaded();
refreshCreateSandboxProjectVisible(isNeedSandboxProject());
refreshImportLocalProjectVisible(!isRemote);
refreshImportDemoProjectVisible(!isRemote);
refreshCreateNewProjectVisible(!isRemote);
refreshBranchAreaVisible(isSVNPluginLoaded && isRemote);
Control projectListAreaBottomControl = null;
if (isSVNPluginLoaded) {
if (isRemote) {
if (isNeedSandboxProject()) {
projectListAreaBottomControl = createSandBoxProject;
} else {
projectListAreaBottomControl = navigateArea;
}
}
}
if (projectListAreaBottomControl == null) {
projectListAreaBottomControl = createNewProject;
}
FormData formData = (FormData) projectListArea.getLayoutData();
if (projectListAreaBottomControl == navigateArea) {
formData.bottom = new FormAttachment(100, -1 * TAB_VERTICAL_PADDING_LEVEL_1);
} else {
formData.bottom = new FormAttachment(projectListAreaBottomControl, -1 * TAB_VERTICAL_PADDING_LEVEL_1, SWT.TOP);
}
projectOperationArea.layout();
projectOperationArea.update();
}
Aggregations