org.eclipse.swt.widgets.Composite

Here are the examples of the java api class org.eclipse.swt.widgets.Composite taken from open source projects.

1. RelationSetEditorPart#setupCommandButtons()

Project: depan
Source File: RelationSetEditorPart.java
View license
private Composite setupCommandButtons(Composite parent) {
    Composite result = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    result.setLayout(layout);
    Composite pickerRegion = setupRelationSetSelector(result);
    pickerRegion.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    Composite selectVis = setupSelectionVisible(result);
    selectVis.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    Composite tableVis = setupTableVisible(result);
    tableVis.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    return result;
}

2. KarafFeaturesFormPage#createFormContent()

View license
@Override
protected void createFormContent(final IManagedForm managedForm) {
    final GridLayout layout = new GridLayout(2, true);
    GridData data = new GridData(GridData.FILL_BOTH);
    managedForm.getForm().getBody().setLayout(layout);
    managedForm.getForm().getBody().setLayoutData(data);
    managedForm.getForm().setText("Manage Platform Features");
    final Composite left = managedForm.getToolkit().createComposite(managedForm.getForm().getBody());
    data = new GridData(GridData.FILL_BOTH);
    left.setLayout(new GridLayout(1, true));
    left.setLayoutData(data);
    final Composite right = managedForm.getToolkit().createComposite(managedForm.getForm().getBody());
    data = new GridData(GridData.FILL_BOTH);
    right.setLayout(new GridLayout(1, false));
    right.setLayoutData(data);
}

3. GeneralPreferencePage#createContents()

Project: idecore
Source File: GeneralPreferencePage.java
View license
@Override
protected Control createContents(Composite parent) {
    Composite entryTable = new Composite(parent, 0);
    GridData data = new GridData(768);
    data.grabExcessHorizontalSpace = true;
    entryTable.setLayoutData(data);
    GridLayout layout = new GridLayout();
    entryTable.setLayout(layout);
    Composite colorComposite = new Composite(entryTable, 0);
    colorComposite.setLayout(new GridLayout());
    colorComposite.setLayoutData(new GridData(768));
    return entryTable;
}

4. SelectExistingOrCreateNewDialog#createTreeViewer()

View license
/* (non-Javadoc)
     * @see org.eclipse.ui.dialogs.ElementTreeSelectionDialog#createTreeViewer(org.eclipse.swt.widgets.Composite)
     */
@Override
protected TreeViewer createTreeViewer(Composite parent) {
    Composite composite = new Composite(parent, SWT.None);
    GridLayout gridLayout = new GridLayout(2, false);
    gridLayout.marginWidth = 0;
    composite.setLayout(gridLayout);
    GridData layoutData = new GridData(GridData.FILL_BOTH);
    composite.setLayoutData(layoutData);
    TreeViewer ret = super.createTreeViewer(composite);
    Composite buttonBox = new Composite(composite, SWT.NULL);
    GridData gridData = new GridData(SWT.END, SWT.FILL, false, false);
    buttonBox.setLayoutData(gridData);
    GridLayout layout = new GridLayout(1, true);
    layout.marginWidth = 0;
    buttonBox.setLayout(layout);
    btAdd = createPushButton(buttonBox, "Add");
    btRemove = createPushButton(buttonBox, "Remove (DEL)");
    return ret;
}

5. AbstractAnalysisPage#createControl()

Project: depan
Source File: AbstractAnalysisPage.java
View license
@Override
public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(1, true);
    layout.marginWidth = 0;
    layout.verticalSpacing = 9;
    container.setLayout(layout);
    IContainer outputContainer = WorkspaceTools.guessContainer(selection);
    String outputFilename = WorkspaceTools.guessNewFilename(outputContainer, defaultFilename, 1, 10);
    outputPart = new AnalysisOutputPart(this, outputContainer, outputFilename);
    Composite outputGroup = outputPart.createControl(container);
    outputGroup.setLayoutData(createHorzFillData());
    Composite sourceGroup = createSourceControl(container);
    sourceGroup.setLayoutData(createHorzFillData());
    updateStatus(getPageErrorMsg());
    setControl(container);
}

6. RelationSetEditorPart#getControl()

Project: depan
Source File: RelationSetEditorPart.java
View license
public Control getControl(Composite parent, RelationCheckedRepository visRepo) {
    this.shell = parent.getShell();
    Composite topLevel = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.verticalSpacing = 10;
    topLevel.setLayout(gridLayout);
    Composite commands = setupCommandButtons(topLevel);
    commands.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    viewer = new RelationSetRelationTableEditor(visRepo);
    table = viewer.setupViewer(topLevel);
    table.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    Composite saves = setupSaveButtons(topLevel);
    saves.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    return topLevel;
}

7. RelationPropertyEditorPart#getControl()

View license
public Control getControl(Composite parent, RelPropRepository propRepo) {
    this.shell = parent.getShell();
    Composite topLevel = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.verticalSpacing = 10;
    topLevel.setLayout(gridLayout);
    Composite commands = setupCommandButtons(topLevel);
    commands.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    viewer = new RelationPropertyRelationTableEditor(propRepo);
    table = viewer.setupViewer(topLevel);
    table.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    Composite saves = setupSaveButtons(topLevel);
    saves.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    return topLevel;
}

8. CreateEntityDialog#createDialogArea()

Project: dbeaver
Source File: CreateEntityDialog.java
View license
@Override
protected Control createDialogArea(Composite parent) {
    getShell().setText(CoreMessages.dialog_struct_create_entity_title + entityType);
    Composite group = (Composite) super.createDialogArea(parent);
    GridData gd = new GridData(GridData.FILL_BOTH);
    group.setLayoutData(gd);
    Composite propsGroup = new Composite(group, SWT.NONE);
    propsGroup.setLayout(new GridLayout(2, false));
    gd = new GridData(GridData.FILL_HORIZONTAL);
    propsGroup.setLayoutData(gd);
    //$NON-NLS-2$
    final Text nameText = UIUtils.createLabelText(propsGroup, CoreMessages.dialog_struct_create_entity_group_name, null);
    nameText.addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            name = nameText.getText();
        }
    });
    return group;
}

9. ServerStatusView#createPartControl()

Project: scouter
Source File: ServerStatusView.java
View license
public void createPartControl(final Composite parent) {
    shell = parent.getShell();
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gLayout = new GridLayout(1, true);
    gLayout.horizontalSpacing = 0;
    gLayout.marginHeight = 0;
    gLayout.marginWidth = 0;
    composite.setLayout(gLayout);
    Composite textComposite = new Composite(composite, SWT.NONE);
    textComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    textComposite.setLayout(new FillLayout());
    browser = new Browser(textComposite, SWT.BORDER);
}

10. ObjectActiveServiceListView#initialLayout()

View license
private void initialLayout(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(1, true));
    errorLbl = new Label(composite, SWT.NONE);
    errorLbl.setForeground(ColorUtil.getInstance().getColor(SWT.COLOR_RED));
    GridData gr = new GridData(SWT.FILL, SWT.FILL, true, false);
    gr.exclude = true;
    errorLbl.setLayoutData(gr);
    errorLbl.setVisible(false);
    Composite tableComposite = new Composite(composite, SWT.NONE);
    tableComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    tableComposite.setLayout(new GridLayout(1, true));
    createTableViewer(tableComposite);
}

11. WhoView#initialLayout()

Project: scouter
Source File: WhoView.java
View license
private void initialLayout(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(1, true));
    Composite tableComposite = new Composite(composite, SWT.NONE);
    tableComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    tableComposite.setLayout(new GridLayout(1, true));
    createTableViewer(tableComposite);
    IToolBarManager man = getViewSite().getActionBars().getToolBarManager();
    man.add(new Action("Reload", ImageUtil.getImageDescriptor(Images.refresh)) {

        public void run() {
            load();
        }
    });
}

12. TopView#initialLayout()

