/** * Creates a copy of the reciever. * * @return a copy of the reciever */ public GridLayoutFactory copy() { return new GridLayoutFactory(create()); }
/** * Creates a copy of the receiver. * * @return a copy of the receiver */ public GridLayoutFactory copy() { return new GridLayoutFactory(create()); }
/** * Creates a copy of the reciever. * * @return a copy of the reciever */ public GridLayoutFactory copy() { return new GridLayoutFactory(create()); }
private Composite createComposite(final Composite parent) { final Composite c = new Composite(parent, SWT.NONE); setInfoBackgroundColor(c); c.setLayout(layoutFactory.create()); c.setLayoutData(layoutDataFactory.create()); return c; }
/** * This method is responsible for creating details area on the specified * Composite and displaying specified StatusAdapter * * @param parent * A composite on which should be the details area created. * @param statusAdapter * StatusAdapter for which should be the details area * created. */ public void createDetailsArea(Composite parent, StatusAdapter statusAdapter) { Composite container = new Composite(parent, SWT.NONE); container.setLayout(GridLayoutFactory.fillDefaults().create()); container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); getProvider().createSupportArea(container, statusAdapter); control = container; }
private void layoutControls( Composite composite ) { composite.setLayout( GridLayoutFactory.fillDefaults().margins( 3, 0 ).create() ); progressBar.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) ); }
public static Composite createGridComposite(final Composite parent, final int columns, final int hSpacing, final int vSpacing, final int hMargin, final int vMargin) { final Composite composite = new Composite(parent, SWT.NONE); setInfoBackgroundColor(composite); final GridLayout layout = GridLayoutFactory.swtDefaults().numColumns(columns).margins(hMargin, vMargin) .spacing(hSpacing, vSpacing).create(); composite.setLayout(layout); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); return composite; }
public static Composite createComposite(final Composite parent, final int numColumns) { final Composite container = new Composite(parent, SWT.NONE); setInfoBackgroundColor(container); container.setLayout(GridLayoutFactory.fillDefaults().margins(10, 0).spacing(0, 0).numColumns(numColumns) .create()); container.setLayoutData(GridDataFactory.fillDefaults().create()); return container; }
private void createConfigurationBlock(final Composite composite) { enablement = new ContentAssistEnablementBlock(composite, Messages.PREFPAGE_ENABLE_CALL_COMPLETION, CallsCompletionProposalComputer.CATEGORY_ID); final Composite group = new Composite(composite, SWT.NONE); group.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).create()); group.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); maxProposals = createIntegerField(group, ID_MAX_PROPOSALS, Messages.PREFPAGE_MAX_NUMBER_OF_PROPOSALS, 1, 100); minProbability = createIntegerField(group, ID_MIN_PROBABILITY, Messages.PREFPAGE_MIN_PROBABILITY_OF_PROPOSAL, 1, 100); }
public SectionComposite(Composite parent, int style) { super(parent, style | SWT.V_SCROLL); addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { if (toolkit != null) { toolkit.dispose(); toolkit = null; } } }); content = new Composite(this, SWT.NONE); content.setLayout(GridLayoutFactory.fillDefaults().create()); setContent(content); content.setBackground(null); setExpandVertical(true); setExpandHorizontal(true); }
public void createContents(Composite parent, int numColumns) { if (fFormatters.length <= 1) { return; // No selector is needed since there is only one formatter. } Composite composite= new Composite(parent, SWT.NONE); composite.setLayout(GridLayoutFactory.fillDefaults().margins(0, 10).numColumns(2).create()); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan= numColumns; composite.setLayoutData(gd); composite.setFont(parent.getFont()); Label label= new Label(composite, SWT.NONE); label.setText(FormatterMessages.CustomCodeFormatterBlock_formatter_name); fFormatterCombo= new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY); fFormatterCombo.setFont(composite.getFont()); fFormatterCombo.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleFormatterChanged(); } }); for (FormatterContribution formatter : fFormatters) { fFormatterCombo.add(formatter.fName); } initDefault(); }
public void createContents(Composite parent, int numColumns) { if (fFormatters.length <= 1) { return; // No selector is needed since there is only one formatter. } Composite composite= new Composite(parent, SWT.NONE); composite.setLayout(GridLayoutFactory.fillDefaults().margins(0, 10).numColumns(2).create()); GridData gd= new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan= numColumns; composite.setLayoutData(gd); composite.setFont(parent.getFont()); Label label= new Label(composite, SWT.NONE); label.setText(FormatterMessages.CustomCodeFormatterBlock_formatter_name); fFormatterCombo= new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY); fFormatterCombo.setFont(composite.getFont()); fFormatterCombo.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleFormatterChanged(); } }); for (FormatterContribution formatter : fFormatters) { fFormatterCombo.add(formatter.fName); } initDefault(); }
@Override protected void createButtonsForButtonBar(Composite parent) { parent.setLayout(GridLayoutFactory.swtDefaults().create()); parent.setLayoutData(GridDataFactory.fillDefaults().grab(true, false) .create()); Button clearButton = createButton(parent, CLEAR_ID, UIText.CreateTagDialog_clearButton, false); clearButton.setToolTipText(UIText.CreateTagDialog_clearButtonTooltip); setButtonLayoutData(clearButton); Composite margin = new Composite(parent, SWT.NONE); margin.setLayoutData(GridDataFactory.fillDefaults().grab(true, false) .create()); super.createButtonsForButtonBar(parent); validateInput(); }
body.setLayout(GridLayoutFactory.fillDefaults().create()); body.setBackgroundMode(SWT.INHERIT_FORCE);
private void createLeftSection(SashForm mainForm) { Composite left = new Composite(mainForm, SWT.RESIZE); left.setLayout(GridLayoutFactory.swtDefaults().margins(10, 5).create()); left.setLayoutData(GridDataFactory.fillDefaults().grab(true, true) .create());
buttonComposite.setFont(parent.getFont()); buttonComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(0).equalWidth(true).create());
advancedComposite.setLayout(GridLayoutFactory.swtDefaults().create()); advancedComposite.setLayoutData(GridDataFactory.fillDefaults() .grab(true, true).create());
private void createExistingTagsSection(Composite parent) { Composite right = new Composite(parent, SWT.NORMAL); right.setLayout(GridLayoutFactory.swtDefaults().create()); right.setLayoutData(GridDataFactory.fillDefaults().create());
commits = new ArrayList<ComboCommitEnt>(); setLayout(GridLayoutFactory.swtDefaults().create()); setLayoutData(GridDataFactory.fillDefaults().create());