Here are the examples of the java api class org.eclipse.swt.widgets.Composite taken from open source projects.
1. RelationSetEditorPart#setupCommandButtons()
View licenseprivate 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. RelationPropertyEditorPart#getControl()
View licensepublic 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; }
3. RelationSetEditorPart#getControl()
View licensepublic 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; }
4. AbstractAnalysisPage#createControl()
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); }
5. 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; }
6. GeneralPreferencePage#createContents()
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; }
7. 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); }
8. HeaderPage#setup1ColumnLayout()
View licensepublic 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; }
9. SootConfigManagerDialog#createSpecialButtonBar()
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; }
10. GraphNodeViewer#createNodeViewer()
View licensepublic 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; }
11. DiskUsageView#initialLayout()
View licenseprivate 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. NetStatView#initialLayout()
View licenseprivate 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. TopView#initialLayout()
View licenseprivate 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. WhoView#initialLayout()
View licenseprivate 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. ObjectActiveServiceListView#initialLayout()
View licenseprivate 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); }
16. ServerStatusView#createPartControl()
View licensepublic 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); }
17. CreateEntityDialog#createDialogArea()
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; }
18. MainTab#createControl()
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); }
19. 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; }
20. AbstractTableSection#createButtonComposite()
View licenseprotected 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; }
21. 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; }
22. LangArgumentsTab#createControl()
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); }
23. SWTFactory#createComposite()
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; }
24. SWTFactory#createComposite()
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; }
25. 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); }
26. 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, ""); }
27. ShowProcessOutputDialog#createDialogArea()
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. KeyAssistDialog#createDialogArea()
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; }
29. WorkingDirectoryBlock#createComposite()
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; }
30. ErrorWizardPage#createControl()
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); }
31. StartupProgressDialog#createContents()
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; }
32. TutorialPage#createFinishPage()
View licenseprivate 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"); }
33. NewsBrowserControl#createPart()
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)); }
34. RemoveAnnotationDialog#createDialogArea()
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; }
35. RelationPropertyEditorPart#setupCommandButtons()
View licenseprivate 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; }
36. CollapseTool#setupComposite()
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; }
37. EnterNameDialog#createDialogArea()
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; }
38. ExtendedButtonDialog#createExtendedButtonBar()
View licenseprotected 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; }
39. WebBrowserView#createBrowserBar()
View licenseprivate 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); }
40. TutorialPage#createControl()
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); }
41. MiscPreferencePage#createMiscOptions()
View licenseprivate 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)); } }
42. FeedsPreferencePage#createColumnsGroup()
View licenseprivate 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)); }
43. ComponentWizardPage#createProjectComposite()
View licenseprotected 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()); } }
44. DeploymentOptions#createContents()
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; }
45. GrailsInplaceDialog#createComposites()
View licenseprivate 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); }
46. 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); }
47. GoSearchPage#createControl()
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); }
48. 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(); }
49. BannerPart#create()
View licenseprivate 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()); }
50. GeronimoServerWizardFragment#createComposite()
View licensepublic 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; }
51. 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; }
52. GeronimoRuntimeSourceWizardFragment#createComposite()
View licensepublic 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; }
53. 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; }
54. ImportWizardPage#createOptionsGroup()
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); }
55. ObjectFileSocketView#createPartControl()
View licensepublic 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); } }); }
56. ExtractMethodComposite#createOffsetStrategy()
View licenseprivate 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); }
57. ExtractMethodComposite#createArgumentsButton()
View licenseprivate 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); }
58. 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); }
59. 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(); }
60. 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(); }
61. ConsoleInplaceDialog#createComposites()
View licenseprivate 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); }
62. 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; }
63. 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); }
64. DerbyPropertiesPage#createContents()
View licenseprotected 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; }
65. DerbyPropertiesPage#createDefaultComposite()
View licenseprotected 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; }
66. GenerateSQLDialog#createDialogArea()
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; }
67. 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); }
68. EmptyPreferencePage#createComposite()
View licenseprivate 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()
View licensepublic 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()
View licensepublic 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()
View licenseprivate 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 licenseprotected 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. 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; }
79. TwigSyntaxColoringPage#createComposite()
View licenseprivate Composite createComposite(Composite parent, int numColumns) { Composite composite = new Composite(parent, SWT.NULL); // GridLayout GridLayout layout = new GridLayout(); layout.numColumns = numColumns; layout.makeColumnsEqualWidth = false; layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); // GridData GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); composite.setLayoutData(data); return composite; }
80. CDEpropertyPage#create2ColComposite()
View licenseprivate Composite create2ColComposite(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; }
81. AbstractSection#newButtonContainer()
View licensepublic Composite newButtonContainer(Composite parent, int style, int widthMin) { Composite buttonContainer = toolkit.createComposite(parent); GridLayout gl = new GridLayout(); GridData gd = null; switch(style) { case VERTICAL_BUTTONS: gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); gd.horizontalAlignment = SWT.FILL; // gd.widthHint = widthMin; // 70, 100 break; case HORIZONTAL_BUTTONS: gl.marginWidth = 20; gl.numColumns = 2; gl.makeColumnsEqualWidth = true; gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER); // 180 gd.widthHint = widthMin; } buttonContainer.setLayout(gl); buttonContainer.setLayoutData(gd); return buttonContainer; }
82. PearFileResourceExportPage#createControl()
View license/* * (non-Javadoc) * * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) */ public void createControl(final Composite parent) { final Composite container = new Composite(parent, SWT.NONE); container.setLayout(new GridLayout()); container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); createSourceControl(container); createDestinationControl(container); createOptionsGroup(container); pageStateChanged(); setControl(container); }
83. AngularGlobalPreferencesPage#createComposite()
View licenseprivate 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; }
84. HTMLAngularEditorPreferencesPage#createComposite()
View licenseprivate 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; }
85. HTMLAngularEditorSyntaxColoringPreferencePage#createComposite()
View license/** * Creates composite control and sets the default layout data. */ private Composite createComposite(Composite parent, int numColumns) { Composite composite = new Composite(parent, SWT.NULL); // GridLayout GridLayout layout = new GridLayout(); layout.numColumns = numColumns; layout.makeColumnsEqualWidth = false; layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); // GridData GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); composite.setLayoutData(data); return composite; }
86. HTMLAngularGlobalPreferencesPage#createComposite()
View licenseprivate 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; }
87. AppspecTemplateSelectionPage#createControl()
View licensepublic void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(3, false)); List<AppspecTemplateMetadataModel> allModels = AppspecTemplateRegistry.getInstance().getDefaultTemplates(); allModels.addAll(AppspecTemplateRegistry.getInstance().getCustomTemplates()); createAppspecTemplateSelection(composite, allModels); stackArea = new Composite(composite, SWT.NONE); GridData stackAreaLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true); stackAreaLayoutData.horizontalSpan = 3; stackArea.setLayoutData(stackAreaLayoutData); stackArea.setLayout(new StackLayout()); createStackedTemplateConfigComposites(stackArea, allModels); AppspecTemplateMetadataModel initSelection = allModels.get(0); appspecTemplateSelectionCombo.setSelection(new StructuredSelection(initSelection), true); setControl(composite); setPageComplete(true); }
88. ToolkitAnalyticsPreferencePage#createContents()
View license@Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.LEFT); GridLayout layout = new GridLayout(); layout.marginWidth = 10; layout.marginHeight = 8; composite.setLayout(layout); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.widthHint = 300; composite.setLayoutData(gridData); analyticsEnabledButton = new Button(composite, SWT.CHECK | SWT.MULTI | SWT.WRAP); analyticsEnabledButton.setText("By leaving this box checked, you agree that AWS may anonymously " + "collect analytics about your usage of AWS Toolkit. AWS will handle " + "all information received in accordance with the AWS Privacy Policy " + "(http://aws.amazon.com/privacy/)"); analyticsEnabledButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); analyticsEnabledButton.setSelection(getPreferenceStore().getBoolean(PreferenceConstants.P_TOOLKIT_ANALYTICS_COLLECTION_ENABLED)); return composite; }
89. AwsAccountPreferencePage#createContents()
View license/* * (non-Javadoc) * * @see * org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse * .swt.widgets.Composite) */ @Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); gridData.widthHint = PREFERRED_PAGE_WIDTH; composite.setLayoutData(gridData); // Accounts section createAccountsSectionGroup(composite); // Credentials file location section createCredentialsFileGroup(composite); // Timeouts section createTimeoutSectionGroup(composite); // The weblinks at the bottom part of the page createFeedbackSection(composite); parent.pack(); return composite; }
90. AwsAccountPreferencePageTab#createAccountInfoSection()
View license/** * Creates the whole section of account info */ private Composite createAccountInfoSection(Composite parent) { Composite accountInfoSection = new Composite(parent, SWT.NONE); accountInfoSection.setLayout(new GridLayout()); GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); gridData.horizontalSpan = 3; accountInfoSection.setLayoutData(gridData); createAccountSelector(accountInfoSection); WebLinkListener webLinkListener = new WebLinkListener(); Group awsGroup = createAccountDetailSectionGroup(accountInfoSection, webLinkListener); createOptionalSection(awsGroup, webLinkListener); return accountInfoSection; }
91. RegionsPreferencePage#createContents()
View license/* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ @Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.LEFT); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); WebLinkListener webLinkListener = new WebLinkListener(); createRegionSection(composite, webLinkListener); createSpacer(composite); return composite; }
92. AbstractDistributionEditor#createVerticalSpacer()
View licenseprotected Composite createVerticalSpacer(Composite parent) { Composite spacer = new Composite(parent, SWT.NONE); GridData data = new GridData(SWT.FILL, SWT.TOP, false, false); spacer.setSize(SWT.DEFAULT, 5); data.horizontalSpan = 2; data.widthHint = 5; data.heightHint = 5; spacer.setLayoutData(data); return spacer; }
93. CreateTopicDialog#createCustomArea()
View license@Override protected Control createCustomArea(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); composite.setLayout(new GridLayout(2, false)); new Label(composite, SWT.NONE).setText("Topic Name:"); final Text topicNameText = new Text(composite, SWT.BORDER); topicNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); topicNameText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { topicName = topicNameText.getText(); updateControls(); } }); return composite; }
94. TestToolVersionTable#createToolbar()
View license/** * Create the toolbar, with install and uninstall buttons and an initially * hidden progress bar to track install status. */ private void createToolbar() { // Bind to the top of wherever we end up. Composite wrapper = new Composite(this, SWT.NONE); wrapper.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); wrapper.setLayout(new GridLayout(2, false)); toolbar = new CustomToolBarManager(); // Toolbar on the left. Control control = toolbar.createControl(wrapper); control.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); // Progress bar on the right. ProgressBar progressBar = new ProgressBar(wrapper, SWT.NONE); progressBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); progressBar.setVisible(false); progressMonitor = new CustomProgressMonitor(progressBar); }
95. KeyPairsPreferencePage#createContents()
View license/* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ @Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Group group = newGroup("Key Pairs:", composite); newLabel("Key pairs allow you to securely log into your EC2 instances.", group); KeyPairComposite keyPairSelectionTable = new KeyPairComposite(group); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.heightHint = 150; keyPairSelectionTable.setLayoutData(gridData); return composite; }
96. AmiSelectionWizardPage#createControl()
View license/* (non-Javadoc) * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) */ public void createControl(Composite parent) { Composite control = new Composite(parent, SWT.NONE); control.setLayout(new GridLayout(1, false)); control.setLayoutData(new GridData(GridData.FILL_BOTH)); ToolBarManager manager = new ToolBarManager(SWT.None); amiSelectionComposite = new FilteredAmiSelectionTable(control, manager, 3); amiSelectionComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); amiSelectionComposite.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { updateErrorMessages(); getContainer().updateButtons(); } }); manager.add(amiSelectionComposite.getAmiSelectionTable().getRefreshAction()); manager.add(amiSelectionComposite.getAmiSelectionTable().getAmiFilterDropDownAction()); manager.add(amiSelectionComposite.getAmiSelectionTable().getPlatformFilterDropDownAction()); manager.update(true); updateErrorMessages(); this.setControl(control); }
97. CreateSecurityGroupDialog#createComposite()
View licenseprivate 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; }
98. EditSecurityGroupPermissionEntryDialog#createComposite()
View licenseprivate 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; }
99. 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; }
100. 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); }