Project: scouter
Source File: TopView.java
View license
private void initialLayout(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(1, true));
    Composite tableComposite = new Composite(composite, SWT.NONE);
    tableComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    tableComposite.setLayout(new GridLayout(1, true));
    createTableViewer(tableComposite);
    IToolBarManager man = getViewSite().getActionBars().getToolBarManager();
    man.add(new Action("Reload", ImageUtil.getImageDescriptor(Images.refresh)) {

        public void run() {
            load();
        }
    });
}

13. NetStatView#initialLayout()

Project: scouter
Source File: NetStatView.java
View license
private void initialLayout(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(1, true));
    Composite tableComposite = new Composite(composite, SWT.NONE);
    tableComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    tableComposite.setLayout(new GridLayout(1, true));
    createTableViewer(tableComposite);
    IToolBarManager man = getViewSite().getActionBars().getToolBarManager();
    man.add(new Action("Reload", ImageUtil.getImageDescriptor(Images.refresh)) {

        public void run() {
            load();
        }
    });
}

14. DiskUsageView#initialLayout()

Project: scouter
Source File: DiskUsageView.java
View license
private void initialLayout(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(1, true));
    Composite tableComposite = new Composite(composite, SWT.NONE);
    tableComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    tableComposite.setLayout(new GridLayout(1, true));
    createTableViewer(tableComposite);
    IToolBarManager man = getViewSite().getActionBars().getToolBarManager();
    man.add(new Action("Reload", ImageUtil.getImageDescriptor(Images.refresh)) {

        public void run() {
            load();
        }
    });
}

15. GraphNodeViewer#createNodeViewer()

Project: depan
Source File: GraphNodeViewer.java
View license
public Composite createNodeViewer(Composite parent) {
    Composite result = new Composite(parent, SWT.NONE);
    result.setLayout(new GridLayout(1, false));
    Composite optionsSection = new Composite(result, SWT.NONE);
    optionsSection.setLayout(new GridLayout(1, false));
    optionsSection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    ToolBar rightOptions = createToolBar(optionsSection);
    rightOptions.setLayoutData(new GridData(SWT.END, SWT.FILL, true, false));
    treeViewer = createTreeViewer(result);
    treeViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    return result;
}

16. SootConfigManagerDialog#createSpecialButtonBar()

Project: JAADAS
Source File: SootConfigManagerDialog.java
View license
/*
	 * @see Dialog#createButtonBar(Composite)
	 */
protected Control createSpecialButtonBar(Composite parent) {
    Composite composite = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
    applyDialogFont(composite);
    composite.setLayout(layout);
    GridData data = new GridData(GridData.VERTICAL_ALIGN_END | GridData.HORIZONTAL_ALIGN_CENTER);
    composite.setLayoutData(data);
    // Add the buttons to the button bar.
    createSpecialButtonsForButtonBar(composite);
    return composite;
}

17. HeaderPage#setup1ColumnLayout()

Project: uima-uimaj
Source File: HeaderPage.java
View license
public Composite setup1ColumnLayout(IManagedForm managedForm) {
    final ScrolledForm sform = managedForm.getForm();
    final Composite form = sform.getBody();
    // this is required !
    form.setLayout(new GridLayout(1, false));
    Composite xtra = toolkit.createComposite(form);
    xtra.setLayout(new GridLayout(1, false));
    xtra.setLayoutData(new GridData(GridData.FILL_BOTH));
    Control c = form.getParent();
    while (!(c instanceof ScrolledComposite)) c = c.getParent();
    ((GridData) xtra.getLayoutData()).widthHint = c.getSize().x;
    return xtra;
}

18. CollapseTool#setupComposite()

Project: depan
Source File: CollapseTool.java
View license
@Override
public Control setupComposite(Composite parent) {
    // first expand bar containing collapsing operations
    Composite topComposite = new Composite(parent, SWT.NONE);
    GridLayout topGrid = new GridLayout();
    topGrid.verticalSpacing = 9;
    topComposite.setLayout(topGrid);
    // Setup the collapse controls.
    TabFolder folder = createCollapseTabs(topComposite);
    folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    Composite treeControl = nodeViewer.createNodeViewer(topComposite);
    treeControl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    return topComposite;
}

19. RelationPropertyEditorPart#setupCommandButtons()

View license
private Composite setupCommandButtons(Composite parent) {
    Composite result = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    result.setLayout(layout);
    Composite pickerRegion = setupRelationSetSelector(result);
    pickerRegion.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    return result;
}

20. RemoveAnnotationDialog#createDialogArea()

Project: scouter
Source File: RemoveAnnotationDialog.java
View license
@Override
protected Control createDialogArea(Composite parent) {
    final Composite parent_composite = (Composite) super.createDialogArea(parent);
    final Composite composite = new Composite(parent_composite, SWT.NONE);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    composite.setLayout(new GridLayout(1, false));
    final Label removeLabel = new Label(composite, SWT.None);
    removeLabel.setLayoutData(new GridData());
    if (xyGraph.getPlotArea().getAnnotationList().size() > 0) {
        removeLabel.setText("Select the annotation to be removed: ");
        annotationsCombo = new Combo(composite, SWT.DROP_DOWN);
        annotationsCombo.setLayoutData(new GridData(SWT.FILL, 0, true, false));
        for (Annotation annotation : xyGraph.getPlotArea().getAnnotationList()) annotationsCombo.add(annotation.getName());
        annotationsCombo.select(0);
    } else {
        removeLabel.setText("There is no annotation on the graph.");
    }
    return parent_composite;
}

21. NewsBrowserControl#createPart()

Project: RSSOwl
Source File: NewsBrowserControl.java
View license
/*
   * @see org.rssowl.ui.internal.editors.feed.IFeedViewPart#createPart(org.eclipse.swt.widgets.Composite)
   */
public void createPart(Composite parent) {
    Composite container = new Composite(parent, SWT.None);
    container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    container.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 0, 0, false));
    container.setBackground(parent.getBackground());
    /* Info Bar to indicate new incoming news when in news paper view */
    createInfoBar(container);
    setInfoBarVisible(false, false);
    /* Browser Viewer for News */
    fViewer = new NewsBrowserViewer(container, SWT.NONE, fFeedViewSite) {

        @Override
        protected void onRefresh() {
            setInfoBarVisible(false);
        }
    };
    fViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
}

22. TutorialPage#createFinishPage()

Project: RSSOwl
Source File: TutorialPage.java
View license
private void createFinishPage(Composite container) {
    StyledText text = createStyledText(container, false);
    applyRichText(Messages.TutorialPage_FINISH_TEXT, text);
    Composite linkContainer = new Composite(container, SWT.NONE);
    linkContainer.setLayout(LayoutUtils.createGridLayout(1, 0, 0));
    linkContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    linkContainer.setBackground(container.getBackground());
    /* Further Links */
    //$NON-NLS-1$
    createHyperLink(linkContainer, Messages.TutorialPage_FAQ, "http://www.rssowl.org/help");
    //$NON-NLS-1$
    createHyperLink(linkContainer, Messages.TutorialPage_FORUMS, "http://sourceforge.net/projects/rssowl/forums");
    //$NON-NLS-1$
    createHyperLink(linkContainer, Messages.TutorialPage_REPORT_BUGS, "http://dev.rssowl.org");
    //$NON-NLS-1$
    createHyperLink(linkContainer, Messages.TutorialPage_CONTACT, "http://www.rssowl.org/contact");
    //$NON-NLS-1$
    createHyperLink(linkContainer, Messages.TutorialPage_WEBSITE, "http://www.rssowl.org");
}

23. StartupProgressDialog#createContents()

Project: RSSOwl
Source File: StartupProgressDialog.java
View license
/*
   * @see org.eclipse.jface.dialogs.IconAndMessageDialog#createContents(org.eclipse.swt.widgets.Composite)
   */
