GridDataFactory.swtDefaults().grab(true, false).applyTo(authorLabel); websiteLink = new Link(themeDetails, SWT.NONE); GridDataFactory.swtDefaults().grab(true, false).applyTo(websiteLink);
@Override protected Control createButtonBar(Composite pParent) { Control bar = super.createButtonBar(pParent); bar.setLayoutData(GridDataFactory.swtDefaults().hint(1, 1).create()); return bar; }
inputResourceGroup.setText("Input Folder:"); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false) .applyTo(inputResourceGroup); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(3, 1) .applyTo(inputFolderText); inputFolderText.addModifyListener(new ModifyListener() { GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false) .applyTo(recursivelyButton); recursivelyButton.addSelectionListener(new SelectionListener() { viewLabel.setText("View Name:"); viewText = new Text(inputResourceGroup, SWT.BORDER); GridDataFactory.swtDefaults().hint(250, SWT.DEFAULT).align(SWT.LEFT, SWT.CENTER) .grab(true, false).applyTo(viewText); viewText.addModifyListener(new ModifyListener() { GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false) .applyTo(outputFolderGroup); GridLayout outputFolderGroupLayout = new GridLayout(2, false); outputFolderGroup.setLayout(outputFolderGroupLayout); outputFolderText = new Text(outputFolderGroup, SWT.BORDER); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false) .applyTo(outputFolderText); outputFolderText.addModifyListener(new ModifyListener() {
cloneSubmodulesButton .setText(UIText.CloneDestinationPage_cloneSubmodulesButton); GridDataFactory.swtDefaults().span(2, 1).applyTo(cloneSubmodulesButton);
public void createControl(Composite parent) { Composite displayArea = new Composite(parent, SWT.NONE); GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(false) .applyTo(displayArea); GridDataFactory.fillDefaults().grab(true, true).applyTo(displayArea); new Label(displayArea, SWT.NONE) .setText(UIText.SubmodulePathWizardPage_PathLabel); pathText = new Text(displayArea, SWT.SINGLE | SWT.BORDER); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER) .grab(true, false).applyTo(pathText); pathText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validate(); } }); setControl(displayArea); setTitle(UIText.SubmodulePathWizardPage_Title); setMessage(UIText.SubmodulePathWizardPage_Message); setPageComplete(false); }
GridDataFactory.swtDefaults().hint(30, SWT.DEFAULT).applyTo(contextLines);
GridDataFactory.swtDefaults().span(2, SWT.DEFAULT).applyTo(typeValue); typeValue.setText(IDEResourceInfoUtils.getTypeString(resource, getContentDescription(resource)));
setInfoForegroundColor(preamble2); setInfoBackgroundColor(preamble2); preamble2.setLayoutData(GridDataFactory.swtDefaults().span(4, 1).indent(0, 0).create()); if (methodCalls.isEmpty()) { preamble2.setText(format(Messages.EXTDOC_RECOMMENDATIONS_ARE_NOT_MADE, receiverType.getElementName(), varName)); new Label(container, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().span(4, 1).indent(0, 0) .hint(SWT.DEFAULT, 1).create()); for (final Tuple<IMethodName, Double> rec : methodCalls) { preamble.setLayoutData(GridDataFactory.swtDefaults().span(4, 1).indent(0, 5).create()); setInfoForegroundColor(preamble); setInfoBackgroundColor(preamble); new Label(container, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().span(4, 1).indent(0, 5) .hint(SWT.DEFAULT, 1).create());
private void createBidiPreferencesGroup(Composite composite) { layoutDirectionCombo = addComboBox(composite, WorkbenchMessages.GlobalizationPreference_layoutDirection, 0); layoutDirectionCombo.setItems(new String[] { DEFAULT_DIR, LTR_DIR, RTL_DIR }); layoutDirectionCombo.select(getLayoutDirectionIndex(layoutDirection)); layoutDirectionCombo.addSelectionListener(widgetSelectedAdapter( e -> layoutDirection = getLayoutDirectionInteger(layoutDirectionCombo.getSelectionIndex()))); createSpace(composite); bidiSupportClickButton = new Button(composite, SWT.CHECK | SWT.LEFT); bidiSupportClickButton.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create()); bidiSupportClickButton.setText(WorkbenchMessages.GlobalizationPreference_bidiSupport); bidiSupportClickButton.setSelection(bidiSupport); bidiSupportClickButton.addSelectionListener(widgetSelectedAdapter(e -> selectClickMode(bidiSupportClickButton.getSelection()))); textDirectionCombo = addComboBox(composite, WorkbenchMessages.GlobalizationPreference_textDirection, LayoutConstants.getIndent()); textDirectionCombo.setItems(new String[] { DEFAULT_DIR, LTR_DIR, AUTO_DIR, RTL_DIR }); textDirectionCombo.setEnabled(bidiSupport); textDirectionCombo.select(getTextDirectionIndex(textDirection)); textDirectionCombo.addSelectionListener(widgetSelectedAdapter(e -> textDirection = getTextDirectionString(textDirectionCombo.getSelectionIndex()))); createSpace(composite); Font font = composite.getFont(); Composite note = createNoteComposite(font, composite, WorkbenchMessages.Preference_note, WorkbenchMessages.GlobalizationPreference_restartWidget); note.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create()); }
Composite infoArea = new Composite(emptyArea, SWT.NONE); infoArea.setMenu(menu); GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER) .grab(true, true).applyTo(infoArea); GridLayoutFactory.swtDefaults().applyTo(infoArea); messageLabel.setText(UIText.RepositoriesView_messsageEmpty); messageLabel.setMenu(menu); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL) .grab(true, false).applyTo(messageLabel); Composite optionsArea = new Composite(infoArea, SWT.NONE); optionsArea.setMenu(menu); GridLayoutFactory.swtDefaults().numColumns(2).applyTo(optionsArea); GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER) .grab(true, true).applyTo(optionsArea); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL) .grab(true, false).applyTo(addLink); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL) .grab(true, false).applyTo(cloneLink); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL) .grab(true, false).applyTo(createLink);
GridDataFactory.swtDefaults().applyTo(currentValue); Image currentIcon = getIcon(current); UIUtils.hookDisposal(currentValue, currentIcon);
GridDataFactory.swtDefaults().applyTo(toolBar); m_stopButton = new ToolItem(toolBar, SWT.PUSH); m_stopButton.setEnabled(false);
GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.TOP) .grab(false, true).applyTo(checkBar); ToolItem checkItem = new ToolItem(checkBar, SWT.PUSH); this.searchAllBranchesButton .setText(UIText.CommitSearchPage_SearchAllBranches); GridDataFactory.swtDefaults().grab(true, false).span(2, 1) .applyTo(this.searchAllBranchesButton);
GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.BEGINNING) .grab(false, false).applyTo(dropDownBar); final ToolItem dropDownItem = new ToolItem(dropDownBar, SWT.DROP_DOWN);