use of org.eclipse.swt.layout.RowLayout in project tdi-studio-se by Talend.
the class ProjectSettingsWizardPage method createButtons.
private void createButtons(Composite parent) {
Composite btnComposite = new Composite(parent, SWT.NONE);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
data.horizontalSpan = 2;
btnComposite.setLayoutData(data);
RowLayout layout = new RowLayout();
layout.marginTop = 8;
layout.spacing = 15;
btnComposite.setLayout(layout);
// Project settings
projectSetBtn = new Button(btnComposite, SWT.PUSH);
//$NON-NLS-1$
projectSetBtn.setText(org.talend.repository.i18n.Messages.getString("ProjectSettingsWizardPage.PaletteSettings"));
// Version management
versionBtn = new Button(btnComposite, SWT.PUSH);
//$NON-NLS-1$
versionBtn.setText(org.talend.repository.i18n.Messages.getString("ProjectSettingsWizardPage.VersionManagement"));
}
use of org.eclipse.swt.layout.RowLayout in project tdi-studio-se by Talend.
the class ExportTreeViewer method createSelectionButton.
/**
* DOC hcw Comment method "createSelectionButton".
*
* @param itemComposite
*/
private void createSelectionButton(Composite itemComposite) {
Composite buttonComposite = new Composite(itemComposite, SWT.NONE);
GridLayoutFactory.swtDefaults().margins(0, 25).applyTo(buttonComposite);
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.BEGINNING).applyTo(buttonComposite);
buttonComposite.setLayout(new RowLayout(SWT.VERTICAL));
Button hide = new Button(buttonComposite, SWT.PUSH);
hide.setVisible(false);
Button selectAll = new Button(buttonComposite, SWT.PUSH);
// selectAll.setText(DataTransferMessages.DataTransfer_selectAll);
//$NON-NLS-1$
selectAll.setText(Messages.getString("DataTransferMessages.DataTransfer_selectAll"));
selectAll.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
getExportItemsTreeViewer().setAllChecked(true);
checkSelection();
}
});
Button deselectAll = new Button(buttonComposite, SWT.PUSH);
// deselectAll.setText(DataTransferMessages.DataTransfer_deselectAll);
//$NON-NLS-1$
deselectAll.setText(Messages.getString("DataTransferMessages.DataTransfer_deselectAll"));
deselectAll.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
getExportItemsTreeViewer().setAllChecked(false);
checkSelection();
}
});
// setButtonLayoutData(deselectAll);
Button expandBtn = new Button(buttonComposite, SWT.PUSH);
//$NON-NLS-1$
expandBtn.setText("Expand All");
expandBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
getExportItemsTreeViewer().expandAll();
}
});
// setButtonLayoutData(expandBtn);
Button collapseBtn = new Button(buttonComposite, SWT.PUSH);
//$NON-NLS-1$
collapseBtn.setText("Collapse All");
collapseBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
getExportItemsTreeViewer().collapseAll();
}
});
// setButtonLayoutData(collapseBtn);
}
use of org.eclipse.swt.layout.RowLayout in project tdi-studio-se by Talend.
the class TabFolderEditors method createComponents.
/**
* DOC amaumont Comment method "createComponents".
*/
private void createComponents() {
setSimple(false);
// TableEditorCompositeBase metaDatasDescriptorView3 = new TableEditorCompositeBase(tabFolder1);
// item.setControl(metaDatasDescriptorView3);
CTabItem item = new CTabItem(tabFolderEditors, SWT.BORDER);
//$NON-NLS-1$
item.setText(Messages.getString("TabFolderEditors.schemaEditor"));
SashForm inOutMetaEditorContainer = new SashForm(tabFolderEditors, SWT.SMOOTH | SWT.HORIZONTAL | SWT.SHADOW_OUT);
inOutMetaEditorContainer.setLayout(new RowLayout(SWT.HORIZONTAL));
item.setControl(inOutMetaEditorContainer);
CommandStack commandStack = mapperManager.getCommandStack();
inputMetaEditor = new MetadataTableEditorView(inOutMetaEditorContainer, SWT.BORDER);
inputMetaEditor.setMetadataTalendTypeFilter(NodeUtil.createMetadataTalendTypeFilter(mapperManager.getAbstractMapComponent()));
inputMetaEditor.initGraphicComponents();
inputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
addListenersToInputButtons();
outputMetaEditor = new MetadataTableEditorView(inOutMetaEditorContainer, SWT.BORDER);
outputMetaEditor.setMetadataTalendTypeFilter(NodeUtil.createMetadataTalendTypeFilter(mapperManager.getAbstractMapComponent()));
outputMetaEditor.initGraphicComponents();
outputMetaEditor.getExtendedTableViewer().setCommandStack(commandStack);
addListenersToOutputButtons();
item = new CTabItem(tabFolderEditors, SWT.BORDER);
//$NON-NLS-1$
item.setText(Messages.getString("TabFolderEditors.expressionEditor"));
StyledText styledText = createStyledText(item);
this.styledTextHandler = new StyledTextHandler(styledText, mapperManager);
tabFolderEditors.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
lastSelectedTab = tabFolderEditors.getSelectionIndex();
}
});
tabFolderEditors.setSelection(0);
}
use of org.eclipse.swt.layout.RowLayout in project sling by apache.
the class ImportWizardPage method createControl.
@Override
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
Composite container = new Composite(composite, SWT.NONE);
container.setLayout(new GridLayout(2, false));
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
gridData.minimumWidth = 450;
container.setLayoutData(gridData);
new Label(container, SWT.NONE).setText("Repository: ");
repositoryCombo = new SlingLaunchpadCombo(container, project);
repositoryCombo.getWidget().addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
determinePageCompletion();
updateWidgetEnablements();
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
determinePageCompletion();
updateWidgetEnablements();
}
});
repositoryCombo.refreshRepositoryList(new NullProgressMonitor());
Composite containerGroup = new Composite(composite, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
containerGroup.setLayout(layout);
containerGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
containerGroup.setFont(composite.getFont());
// container label
Label resourcesLabel = new Label(containerGroup, SWT.NONE);
resourcesLabel.setText("Import into:");
resourcesLabel.setFont(composite.getFont());
containerNameField = new Text(containerGroup, SWT.SINGLE | SWT.BORDER);
containerNameField.addListener(SWT.Modify, this);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.widthHint = SIZING_TEXT_FIELD_WIDTH;
containerNameField.setLayoutData(data);
containerNameField.setFont(composite.getFont());
containerBrowseButton = new Button(containerGroup, SWT.PUSH);
containerBrowseButton.setText("Select location...");
containerBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
containerBrowseButton.addListener(SWT.Selection, this);
containerBrowseButton.setFont(composite.getFont());
setButtonLayoutData(containerBrowseButton);
if (importRoot != null) {
containerNameField.setText(importRoot.getFullPath().toPortableString());
} else {
setErrorMessage("Select an import location");
}
adjustComposite = new Composite(composite, SWT.NONE);
adjustComposite.setLayout(new RowLayout());
adjustJcrRootText = new Label(adjustComposite, SWT.NONE);
adjustJcrRootText.setFont(containerGroup.getFont());
adjustJcrRootText();
Link openPropertiesLink = new Link(adjustComposite, SWT.NONE);
openPropertiesLink.setText("(<a>change</a>)");
openPropertiesLink.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
SlingProjectPropertyPage.openPropertyDialog(getShell(), project);
updateWidgetEnablements();
}
});
createOptionsGroup(composite);
setControl(composite);
updateWidgetEnablements();
}
use of org.eclipse.swt.layout.RowLayout in project eclipse.platform.swt by eclipse.
the class DNDExample method createFeedbackTypes.
private void createFeedbackTypes(Group parent) {
parent.setLayout(new RowLayout(SWT.VERTICAL));
Button b = new Button(parent, SWT.CHECK);
b.setText("FEEDBACK_SELECT");
b.addSelectionListener(widgetSelectedAdapter(e -> {
Button eb = (Button) e.widget;
if (eb.getSelection()) {
dropFeedback |= DND.FEEDBACK_SELECT;
} else {
dropFeedback &= ~DND.FEEDBACK_SELECT;
}
}));
b = new Button(parent, SWT.CHECK);
b.setText("FEEDBACK_SCROLL");
b.addSelectionListener(widgetSelectedAdapter(e -> {
Button eb = (Button) e.widget;
if (eb.getSelection()) {
dropFeedback |= DND.FEEDBACK_SCROLL;
} else {
dropFeedback &= ~DND.FEEDBACK_SCROLL;
}
}));
b = new Button(parent, SWT.CHECK);
b.setText("FEEDBACK_INSERT_BEFORE");
b.addSelectionListener(widgetSelectedAdapter(e -> {
Button eb = (Button) e.widget;
if (eb.getSelection()) {
dropFeedback |= DND.FEEDBACK_INSERT_BEFORE;
} else {
dropFeedback &= ~DND.FEEDBACK_INSERT_BEFORE;
}
}));
b = new Button(parent, SWT.CHECK);
b.setText("FEEDBACK_INSERT_AFTER");
b.addSelectionListener(widgetSelectedAdapter(e -> {
Button eb = (Button) e.widget;
if (eb.getSelection()) {
dropFeedback |= DND.FEEDBACK_INSERT_AFTER;
} else {
dropFeedback &= ~DND.FEEDBACK_INSERT_AFTER;
}
}));
b = new Button(parent, SWT.CHECK);
b.setText("FEEDBACK_EXPAND");
b.addSelectionListener(widgetSelectedAdapter(e -> {
Button eb = (Button) e.widget;
if (eb.getSelection()) {
dropFeedback |= DND.FEEDBACK_EXPAND;
} else {
dropFeedback &= ~DND.FEEDBACK_EXPAND;
}
}));
}
Aggregations