@Override
protected Control createContents(Composite parent) {
    initializeDialogUnits(parent);
    parent.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 0, 0, false));
    GridDataFactory.fillDefaults().grab(true, true).applyTo(parent);
    /* Title Area */
    Composite titleArea = new Composite(parent, SWT.None);
    titleArea.setLayout(LayoutUtils.createGridLayout(2, 0, 0, 0, 0, false));
    titleArea.setBackground(JFaceColors.getBannerBackground(parent.getDisplay()));
    GridDataFactory.fillDefaults().grab(true, true).applyTo(titleArea);
    createTitleArea(titleArea);
    /* Content Area */
    Composite contentArea = new Composite(parent, SWT.NONE);
    Point defaultSpacing = LayoutConstants.getSpacing();
    GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()).spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(2).applyTo(contentArea);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(contentArea);
    createDialogAndButtonArea(contentArea);
    return parent;
}

24. ErrorWizardPage#createControl()

Project: Pydev
Source File: ErrorWizardPage.java
View license
@Override
public void createControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NULL);
    composite.setLayout(new GridLayout());
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setFont(parent.getFont());
    Label label = new Label(composite, SWT.NONE);
    label.setFont(parent.getFont());
    label.setText(msg);
    setErrorMessage("Unexpected error.");
    setControl(composite);
}

25. WorkingDirectoryBlock#createComposite()

Project: Pydev
Source File: WorkingDirectoryBlock.java
View license
/**
     * Creates a Composite widget
     * @param parent the parent composite to add this composite to
     * @param columns the number of columns within the composite
     * @param hspan the horizontal span the composite should take up on the parent
     * @param fill the style for how this composite should fill into its parent
     * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
     * @param marginwidth the width of the margin to place around the composite (default is 5, specified by GridLayout)
     * @param marginheight the height of the margin to place around the composite (default is 5, specified by GridLayout)
     * @return the new group
     */
private static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) {
    Composite g = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(columns, false);
    layout.marginWidth = marginwidth;
    layout.marginHeight = marginheight;
    g.setLayout(layout);
    g.setFont(font);
    GridData gd = new GridData(fill);
    gd.horizontalSpan = hspan;
    g.setLayoutData(gd);
    return g;
}

26. KeyAssistDialog#createDialogArea()

Project: Pydev
Source File: KeyAssistDialog.java
View license
/**
     * Creates the content area for the key assistant. This creates a table and
     * places it inside the composite. The composite will contain a list of all
     * the key bindings.
     * 
     * @param parent
     *            The parent composite to contain the dialog area; must not be
     *            <code>null</code>.
     */
@Override
protected final Control createDialogArea(final Composite parent) {
    // First, register the shell type with the context support
    registerShellType();
    // Create a composite for the dialog area.
    final Composite composite = new Composite(parent, SWT.NONE);
    final GridLayout compositeLayout = new GridLayout();
    compositeLayout.marginHeight = 0;
    compositeLayout.marginWidth = 0;
    composite.setLayout(compositeLayout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setBackground(parent.getBackground());
    // Layout the partial matches.
    if (keybindingToActionInfo.isEmpty()) {
        createEmptyDialogArea(composite);
    } else {
        createTableDialogArea(composite);
    }
    return composite;
}

27. ShowProcessOutputDialog#createDialogArea()

Project: Pydev
Source File: ShowProcessOutputDialog.java
View license
/**
     * Create the dialog contents
     */
@Override
protected Control createDialogArea(Composite parent) {
    Composite top = (Composite) super.createDialogArea(parent);
    Composite composite = new Composite(top, SWT.None);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    composite.setLayout(new GridLayout(NUMBER_OF_COLUMNS, false));
    //--- main output
    output = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
    GridData gridData = new GridData(GridData.FILL_BOTH);
    gridData.horizontalSpan = NUMBER_OF_COLUMNS;
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = true;
    output.setLayoutData(gridData);
    return top;
}

28. ExpandedContentManagerTest#testShowTransformationBrowserh()

View license
@Test
public void testShowTransformationBrowserh() {
    TransGraph transGraphMock = mock(TransGraph.class);
    Control control1 = mock(Control.class);
    Control control2 = mock(Control.class);
    Browser browser = mock(Browser.class);
    SashForm sash = mock(SashForm.class);
    when(sash.getWeights()).thenReturn(new int[] { 277, 722 });
    Composite comp1 = mock(Composite.class);
    Composite comp2 = mock(Composite.class);
    Composite comp3 = mock(Composite.class);
    Composite comp4 = mock(Composite.class);
    when(browser.getParent()).thenReturn(comp1);
    when(comp1.getParent()).thenReturn(comp2);
    when(comp2.getParent()).thenReturn(comp3);
    when(comp3.getParent()).thenReturn(sash);
    when(comp4.getParent()).thenReturn(sash);
    Control[] children = new Control[] { control1, control2, browser };
    when(transGraphMock.getChildren()).thenReturn(children);
    ExpandedContentManager.createExpandedContent(transGraphMock, "");
}

29. NewGrailsProjectWizardPageOne#createControl()

View license
/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
	 */
public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    final Composite composite = new Composite(parent, SWT.NULL);
    composite.setFont(parent.getFont());
    composite.setLayout(initGridLayout(new GridLayout(1, false), true));
    composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
    // create UI elements
    Control nameControl = createNameControl(composite);
    nameControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Control grailsHomeControl = grailsInstallGroup.createControl(composite);
    grailsHomeControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Control locationControl = createLocationControl(composite);
    locationControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Control workingSetControl = createWorkingSetControl(composite);
    workingSetControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    setControl(composite);
}

30. SWTFactory#createComposite()

Project: goclipse
Source File: SWTFactory.java
View license
/**
	 * Creates a Composite widget
	 * @param parent the parent composite to add this composite to
	 * @param font the font to set on the control
	 * @param style the style bits for the composite. See {@link Composite} for details on supported style bits
	 * @param columns the number of columns within the composite
	 * @param hspan the horizontal span the composite should take up on the parent
	 * @param fill the style for how this composite should fill into its parent
	 * @param marginwidth the width of the margin to place on the sides of the composite (default is 5, specified by GridLayout)
	 * @param marginheight the height of the margin to place o the top and bottom of the composite
	 * @return the new composite
	 * @since 3.6
	 */
public static Composite createComposite(Composite parent, Font font, int style, int columns, int hspan, int fill, int marginwidth, int marginheight) {
    Composite g = new Composite(parent, style);
    GridLayout layout = new GridLayout(columns, false);
    layout.marginWidth = marginwidth;
    layout.marginHeight = marginheight;
    g.setLayout(layout);
    g.setFont(font);
    GridData gd = new GridData(fill);
    gd.horizontalSpan = hspan;
    g.setLayoutData(gd);
    return g;
}

31. SWTFactory#createComposite()

Project: goclipse
Source File: SWTFactory.java
View license
/**
	 * Creates a Composite widget
	 * @param parent the parent composite to add this composite to
	 * @param font the font to set on the control
	 * @param columns the number of columns within the composite
	 * @param hspan the horizontal span the composite should take up on the parent
	 * @param fill the style for how this composite should fill into its parent
	 * @param marginwidth the width of the margin to place on the sides of the composite (default is 5, specified by GridLayout)
	 * @param marginheight the height of the margin to place o the top and bottom of the composite
	 * @return the new composite
	 * @since 3.3
	 */
public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) {
    Composite g = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(columns, false);
    layout.marginWidth = marginwidth;
    layout.marginHeight = marginheight;
    g.setLayout(layout);
    g.setFont(font);
    GridData gd = new GridData(fill);
    gd.horizontalSpan = hspan;
    g.setLayoutData(gd);
    return g;
}

32. LangArgumentsTab#createControl()

