private static GridLayoutFactory getPopupLayout() { if (popupLayoutFactory == null) { popupLayoutFactory = GridLayoutFactory.fillDefaults() .margins(POPUP_MARGINWIDTH, POPUP_MARGINHEIGHT) .spacing(POPUP_HORIZONTALSPACING, POPUP_VERTICALSPACING); } return popupLayoutFactory; }
private static GridLayoutFactory getPopupLayout() { if (popupLayoutFactory == null) { popupLayoutFactory = GridLayoutFactory.fillDefaults() .margins(POPUP_MARGINWIDTH, POPUP_MARGINHEIGHT) .spacing(POPUP_HORIZONTALSPACING, POPUP_VERTICALSPACING); } return popupLayoutFactory; }
/** * 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 ) ); }
private void createHandlerLocationControls(Composite parent) { handlerComposite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(handlerComposite); GridDataFactory.fillDefaults().grab(true, false).applyTo(handlerComposite); new Label(handlerComposite, SWT.NONE).setText(IDEWorkbenchMessages.UrlHandlerPreferencePage_Handler_Label); handlerLocation = new Text(handlerComposite, SWT.READ_ONLY | SWT.BORDER); handlerLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); handlerComposite.setVisible(false); // set visible on table selection }
private Composite createSectionClient(Section parent, FormToolkit toolkit) { Composite client = toolkit.createComposite(parent); GridLayoutFactory.fillDefaults().extendedMargins(2, 2, 2, 2) .applyTo(client); return client; }
protected Control createExtendedContentArea(Composite parent) { Composite displayArea = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(displayArea); Link link = new Link(displayArea, SWT.NONE); link.setText(UIText.CommitSelectionDialog_LinkSearch); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { close(); NewSearchUI.openSearchDialog(PlatformUI.getWorkbench() .getActiveWorkbenchWindow(), CommitSearchPage.ID); } }); return displayArea; }
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; }
@Override protected Control createDialogArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); GridLayoutFactory.fillDefaults().numColumns(2).margins(5, 5) .applyTo(main); new Label(main, SWT.NONE) .setText(UIText.BranchRenameDialog_NewNameLabel); name = new Text(main, SWT.BORDER); GridDataFactory.fillDefaults().grab(true, false).applyTo(name); return main; }
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); }
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 createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(0) // this is incremented // by createButton .equalWidth(true).applyTo(composite); GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).span(2, 1) .applyTo(composite); composite.setFont(parent.getFont()); // Add the buttons to the button bar. createButtonsForButtonBar(composite); return composite; }
protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(0) // this is incremented // by createButton .equalWidth(true).applyTo(composite); GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).span(2, 1) .applyTo(composite); composite.setFont(parent.getFont()); // Add the buttons to the button bar. createButtonsForButtonBar(composite); return composite; }
@Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(0) // this is incremented // by createButton .equalWidth(true).applyTo(composite); GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).span(2, 1) .applyTo(composite); composite.setFont(parent.getFont()); // Add the buttons to the button bar. createButtonsForButtonBar(composite); return composite; }
@Override protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); boolean isWin32 = Util.isWindows(); GridLayoutFactory.fillDefaults().extendedMargins(isWin32 ? 0 : 3, 3, 2, 2) .applyTo(composite); Table table = contents.createTable(composite, getDefaultOrientation()); table.addKeyListener(getKeyAdapter()); return composite; }
private void createTagsArea(Composite parent, FormToolkit toolkit, int span) { Composite tagArea = toolkit.createComposite(parent); GridLayoutFactory.fillDefaults().numColumns(2).equalWidth(false) .applyTo(tagArea); GridDataFactory.fillDefaults().span(span, 1).grab(true, false) .applyTo(tagArea); toolkit.createLabel(tagArea, UIText.CommitEditorPage_LabelTags) .setForeground( toolkit.getColors().getColor(IFormColors.TB_TOGGLE)); tagLabelArea = toolkit.createComposite(tagArea); GridDataFactory.fillDefaults().grab(true, true).applyTo(tagLabelArea); GridLayoutFactory.fillDefaults().spacing(1, 1).applyTo(tagLabelArea); }
protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
@Override protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
@Override protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }