@Override protected Control createCustomArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); main.setLayout(new GridLayout(1, false)); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true) .applyTo(main); new NonDeletedFilesTree(main, repository, this.conflicts); applyDialogFont(main); return main; }
@Override protected Control createCustomArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true).applyTo( main); main.setLayout(new GridLayout(1, false)); tree = new NonDeletedFilesTree(main, repository, filePaths); applyDialogFont(main); return main; }
private static Text createIndentedLabel(Composite main, String text) { Text widget = UIUtils.createSelectableLabel(main, 0); widget.setText(text); // Eclipse 4.3: Use LayoutConstants.getIndent once we depend on 4.3 int indent = 20; GridDataFactory.fillDefaults().grab(true, false).indent(indent, 0) .applyTo(widget); return widget; }
@Override protected Control createCustomArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); main.setLayout(new GridLayout(1, false)); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true) .applyTo(main); new NonDeletedFilesTree(main, repository, this.result.getConflictList()); applyDialogFont(main); return main; }
public void createControl(final Composite parent) { container = createComposite(parent); separator = new Label(container, SWT.HORIZONTAL | SWT.SEPARATOR); separator.setLayoutData(layoutDataFactory.indent(0, 5).create()); createTitleArea(); status = createComposite(container); content = createComposite(container); hide(); }
bareButton = new Button(main, SWT.CHECK); bareButton.setText(UIText.CreateRepositoryPage_BareCheckbox); GridDataFactory.fillDefaults().indent(10, 0).span(3, 1) .applyTo(bareButton);
@Override protected Control createMessageArea(Composite composite) { Composite main = new Composite(composite, SWT.NONE); main.setLayout(new GridLayout(2, false)); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true).applyTo( main); // add error image super.createMessageArea(main); StyledText text = new StyledText(main, SWT.FULL_SELECTION | SWT.WRAP); text.setEnabled(false); text.setBackground(main.getBackground()); String messageText = NLS.bind(UIText.CloneFailureDialog_checkList, cause); int newLinesCount = messageText.split("\n").length; //$NON-NLS-1$ Bullet bullet = createBullet(main); text.setText(messageText); text.setLineBullet(newLinesCount - 4, 2, bullet); return main; }
private static Composite createComposite(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true) .applyTo(main); GridLayoutFactory.fillDefaults().spacing(0, 0).numColumns(2) .applyTo(main); return main; } }
@Override protected Control createDialogArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(main); GridDataFactory.fillDefaults().indent(5, 5).grab(true, true).applyTo( main); Label nameLabel = new Label(main, SWT.NONE); nameLabel.setText(UIText.NewRemoteDialog_NameLabel); nameText = new Text(main, SWT.BORDER); GridDataFactory.fillDefaults().grab(true, false).applyTo(nameText); nameText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { checkPage(); } }); forPush = new Button(main, SWT.RADIO); GridDataFactory.fillDefaults().span(2, 1).applyTo(forPush); forPush.setText(UIText.NewRemoteDialog_PushRadio); forPush.setSelection(true); Button forFetch = new Button(main, SWT.RADIO); GridDataFactory.fillDefaults().span(2, 1).applyTo(forFetch); forFetch.setText(UIText.NewRemoteDialog_FetchRadio); nameText.setFocus(); applyDialogFont(main); return main; }
@Override protected Control createContent(Composite parent, FormToolkit toolkit) { Composite composite = toolkit.createComposite(parent); composite.setLayout(new GridLayout()); Label label = createLabel(composite, toolkit, "Plan:"); GridDataFactory.defaultsFor(label).indent(0, 0).applyTo(label); Text text = createTextReadOnly(composite, toolkit, ""); bind(text, IBuildPlan.class, BuildPackage.Literals.BUILD_ELEMENT__NAME); label = createLabel(composite, toolkit, "Build:"); GridDataFactory.defaultsFor(label).indent(12, 0).applyTo(label); text = createTextReadOnly(composite, toolkit, ""); bind(text, IBuild.class, BuildPackage.Literals.BUILD__BUILD_NUMBER); label = createLabel(composite, toolkit, "Status: "); GridDataFactory.defaultsFor(label).indent(12, 0).applyTo(label); text = createTextReadOnly(composite, toolkit, ""); //bind(text, IBuild.class, BuildPackage.Literals.BUILD__STATUS); IBuild build = getInput(IBuild.class); text.setText(getStatusLabel(build)); label = createLabel(composite, toolkit, "Duration: "); GridDataFactory.defaultsFor(label).indent(12, 0).applyTo(label); text = createTextReadOnly(composite, toolkit, ""); text.setText(DateUtil.getFormattedDurationShort(build.getDuration(), true)); ((GridLayout) composite.getLayout()).numColumns = composite.getChildren().length; toolkit.paintBordersFor(composite); return composite; }
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());
public SourceCodeArea(final Composite parent) { super(parent, null, null, false, SWT.READ_ONLY | SWT.WRAP, store); configure(configuration); getTextWidget().setFont(ExtdocUtils.CODEFONT); setEditable(false); getTextWidget().setLayoutData(GridDataFactory.fillDefaults().indent(20, 0).create()); }
table.setLayoutData(GridDataFactory.fillDefaults().indent(10, 0).create()); final TableColumn column1 = new TableColumn(table, SWT.NONE); final TableColumn column2 = new TableColumn(table, SWT.NONE);
Composite main = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(main); GridDataFactory.fillDefaults().grab(true, false).indent(5, 5) .applyTo(main);
g.setText(UIText.ResetTargetSelectionDialog_ResetTypeGroup); GridDataFactory.fillDefaults().grab(true, false).span(2, 1) .indent(0, 5).applyTo(g); GridLayoutFactory.swtDefaults().applyTo(g);
GridDataFactory.fillDefaults().grab(true, true).indent(FormLayoutFactory.CONTROL_HORIZONTAL_INDENT, 0).applyTo(fLicenseEntry.getText()); GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.BEGINNING).grab(false, false).applyTo(fLicenseEntry.getLabel());
table.setBackground(createColor(COLOR_INFO_BACKGROUND)); table.setForeground(createColor(COLOR_INFO_FOREGROUND)); table.setLayoutData(GridDataFactory.fillDefaults().indent(10, 0).create());
Composite main = new Composite(parent, SWT.NONE); GridLayoutFactory.swtDefaults().applyTo(main); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true).applyTo( main); Group fetchResultGroup = new Group(main, SWT.SHADOW_ETCHED_IN);
GridDataFactory.defaultsFor(label).indent(0, 0).applyTo(label); text = createTextReadOnly(composite, toolkit, ""); bind(text, IBuild.class, GridDataFactory.defaultsFor(label).indent(0, 0).applyTo(label); text = createTextReadOnly(composite, toolkit, ""); bind(text, IBuild.class, GridDataFactory.defaultsFor(label).indent(0, 0).applyTo(label); text = createTextReadOnly(composite, toolkit, ""); bind(text, IBuild.class,
if (content.getLayout() instanceof GridLayout) { GridDataFactory.fillDefaults() .indent(0, 5) .grab(true, false) .span(((GridLayout) content.getLayout()).numColumns, SWT.DEFAULT)