Project: goclipse
Source File: LangArgumentsTab.java
View license
@Override
public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);
    GridLayout layout = new GridLayout(1, true);
    comp.setLayout(layout);
    comp.setFont(parent.getFont());
    GridData gd = new GridData(GridData.FILL_BOTH);
    comp.setLayoutData(gd);
    setHelpContextId();
    argumentsBlock.createComponent(comp, new GridData(GridData.FILL_BOTH));
    workingDirectoryBlock.createControl(comp);
}

33. EditCommentDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    Composite area = (Composite) super.createDialogArea(parent);
    Composite container = new Composite(area, SWT.NONE);
    container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    GridLayout layout = new GridLayout(2, false);
    container.setLayout(layout);
    if (mode == Mode.REPLY) {
        createReplyToAuthor(container);
        createReplyToText(container);
    }
    createCommentText(container);
    createResolvedWidget(container);
    commentText.setFocus();
    return area;
}

34. AbstractTableSection#createButtonComposite()

View license
protected Composite createButtonComposite(Composite parent) {
    Composite buttonComp = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.horizontalSpacing = 2;
    layout.verticalSpacing = 2;
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.numColumns = 1;
    buttonComp.setLayout(layout);
    buttonComp.setBackground(toolkit.getColors().getBackground());
    buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
    return buttonComp;
}

35. ConfirmInstallDialog#createDialogArea()

View license
/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
	 */
protected Control createDialogArea(Composite parent) {
    // create a composite with standard margins and spacing
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setFont(parent.getFont());
    Label label = new Label(composite, SWT.WRAP);
    label.setText(NLS.bind(Messages.installMessage, new String[] { installPath }));
    GridData data = new GridData();
    data.widthHint = 400;
    label.setLayoutData(data);
    Dialog.applyDialogFont(composite);
    return composite;
}

36. MainTab#createControl()

Project: angularjs-eclipse
Source File: MainTab.java
View license
/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.
	 * swt.widgets.Composite)
	 */
@Override
public void createControl(Composite parent) {
    Composite mainComposite = new Composite(parent, SWT.NONE);
    setControl(mainComposite);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    mainComposite.setLayout(layout);
    mainComposite.setLayoutData(gridData);
    mainComposite.setFont(parent.getFont());
    createLocationComponent(mainComposite);
    createWorkDirectoryComponent(mainComposite);
    createArgumentComponent(mainComposite);
    createVerticalSpacer(mainComposite, 2);
    Dialog.applyDialogFont(parent);
}

37. ExtendedButtonDialog#createExtendedButtonBar()

View license
protected Control createExtendedButtonBar(final Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    // create a layout with spacing and margins appropriate for the font
    // size.
    final GridLayout layout = new GridLayout();
    // this is incremented by createButton
    layout.numColumns = 0;
    layout.makeColumnsEqualWidth = true;
    layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
    composite.setLayout(layout);
    composite.setFont(parent.getFont());
    // Add the buttons to the button bar.
    createButtonsForExtendedButtonBar(composite);
    return composite;
}

38. WebBrowserView#createBrowserBar()

Project: RSSOwl
Source File: WebBrowserView.java
View license
private void createBrowserBar(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(LayoutUtils.createGridLayout(2, 3, 0, 0, 2, false));
    ((GridLayout) container.getLayout()).marginBottom = 2;
    container.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    /* Navigation ToolBar */
    createNavigationToolBar(container);
    /* Location Field */
    createLocationInput(container);
}

39. TutorialPage#createControl()

Project: RSSOwl
Source File: TutorialPage.java
View license
/*
   * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
   */
public void createControl(Composite parent) {
    /* Title Image */
    setImageDescriptor(getTitleImage());
    /* Container */
    final Composite container = new Composite(parent, SWT.BORDER);
    container.setLayout(new GridLayout(1, false));
    container.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    /* Contents */
    SafeRunnable.run(new ISafeRunnable() {

        public void run() throws Exception {
            createContents(container);
        }

        public void handleException(Throwable th) {
            Activator.safeLogError(th.getMessage(), th);
        }
    });
    Dialog.applyDialogFont(container);
    setControl(container);
}

40. MiscPreferencePage#createMiscOptions()

Project: RSSOwl
Source File: MiscPreferencePage.java
View license
private void createMiscOptions(Composite container) {
    Label label = new Label(container, SWT.NONE);
    label.setText(Messages.MiscPreferencePage_MISC);
    label.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
    /* Group */
    Composite miscGroup = new Composite(container, SWT.None);
    miscGroup.setLayout(LayoutUtils.createGridLayout(1, 7, 3));
    miscGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fReopenFeedsOnStartupCheck = new Button(miscGroup, SWT.CHECK);
    fReopenFeedsOnStartupCheck.setText(Messages.MiscPreferencePage_REOPEN_LAST_OPENED);
    fReopenFeedsOnStartupCheck.setSelection(fEclipseScope.getBoolean(DefaultPreferences.ECLIPSE_RESTORE_TABS));
    fOpenOnSingleClick = new Button(miscGroup, SWT.CHECK);
    fOpenOnSingleClick.setText(Messages.MiscPreferencePage_SINGLE_CLICK);
    fOpenOnSingleClick.setSelection(fEclipseScope.getBoolean(DefaultPreferences.ECLIPSE_SINGLE_CLICK_OPEN));
    if (!Application.IS_ECLIPSE) {
        fUpdateOnStartup = new Button(miscGroup, SWT.CHECK);
        fUpdateOnStartup.setText(Messages.MiscPreferencePage_UPDATE_ON_STARTUP);
        fUpdateOnStartup.setSelection(fGlobalScope.getBoolean(DefaultPreferences.UPDATE_ON_STARTUP));
    }
}

41. FeedsPreferencePage#createColumnsGroup()

Project: RSSOwl
Source File: FeedsPreferencePage.java
View license
private void createColumnsGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1, 10, 10));
    TabItem item = new TabItem(parent, SWT.None);
    item.setText(Messages.FeedsPreferencePage_COLUMNS);
    item.setControl(group);
    fColumnSelectionControl = new NewsColumnSelectionControl(group, SWT.NONE);
    fColumnSelectionControl.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fColumnSelectionControl.setInput(NewsColumnViewModel.loadFrom(fGlobalScope));
}

42. ComponentWizardPage#createProjectComposite()

Project: idecore
Source File: ComponentWizardPage.java
View license
protected void createProjectComposite(Composite parent) {
    final Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    group.setLayout(new GridLayout(3, false));
    final CLabel label = new CLabel(group, SWT.NONE);
    label.setLayoutData(new GridData(SWT.BEGINNING));
    label.setText("Project:");
    projectField = new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY);
    projectField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    projectField.addSelectionListener(projectSelectionListener);
    final List<IProject> projects = getProjects();
    projectField.setData(projects);
    projectField.setEnabled(!projects.isEmpty());
    for (final IProject project : projects) {
        projectField.add(project.getName());
    }
}

43. DeploymentOptions#createContents()

Project: idecore
Source File: DeploymentOptions.java
View license
@Override
protected Control createContents(Composite parent) {
    Composite deploymentComposite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 1;
    deploymentComposite.setLayout(gridLayout);
    deploymentComposite.setLayoutData(new GridData(SWT.BEGINNING, SWT.TOP, false, false));
    preferToolingDeploymentCheckbox = new Button(deploymentComposite, SWT.CHECK);
    preferToolingDeploymentCheckbox.setText(UIMessages.getString("DeploymentOptions_UseToolingAPI"));
    loadFromPreferences();
    return deploymentComposite;
}

44. GrailsInplaceDialog#createComposites()

