Search in sources :

Example 96 with GridLayout

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);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent)

Example 97 with GridLayout

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;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) FontData(org.eclipse.swt.graphics.FontData) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label)

Example 98 with GridLayout

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;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) HsImageLabel(net.heartsome.cat.common.ui.HsImageLabel) GridData(org.eclipse.swt.layout.GridData)

Example 99 with GridLayout

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);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite)

Example 100 with GridLayout

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);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite)

Aggregations

GridLayout (org.eclipse.swt.layout.GridLayout)1439 GridData (org.eclipse.swt.layout.GridData)1286 Composite (org.eclipse.swt.widgets.Composite)1098 Label (org.eclipse.swt.widgets.Label)617 SelectionEvent (org.eclipse.swt.events.SelectionEvent)498 Button (org.eclipse.swt.widgets.Button)481 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)429 Text (org.eclipse.swt.widgets.Text)385 Group (org.eclipse.swt.widgets.Group)374 ModifyListener (org.eclipse.swt.events.ModifyListener)164 ModifyEvent (org.eclipse.swt.events.ModifyEvent)161 Combo (org.eclipse.swt.widgets.Combo)150 TableViewer (org.eclipse.jface.viewers.TableViewer)103 Table (org.eclipse.swt.widgets.Table)102 SelectionListener (org.eclipse.swt.events.SelectionListener)94 ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)76 FillLayout (org.eclipse.swt.layout.FillLayout)72 Point (org.eclipse.swt.graphics.Point)70 ArrayList (java.util.ArrayList)64 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)61