use of org.eclipse.swt.layout.GridLayout in project translationstudio8 by heartsome.
the class AbstractStyleEditorDialog method createButtons.
/**
* Create OK, Reset and Cancel buttons
*/
protected void createButtons(final Shell shell) {
Composite buttonPanel = new Composite(shell, SWT.NONE);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
gridLayout.marginLeft = 65;
buttonPanel.setLayout(gridLayout);
GridData gridLayoutData = new GridData();
gridLayoutData.horizontalAlignment = GridData.FILL_HORIZONTAL;
buttonPanel.setLayoutData(gridLayoutData);
Button okButton = new Button(buttonPanel, SWT.PUSH);
okButton.setText("OK");
okButton.setLayoutData(new GridData(70, 25));
okButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
doFormOK(shell);
}
});
Button clearButton = new Button(buttonPanel, SWT.PUSH);
clearButton.setText("Clear");
clearButton.setToolTipText("Reset to original settings");
clearButton.setLayoutData(new GridData(80, 25));
clearButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
doFormClear(shell);
}
});
Button cancelButton = new Button(buttonPanel, SWT.NONE);
cancelButton.setText("Cancel");
cancelButton.setLayoutData(new GridData(80, 25));
cancelButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
doFormCancel(shell);
}
});
shell.setDefaultButton(okButton);
}
use of org.eclipse.swt.layout.GridLayout in project translationstudio8 by heartsome.
the class WaitDialog method createContents.
@Override
protected Control createContents(Composite parent) {
centerDialogOnScreen(getShell());
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(2, false));
composite.setLayoutData(new GridData(CENTER, CENTER, true, true));
composite.setRedraw(true);
Label imgLabel = new Label(composite, SWT.NONE);
imgLabel.setImage(iconImage);
textLabel = new Label(composite, SWT.NONE);
textLabel.setLayoutData(new GridData(CENTER, CENTER, true, true));
textLabel.setFont(GUIHelper.getFont(new FontData("Arial", 9, SWT.BOLD)));
textLabel.setRedraw(true);
textLabel.setText(msg);
return composite;
}
use of org.eclipse.swt.layout.GridLayout in project translationstudio8 by heartsome.
the class FileTypePreferencePage method createContents.
@Override
protected Control createContents(Composite parent) {
Composite tparent = new Composite(parent, SWT.NONE);
tparent.setLayout(new GridLayout());
tparent.setLayoutData(new GridData(GridData.FILL_BOTH));
HsImageLabel imageLabel = new HsImageLabel(Messages.getString("preference.FileTypePreferencePage.imageLabel"), null);
imageLabel.createControl(tparent);
imageLabel.computeSize();
return parent;
}
use of org.eclipse.swt.layout.GridLayout in project translationstudio8 by heartsome.
the class MergeXliffWizardPage method createControl.
public void createControl(Composite parent) {
setTitle(Messages.getString("wizard.MergeXliffWizardPage.title"));
setMessage(Messages.getString("wizard.MergeXliffWizardPage.desc"));
Composite tparent = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
tparent.setLayout(layout);
GridDataFactory.fillDefaults().hint(600, 500).grab(true, true).applyTo(tparent);
createMergeXlfGroup(tparent);
setImageDescriptor(Activator.getImageDescriptor("images/file/file-merge-logo.png"));
setControl(parent);
}
use of org.eclipse.swt.layout.GridLayout in project translationstudio8 by heartsome.
the class SplitXliffWizardPage method createControl.
public void createControl(Composite parent) {
Composite tparent = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
tparent.setLayout(layout);
GridDataFactory.fillDefaults().hint(600, 600).grab(true, true).applyTo(tparent);
createSplitXlfNameGroup(tparent);
createSplitInfo(tparent);
setImageDescriptor(Activator.getImageDescriptor("images/file/file-split-logo.png"));
setControl(parent);
}
Aggregations