Project: grails-ide
Source File: GrailsInplaceDialog.java
View license
private void createComposites() {
    // Composite for filter text and tree
    composite = new Composite(dialogShell, SWT.RESIZE);
    GridLayout layout = new GridLayout(1, false);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    line1 = new Composite(composite, SWT.NONE);
    layout = new GridLayout(3, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    line1.setLayout(layout);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(line1);
    createHorizontalSeparator(composite);
    line2 = new Composite(composite, SWT.FILL);
    layout = new GridLayout(3, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    line2.setLayout(layout);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(line2);
}

45. LangProjectWizardFirstPage#createControl()

View license
@Override
public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    Composite topControl = new Composite(parent, SWT.NULL);
    topControl.setLayoutData(new GridData(GridData.FILL_BOTH));
    topControl.setLayout(new GridLayout(1, false));
    createContents(topControl);
    setControl(topControl);
    Dialog.applyDialogFont(topControl);
}

46. GoSearchPage#createControl()

Project: goclipse
Source File: GoSearchPage.java
View license
//---- Action Handling ------------------------------------------------
@Override
public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    readConfiguration();
    Composite result = new Composite(parent, SWT.NONE);
    result.setFont(parent.getFont());
    GridLayout layout = new GridLayout(2, false);
    result.setLayout(layout);
    addTextPatternControls(result);
    setControl(result);
    Dialog.applyDialogFont(result);
}

47. AppraiseReviewsQueryPage#createPageContent()

View license
@Override
protected void createPageContent(SectionComposite parent) {
    Composite composite = parent.getContent();
    composite.setLayout(new GridLayout(2, false));
    requesterCheckbox = new Button(composite, SWT.CHECK);
    requesterCheckbox.setText("Requester");
    reviewerCheckbox = new Button(composite, SWT.CHECK);
    reviewerCheckbox.setText("Reviewer");
    Label reviewCommitPrefixLabel = new Label(composite, SWT.NONE);
    reviewCommitPrefixLabel.setText("Review Commit Hash (prefix):");
    reviewCommitPrefixText = new Text(composite, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
    composite.pack();
}

48. BannerPart#create()

Project: geronimo-devtools
Source File: BannerPart.java
View license
private void create() {
    Section section = getSection();
    GridData gd = new GridData();
    gd.horizontalSpan = 2;
    section.setLayoutData(gd);
    section.setText("");
    Composite composite = toolkit.createComposite(section);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginHeight = 1;
    layout.marginWidth = 1;
    layout.verticalSpacing = 5;
    layout.horizontalSpacing = 10;
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    section.setClient(composite);
    Label label = toolkit.createLabel(composite, "");
    label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
    label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
    label.setImage(defaultImgDesc.createImage());
}

49. GeronimoServerWizardFragment#createComposite()

View license
public Composite createComposite(Composite parent, IWizardHandle handle) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout grid = new GridLayout(2, false);
    grid.marginWidth = 0;
    container.setLayout(grid);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    handle.setImageDescriptor(Activator.getImageDescriptor(Activator.IMG_WIZ_GERONIMO));
    handle.setTitle(Messages.bind(Messages.newServerWizardTitle, getServerName()));
    handle.setDescription(Messages.bind(Messages.newServerWizardTitle, getServerName()));
    createContent(container, handle);
    return container;
}

50. GeronimoRuntimeWizardFragment#createComposite()

View license
/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.wst.server.ui.wizard.WizardFragment#createComposite(org.eclipse.swt.widgets.Composite,
	 *      org.eclipse.wst.server.ui.wizard.IWizardHandle)
	 */
public Composite createComposite(Composite parent, IWizardHandle handle) {
    this.fWizard = handle;
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout grid = new GridLayout(1, false);
    grid.marginWidth = 0;
    container.setLayout(grid);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    handle.setImageDescriptor(Activator.getImageDescriptor((Activator.IMG_WIZ_GERONIMO)));
    handle.setTitle(Messages.bind(Messages.runtimeWizardTitle, getRuntimeName()));
    String version = getRuntimeDelegate().getRuntime().getRuntimeType().getVersion();
    handle.setDescription(Messages.bind(Messages.runtimeWizardDescription, version));
    createContent(container, handle);
    return container;
}

51. GeronimoRuntimeSourceWizardFragment#createComposite()

View license
public Composite createComposite(Composite parent, IWizardHandle handle) {
    this.fWizard = handle;
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout grid = new GridLayout(1, false);
    grid.marginWidth = 0;
    container.setLayout(grid);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    handle.setImageDescriptor(Activator.getImageDescriptor((Activator.IMG_WIZ_GERONIMO)));
    handle.setTitle(Messages.sourceLocWizTitle);
    handle.setDescription(Messages.sourceLocWizDescription);
    createContent(container, handle);
    return container;
}

52. ServiceInputDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    Composite composite = (Composite) super.createDialogArea(parent);
    Composite inner = new Composite(composite, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.numColumns = 2;
    inner.setLayout(layout);
    fNameDialogField.doFillIntoGrid(inner, 2);
    fClassDialogField.doFillIntoGrid(inner, 2);
    LayoutUtil.setHorizontalGrabbing(fNameDialogField.getTextControl(null));
    LayoutUtil.setWidthHint(fNameDialogField.getTextControl(null), convertWidthInCharsToPixels(45));
    fNameDialogField.postSetFocusOnDialogField(parent.getDisplay());
    applyDialogFont(composite);
    return composite;
}

53. ImportWizardPage#createOptionsGroup()

Project: sling
Source File: ImportWizardPage.java
View license
@Override
protected void createOptionsGroup(Composite parent) {
    // not really options but to placement is good enough
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout());
    GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    container.setLayoutData(gridData);
    importLabel = new Label(container, SWT.NONE);
}

54. ObjectFileSocketView#createPartControl()

Project: scouter
Source File: ObjectFileSocketView.java
View license
public void createPartControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    composite.setLayout(new GridLayout(1, true));
    createTableViewer(composite);
    IToolBarManager man = getViewSite().getActionBars().getToolBarManager();
    man.add(new Action("Reload", ImageUtil.getImageDescriptor(Images.refresh)) {

        public void run() {
            load(0);
        }
    });
}

55. ExtractMethodComposite#createOffsetStrategy()

Project: Pydev
Source File: ExtractMethodComposite.java
View license
private void createOffsetStrategy(Composite mainComp) {
    FillLayout fillLayout = new FillLayout();
    fillLayout.type = org.eclipse.swt.SWT.VERTICAL;
    GridData gridData7 = new GridData();
    gridData7.horizontalSpan = 2;
    gridData7.verticalAlignment = GridData.CENTER;
    gridData7.grabExcessHorizontalSpace = true;
    gridData7.horizontalAlignment = GridData.FILL;
    Composite comboComp = new Composite(mainComp, SWT.NONE);
    comboComp.setLayoutData(gridData7);
    comboComp.setLayout(fillLayout);
    methodInsertionLbl = new CLabel(comboComp, SWT.NONE);
    methodInsertionLbl.setText(Messages.offsetStrategyInsertionPointMethod);
    methodInsertionComb = createComboViewer(comboComp);
    methodInsertionComb.getCombo().select(0);
}

56. ExtractMethodComposite#createArgumentsButton()

Project: Pydev
Source File: ExtractMethodComposite.java
View license
private void createArgumentsButton(Composite argumentsTableComposite) {
    Composite argumentsButtonComposite = new Composite(argumentsTableComposite, SWT.NONE);
    GridLayout compositeLayout = new GridLayout();
    compositeLayout.makeColumnsEqualWidth = true;
    FormData compositeLData = new FormData(0, 0);
    compositeLData.width = 80;
    compositeLData.bottom = new FormAttachment(1000, 1000, 0);
    compositeLData.right = new FormAttachment(1000, 1000, 0);
    compositeLData.top = new FormAttachment(0, 1000, 0);
    argumentsButtonComposite.setLayoutData(compositeLData);
    argumentsButtonComposite.setLayout(compositeLayout);
    editArgumentsButton = createButton(argumentsButtonComposite, Messages.extractMethodEditButton);
    editArgumentsButton.setEnabled(false);
    upArgumentsButton = createButton(argumentsButtonComposite, Messages.extractMethodUpButton);
    upArgumentsButton.setEnabled(false);
    downArgumentsButton = createButton(argumentsButtonComposite, Messages.extractMethodDownButton);
    downArgumentsButton.setEnabled(false);
}

57. PyConfigureExceptionDialog#createSelectionButtons()

View license
/**
     * Add the selection and deselection buttons to the dialog.
     * 
     * @param composite
     *            org.eclipse.swt.widgets.Composite
     */
protected void createSelectionButtons(Composite composite) {
    Composite buttonComposite = new Composite(composite, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 0;
    layout.marginWidth = 0;
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    buttonComposite.setLayout(layout);
    buttonComposite.setLayoutData(new GridData(SWT.END, SWT.TOP, true, false));
    createSelectAll(buttonComposite);
    createDeselectAll(buttonComposite);
}

58. SampleProjectSection#createContents()

View license
@Override
public void createContents(Composite page) {
    Composite group = new Composite(page, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    group.setLayout(layout);
    group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Label projectLabel = new Label(group, SWT.NONE);
    projectLabel.setText("Sample project:");
    sampleProjectField = new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY);
    sampleProjectField.setItems(getSampleProjectNames());
    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    data.widthHint = SIZING_TEXT_FIELD_WIDTH;
    sampleProjectField.setLayoutData(data);
    sampleProjectField.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
            sampleProjectExp.refresh();
        }
    });
    sampleProjectExp.refresh();
}

59. NewProjectNameSection#createContents()

View license
@Override
public void createContents(Composite page) {
    // project specification group
    Composite projectGroup = new Composite(page, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    projectGroup.setLayout(layout);
    projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Label projectLabel = new Label(projectGroup, SWT.NONE);
    projectLabel.setText("Project name:");
    projectNameField = new Text(projectGroup, SWT.BORDER);
    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    data.widthHint = SIZING_TEXT_FIELD_WIDTH;
    projectNameField.setLayoutData(data);
    projectNameField.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
            projectNameExp.refresh();
        }
    });
    projectNameExp.refresh();
}

60. ConsoleInplaceDialog#createComposites()

View license
private void createComposites() {
    // Composite for filter text and tree
    composite = new Composite(dialogShell, SWT.RESIZE);
    GridLayout layout = new GridLayout(1, false);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    line1 = new Composite(composite, SWT.FILL);
    layout = new GridLayout(3, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    line1.setLayout(layout);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(line1);
    createHorizontalSeparator(composite);
    line2 = new Composite(composite, SWT.FILL);
    layout = new GridLayout(3, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    line2.setLayout(layout);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(line2);
}

61. ProjectAndPreferencePage#createContents()

View license
/*
	 * @see
	 * org.eclipse.jface.preference.IPreferencePage#createContents(Composite)
	 */
@Override
protected Control createContents(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    composite.setLayout(layout);
    composite.setFont(parent.getFont());
    GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
    fConfigurationBlockControl = createPreferenceContent(composite);
    fConfigurationBlockControl.setLayoutData(data);
    if (isProjectPreferencePage()) {
        boolean useProjectSettings = hasProjectSpecificOptions(getProject());
        enableProjectSpecificSettings(useProjectSettings);
    }
    Dialog.applyDialogFont(composite);
    return composite;
}

62. InfoFieldSection#createContents()

View license
@Override
public void createContents(Composite page) {
    Composite composite = new Composite(page, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginWidth = 0;
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Label label = new Label(composite, SWT.NONE);
    label.setText(labelText);
    GridDataFactory.fillDefaults().hint(UIConstants.fieldLabelWidthHint(label), SWT.DEFAULT).align(SWT.BEGINNING, SWT.CENTER).applyTo(label);
    Label info = new Label(composite, SWT.NONE);
    info.setText(getInfoText());
    GridDataFactory.fillDefaults().grab(true, false).align(SWT.BEGINNING, SWT.BEGINNING).applyTo(info);
}

63. DerbyPropertiesPage#createContents()

Project: derby
Source File: DerbyPropertiesPage.java
View license
protected Control createContents(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    composite.setLayout(layout);
    GridData data = new GridData(GridData.FILL);
    data.grabExcessHorizontalSpace = true;
    composite.setLayoutData(data);
    addControls(composite);
    IProject proj = (IProject) getElement();
    try {
        dsProps = new DerbyProperties(proj);
        fillControls();
    } catch (CoreException ce) {
        Logger.log(SelectionUtil.getStatusMessages(ce), IStatus.ERROR);
    }
    return composite;
}

64. DerbyPropertiesPage#createDefaultComposite()

Project: derby
Source File: DerbyPropertiesPage.java
View license
protected Composite createDefaultComposite(Composite parent) {
    Composite composite = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    composite.setLayout(layout);
    GridData data = new GridData();
    data.verticalAlignment = GridData.FILL;
    data.horizontalAlignment = GridData.FILL;
    composite.setLayoutData(data);
    return composite;
}

65. GenerateSQLDialog#createDialogArea()

Project: dbeaver
Source File: GenerateSQLDialog.java
View license
@Override
protected Composite createDialogArea(Composite parent) {
    Composite composite = super.createDialogArea(parent);
    Composite controlsPanel = UIUtils.createPlaceholder(composite, 1, 5);
    GridData gd = new GridData(GridData.FILL_BOTH);
    //gd.heightHint = 300;
    controlsPanel.setLayoutData(gd);
    createControls(controlsPanel);
    Label divLabel = new Label(controlsPanel, SWT.SEPARATOR | SWT.HORIZONTAL);
    divLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    createSQLPanel(controlsPanel);
    return composite;
}

66. SocksProxyConfiguratorUI#createControl()

View license
@Override
public void createControl(Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.minimumHeight = 200;
    composite.setLayoutData(gd);
    composite.setLayout(new GridLayout(2, false));
    //$NON-NLS-2$
    hostText = UIUtils.createLabelText(composite, "Host", null);
    hostText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    portText = UIUtils.createLabelSpinner(composite, "Port", SocksConstants.DEFAULT_SOCKS_PORT, 0, 65535);
    //$NON-NLS-2$
    userNameText = UIUtils.createLabelText(composite, "User name", null);
    userNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    //$NON-NLS-2$
    passwordText = UIUtils.createLabelText(composite, "Password", "", SWT.BORDER | SWT.PASSWORD);
    UIUtils.createPlaceholder(composite, 1);
    savePasswordCheckbox = UIUtils.createCheckbox(composite, CoreMessages.dialog_connection_auth_checkbox_save_password, false);
}

67. EnterNameDialog#createDialogArea()

Project: dbeaver
Source File: EnterNameDialog.java
View license
@Override
protected Control createDialogArea(Composite parent) {
    getShell().setText(propertyName);
    Composite propGroup = new Composite(parent, SWT.NONE);
    GridLayout gl = new GridLayout(1, false);
    gl.marginHeight = 10;
    gl.marginWidth = 10;
    propGroup.setLayout(gl);
    GridData gd = new GridData(GridData.FILL_BOTH);
    propGroup.setLayoutData(gd);
    propNameText = UIUtils.createLabelText(propGroup, propertyName, null);
    if (propertyValue != null) {
        propNameText.setText(propertyValue);
        propNameText.selectAll();
    }
    return parent;
}

68. EmptyPreferencePage#createComposite()

Project: ccw
Source File: EmptyPreferencePage.java
View license
private Composite createComposite(Composite parent, int numColumns) {
    noDefaultAndApplyButton();
    Composite composite = new Composite(parent, SWT.NULL);
    // GridLayout
    GridLayout layout = new GridLayout();
    layout.numColumns = numColumns;
    composite.setLayout(layout);
    // GridData
    GridData data = new GridData(GridData.FILL);
    data.horizontalIndent = 0;
    data.verticalAlignment = GridData.FILL;
    data.horizontalAlignment = GridData.FILL;
    composite.setLayoutData(data);
    return composite;
}

69. ProjectListControl#createControl()

Project: bndtools
Source File: ProjectListControl.java
View license
public void createControl(final Composite parent) {
    createFilter(parent);
    GridLayout gridLayout = new GridLayout(1, false);
    gridLayout.marginWidth = 0;
    // Create the composite
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(gridLayout);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    createTableLayout(composite);
    createLegend(composite);
}

70. BundleTree#createControl()

Project: bndtools
Source File: BundleTree.java
View license
public void createControl() {
    setLayout(createGridLayout());
    setLayoutData(createFillGridData());
    sashForm = new SashForm(this, SWT.VERTICAL);
    sashForm.setLayout(createGridLayout());
    sashForm.setLayoutData(createFillGridData());
    createInfoViewer(sashForm);
    Composite composite = new Composite(sashForm, SWT.NONE);
    composite.setLayout(createGridLayout());
    composite.setLayoutData(createFillGridData());
    createBundleTreeViewer(composite);
    createButtons(composite);
    sashForm.setWeights(new int[] { 30, 70 });
}

71. ErrorList#addErrorItems()

Project: bndtools
Source File: ErrorList.java
View license
private void addErrorItems() {
    Composite comp = new Composite(container, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    gridLayout.marginWidth = 0;
    gridLayout.marginHeight = 0;
    comp.setLayout(gridLayout);
    comp.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    for (Error error : errors) {
        ErrorItem errorItem = new ErrorItem(error);
        errorItem.createControl(comp);
    }
}

72. WAEnvVarDialog#createContents()

View license
protected Control createContents(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout(2, false);
    container.setLayout(gridLayout);
    GridData gridData = new GridData();
    gridData.widthHint = 400;
    container.setLayoutData(gridData);
    createNameComponent(container);
    createValueComponent(container);
    if (isEditVariable) {
        // populate the environment variable name and it's value
        // in case of this dialog is opened for editing the variable.
        populateData();
    }
    return super.createContents(parent);
}

73. CertificateDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.certAddTtl);
    setMessage(Messages.certMsg);
    // Display help contents
    PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "com.persistent.winazure.eclipseplugin." + "windows_azure_certificates_page");
    Activator.getDefault().setSaved(false);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    gridLayout.marginBottom = 25;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createNameComponent(container);
    createThumbprintComponent(container);
    return super.createDialogArea(parent);
}

74. WARolesPropertyPage#createContents()

View license
@Override
protected Control createContents(Composite parent) {
    noDefaultAndApplyButton();
    //display help content
    PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "com.persistent.winazure.eclipseplugin." + "windows_azure_project_roles");
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    composite.setLayout(gridLayout);
    composite.setLayoutData(gridData);
    //draws roles table and buttons
    WARoles.displayRoles(composite, false);
    return composite;
}

75. WAApplicationDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.appDlgTxt);
    setMessage(Messages.appDlgMsg);
    // display help contents
    PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "com.persistent.winazure.eclipseplugin." + "windows_azure_addapp_dialog");
    Activator.getDefault().setSaved(false);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    GridData gridData = new GridData();
    gridLayout.numColumns = 3;
    gridLayout.marginBottom = 10;
    gridData.verticalIndent = 10;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createAppFileCmpnt(container);
    createAppProjCmpnt(container);
    return super.createDialogArea(parent);
}

76. StorageAccountsPreferencePage#createContents()

View license
@Override
protected Control createContents(Composite parent) {
    noDefaultAndApplyButton();
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    composite.setLayout(gridLayout);
    composite.setLayoutData(gridData);
    // create Import From Publish settings file button
    createImportBtnCmpnt(composite);
    createStorageTable(composite);
    return null;
}

77. ServiceEndptPreferencePage#createContents()

View license
@Override
protected Control createContents(Composite parent) {
    noDefaultAndApplyButton();
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 3;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    composite.setLayout(gridLayout);
    composite.setLayoutData(gridData);
    createActiveSetComponent(composite);
    createGridComponents(composite);
    return null;
}

78. PfxPwdDialog#createContents()

View license
@Override
protected Control createContents(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout(2, false);
    container.setLayout(gridLayout);
    GridData gridData = new GridData();
    gridData.widthHint = 400;
    container.setLayoutData(gridData);
    createLabelComponent(container);
    createPfxPathTxtBox(container);
    createPasswordComponent(container);
    return super.createContents(parent);
}

79. SubscriptionPropertyPage#createContents()

View license
@Override
protected Control createContents(Composite parent) {
    noDefaultAndApplyButton();
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    composite.setLayout(gridLayout);
    composite.setLayoutData(gridData);
    // create Import From Publish settings file button
    createImportBtnCmpnt(composite);
    createSubscriptionTable(composite);
    return composite;
}

80. CredentialsPropertyPage#createContents()

View license
@Override
protected Control createContents(Composite composite) {
    noDefaultAndApplyButton();
    PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, com.gigaspaces.azure.wizards.Messages.pluginPrefix + com.gigaspaces.azure.wizards.Messages.credentialsHelp);
    Composite container = new Composite(composite, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createSubscriptionIdComponent(container);
    return container;
}

81. NewResourceGroupDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.newResGrpTtl);
    setMessage(Messages.newResGrpMsg);
    setHelpAvailable(false);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    GridData gridData = new GridData();
    gridLayout.numColumns = 2;
    gridLayout.marginBottom = 10;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createNameCmpnt(container);
    createSubCmpnt(container);
    createLocationCmpnt(container);
    return super.createDialogArea(parent);
}

82. ImportSubscriptionDialog#createContents()

View license
/**
	 * Method creates contents of dialog.
	 */
protected Control createContents(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout(3, false);
    container.setLayout(gridLayout);
    GridData gridData = new GridData();
    gridData.widthHint = 500;
    container.setLayoutData(gridData);
    // create download publish settings file button
    createDownloadPubSetFileButton(container);
    // create separator
    createHorizontalSeparator(container);
    // create Path components
    createPathComponents(container);
    return super.createContents(parent);
}

83. WebAppDeployDialog#createDialogArea()

View license
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.webAppTtl);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createWebAppLabel(container);
    createWebAppList(container);
    createDeployRootCheckBox(container);
    return super.createDialogArea(parent);
}

84. CreateWebAppDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.crtWebAppTtl);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    GridData gridData = new GridData();
    gridLayout.numColumns = 3;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createNameCmpnt(container);
    createWebContainerCmpnt(container);
    createSubCmpnt(container);
    createResGrpCmpnt(container);
    createAppPlanCmpnt(container);
    return super.createDialogArea(parent);
}

85. CreateAppServicePlanDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.crtAppPlanTtl);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    GridData gridData = new GridData();
    gridLayout.numColumns = 2;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createNameCmpnt(container);
    createLocCmpnt(container);
    createPricingCmpnt(container);
    createWorkerCmpnt(container);
    return super.createDialogArea(parent);
}

86. SubscriptionPropertyPage#createContents()

View license
@Override
protected Control createContents(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 4;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    composite.setLayout(gridLayout);
    composite.setLayoutData(gridData);
    createSubscriptionTable(composite);
    createButtons(composite);
    loadList();
    return composite;
}

87. SelectImageStep#createControl()

View license
@Override
public void createControl(Composite parent) {
    GridLayout gridLayout = new GridLayout(3, false);
    GridData gridData = new GridData();
    gridData.grabExcessHorizontalSpace = true;
    Composite container = new Composite(parent, 0);
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    wizard.configStepList(container, 1);
    createImageList(container);
    imageDescription = wizard.createImageDescriptor(container);
    this.setControl(container);
}

88. BlobExplorerFileEditor#createToolbar()

View license
private void createToolbar(Composite parent) {
    GridLayout gridLayout = new GridLayout(2, false);
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    Composite container = new Composite(parent, 0);
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    queryTextField = new Text(container, SWT.LEFT | SWT.BORDER);
    gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
    queryTextField.setLayoutData(gridData);
    createButtons(container);
    createBackButton(container);
}

89. ApplicationInsightsPreferencePage#createContents()

View license
@Override
protected Control createContents(Composite parent) {
    noDefaultAndApplyButton();
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    GridData gridData = new GridData();
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    composite.setLayout(gridLayout);
    composite.setLayoutData(gridData);
    createImportBtnCmpnt(composite, 2);
    createApplicationInsightsResourceTable(composite);
    return null;
}

90. ApplicationInsightsNewDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.newKeyTtl);
    setMessage(Messages.newKeyMsg);
    setHelpAvailable(false);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    GridData gridData = new GridData();
    gridLayout.numColumns = 3;
    gridLayout.marginBottom = 10;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createNameCmpnt(container);
    createSubCmpnt(container);
    createResourceGroupCmpnt(container);
    createRegionCmpnt(container);
    return super.createDialogArea(parent);
}

91. ApplicationInsightsAddDialog#createDialogArea()

View license
@Override
protected Control createDialogArea(Composite parent) {
    setTitle(Messages.addKeyTtl);
    setMessage(Messages.addKeyMsg);
    setHelpAvailable(false);
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    GridData gridData = new GridData();
    gridLayout.numColumns = 2;
    gridLayout.marginBottom = 10;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = true;
    container.setLayout(gridLayout);
    container.setLayoutData(gridData);
    createNameCmpnt(container);
    createKeyCmpnt(container);
    return super.createDialogArea(parent);
}

92. NewLambdaFunctionWizardPage#createProjectPackageClassNameControls()

View license
private void createProjectPackageClassNameControls(Composite composite) {
    Composite containerComposite = new Composite(composite, SWT.NONE);
    containerComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
    int nColumns = 4;
    GridLayout layout = new GridLayout();
    layout.numColumns = nColumns;
    layout.marginHeight = 10;
    layout.marginWidth = 10;
    containerComposite.setLayout(layout);
    createContainerControls(containerComposite, nColumns);
    createPackageControls(containerComposite, nColumns);
    createTypeNameControls(containerComposite, nColumns);
}

93. UserEditor#createTabsSection()

Project: aws-toolkit-eclipse
Source File: UserEditor.java
View license
private void createTabsSection(Composite parent, FormToolkit toolkit) {
    Composite tabsSection = toolkit.createComposite(parent, SWT.NONE);
    tabsSection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    tabsSection.setLayout(new FillLayout());
    TabFolder tabFolder = new TabFolder(tabsSection, SWT.BORDER);
    Rectangle clientArea = parent.getClientArea();
    tabFolder.setLocation(clientArea.x, clientArea.y);
    TabItem summaryTab = new TabItem(tabFolder, SWT.NONE);
    summaryTab.setText("Summary");
    userSummary = new UserSummary(iam, tabFolder, toolkit);
    summaryTab.setControl(userSummary);
    TabItem permissionTab = new TabItem(tabFolder, SWT.NONE);
    permissionTab.setText("Permissions");
    userPermission = new UserPermission(iam, tabFolder, toolkit);
    permissionTab.setControl(userPermission);
    TabItem groupTab = new TabItem(tabFolder, SWT.NONE);
    groupTab.setText("Groups");
    groups = new GroupsForUser(iam, tabFolder, toolkit);
    groupTab.setControl(groups);
}

94. GroupEditor#createTabsSection()

View license
private void createTabsSection(Composite parent, FormToolkit toolkit) {
    Composite tabsSection = toolkit.createComposite(parent, SWT.NONE);
    tabsSection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    tabsSection.setLayout(new FillLayout());
    TabFolder tabFolder = new TabFolder(tabsSection, SWT.BORDER);
    Rectangle clientArea = parent.getClientArea();
    tabFolder.setLocation(clientArea.x, clientArea.y);
    TabItem summaryTab = new TabItem(tabFolder, SWT.NONE);
    summaryTab.setText("Summary");
    groupSummary = new GroupSummary(iam, tabFolder, toolkit);
    summaryTab.setControl(groupSummary);
    TabItem usersTab = new TabItem(tabFolder, SWT.NONE);
    usersTab.setText("Users");
    usersInGroup = new UsersInGroup(iam, tabFolder, toolkit, groupEditorInput);
    usersTab.setControl(usersInGroup);
    TabItem permissionsTab = new TabItem(tabFolder, SWT.NONE);
    permissionsTab.setText("Permissions");
    groupPermissions = new GroupPermissions(iam, tabFolder, toolkit);
    permissionsTab.setControl(groupPermissions);
}

95. DeploymentInformationDialog#createCustomArea()

View license
@Override
protected Control createCustomArea(Composite parent) {
    Composite composite = parent;
    GridLayout layout = new GridLayout(2, false);
    layout.marginWidth = 0;
    composite.setLayout(layout);
    if (showVersionTextBox)
        createVersionTextBox(composite);
    if (enableDebugging)
        createDebugPortTextBox(parent);
    if (launchMode.equals(ILaunchManager.DEBUG_MODE))
        createInstanceSelectionCombo(parent);
    if (warnAboutIngress)
        createIngressWarning(parent);
    createDurationLabel(composite);
    composite.pack(true);
    return composite;
}

96. DeviceDialog#createCustomArea()

View license
/* (non-Javadoc)
	 * @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(org.eclipse.swt.widgets.Composite)
	 */
@Override
protected Control createCustomArea(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setLayout(new GridLayout(2, false));
    Label label = new Label(composite, SWT.NONE);
    label.setText("Device:");
    deviceCombo = new Combo(composite, SWT.READ_ONLY);
    deviceCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    String devicePrefix = "/dev/sd";
    for (char c = 'b'; c <= 'z'; c++) {
        deviceCombo.add(devicePrefix + c);
    }
    deviceCombo.setText(DEFAULT_DEVICE);
    return composite;
}

97. ShellCommandErrorDialog#createCommandOutputArea()

View license
/**
	 * Creates a new UI section displaying the details of the selected attempt
	 * to execute a command.
	 * 
	 * @param composite
	 *            The parent composite for this new section.
	 */
private void createCommandOutputArea(Composite composite) {
    Composite outputComposite = new Composite(composite, SWT.NONE);
    outputComposite.setLayout(new GridLayout(1, false));
    outputComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
    Group outputGroup = new Group(outputComposite, SWT.None);
    outputGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
    outputGroup.setLayout(new GridLayout(2, false));
    outputGroup.setText("Command Output:");
    newLabel(outputGroup, "Output:");
    outputText = newText(outputGroup, "");
    newLabel(outputGroup, "Errors:");
    errorOutputText = newText(outputGroup, "");
}

98. ShellCommandErrorDialog#createCustomArea()

View license
/* (non-Javadoc)
	 * @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(org.eclipse.swt.widgets.Composite)
	 */
@Override
protected Control createCustomArea(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setLayout(new GridLayout(1, false));
    if (sce.getNumberOfAttempts() > 1) {
        createAttemptSelectionArea(composite);
        attemptRadioButtons.get(0).setSelection(true);
    }
    createCommandOutputArea(composite);
    createHelpLinkArea(composite);
    update();
    return composite;
}

99. EditSecurityGroupPermissionEntryDialog#createComposite()

View license
private Composite createComposite(Composite parent) {
    Composite composite = new Composite(parent, SWT.BORDER);
    GridLayout gridLayout = new GridLayout(2, false);
    gridLayout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    gridLayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    gridLayout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
    gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    gridLayout.marginHeight = 2;
    composite.setLayout(gridLayout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    return composite;
}

100. CreateSecurityGroupDialog#createComposite()

View license
private Composite createComposite(Composite parent) {
    Composite composite = new Composite(parent, SWT.BORDER);
    GridLayout gridLayout = new GridLayout(2, false);
    gridLayout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    gridLayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    gridLayout.verticalSpacing = convertVerticalDLUsToPixels(1);
    gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    composite.setLayout(gridLayout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    return composite;
}