private void createNoMatchFoundLabel() { fNoMatchFoundLabel= new Label(fScrolledPageContent.getBody(), SWT.NONE); GridData gd= new GridData(SWT.BEGINNING, SWT.CENTER, true, false); gd.horizontalSpan= 3; fNoMatchFoundLabel.setLayoutData(gd); fNoMatchFoundLabel.setFont(fScrolledPageContent.getFont()); fNoMatchFoundLabel.setText(PreferencesMessages.OptionsConfigurationBlock_NoOptionMatchesTheFilter); setVisible(fNoMatchFoundLabel, false); }
private Composite getParentComposite(PreferenceTreeNode<?> parent) { while (parent != null) { if (parent instanceof Section) return ((Section) parent).fInnerComposite; parent= parent.getParent(); } return getScrolledPageContent().getBody(); }
/** * Creates a new composite that can contain a set of expandable * sections. A <code>ScrolledPageComposite</code> is created and a new * composite within that, to ensure that expanding the sections will * always have enough space, unless there already is a * <code>ScrolledComposite</code> along the parent chain of * <code>parent</code>, in which case a normal <code>Composite</code> * is created. * <p> * The receiver keeps a reference to the inner body composite, so that * new sections can be added via <code>createSection</code>. * </p> * * @param parent the parent composite * @return the newly created composite */ public Composite createSectionComposite(Composite parent) { Assert.isTrue(fBody == null); boolean isNested= isNestedInScrolledComposite(parent); Composite composite; if (isNested) { composite= new Composite(parent, SWT.NONE); fBody= composite; } else { composite= new ScrolledPageContent(parent); fBody= ((ScrolledPageContent) composite).getBody(); } fBody.setLayout(new GridLayout()); return composite; }
/** * Creates a new composite that can contain a set of expandable * sections. A <code>ScrolledPageComposite</code> is created and a new * composite within that, to ensure that expanding the sections will * always have enough space, unless there already is a * <code>ScrolledComposite</code> along the parent chain of * <code>parent</code>, in which case a normal <code>Composite</code> * is created. * <p> * The receiver keeps a reference to the inner body composite, so that * new sections can be added via <code>createSection</code>. * </p> * * @param parent the parent composite * @return the newly created composite */ public Composite createSectionComposite(Composite parent) { Assert.isTrue(fBody == null); boolean isNested= isNestedInScrolledComposite(parent); Composite composite; if (isNested) { composite= new Composite(parent, SWT.NONE); fBody= composite; } else { composite= new ScrolledPageContent(parent); fBody= ((ScrolledPageContent) composite).getBody(); } fBody.setLayout(new GridLayout()); return composite; }
} else { composite= new ScrolledPageContent(parent); fBody= ((ScrolledPageContent) composite).getBody();
protected void createPreferenceTree(Composite parent) { Composite mainComp= new Composite(parent, SWT.NONE); mainComp.setFont(parent.getFont()); mainComp.setLayout(new GridLayout(2, false)); fTree= new ProfilePreferenceTree(mainComp); GridLayout layout= new GridLayout(); layout.verticalSpacing= 0; layout.marginLeft= layout.marginWidth - 1; layout.marginWidth= 1; fTree.getScrolledPageContent().getBody().setLayout(layout); fTree.setConcatAncestorLabels(true); fTree.setExpectMultiWordValueMatch(true); // restoring scroll position must wait until layout is complete Display.getCurrent().asyncExec(fTree::restoreScrollPosition); }
private Composite createCodeMiningContent(Composite parent) { // Create filtered tree which contains code minings fFilteredPrefTree= new PreferenceTree(this, parent, PreferencesMessages.JavaEditorCodeMiningConfigurationBlock_common_description, false); final ScrolledPageContent sc1= fFilteredPrefTree.getScrolledPageContent(); int nColumns= 1; Composite composite= sc1.getBody(); GridLayout layout= new GridLayout(nColumns, false); layout.marginHeight= 0; layout.marginWidth= 0; composite.setLayout(layout); // --- General createGeneralSection(nColumns, composite); IDialogSettings settingsSection= JavaPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME); restoreSectionExpansionStates(settingsSection); return sc1; }
Composite outer= sc1.getBody();
layout.marginWidth= 0; Composite composite= pageContent.getBody(); composite.setLayout(layout);
private Composite createStyleTabContent(Composite folder) { fFilteredPrefTree = new PreferenceTree(this, folder, MyPreferencesMessages.JavaEditorCodeMiningConfigurationBlock_common_description); final ScrolledPageContent sc1 = fFilteredPrefTree.getScrolledPageContent(); int nColumns = 3; Composite composite = sc1.getBody(); GridLayout layout = new GridLayout(nColumns, false); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); // --- General createGeneralSection(nColumns, composite); // --- Method parameter createMethodParameterSection(nColumns, composite); // --- JUnit createJUnitSection(nColumns, composite); // --- Debugging createDebuggingSection(nColumns, composite); // --- Git createGitSection(nColumns, composite); IDialogSettings settingsSection = JavaPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME); restoreSectionExpansionStates(settingsSection); return sc1; }
layout.marginWidth= 0; Composite composite= pageContent.getBody(); composite.setLayout(layout);
layout.marginWidth= 0; Composite composite= pageContent.getBody(); composite.setLayout(layout);
Composite outer= sc1.getBody();
Composite outer= sc1.getBody();
spc.setLayoutData(gridData); childComposite= spc.getBody(); TableWrapLayout tableWrapLayout= new TableWrapLayout(); tableWrapLayout.leftMargin= 0;
spc.setLayoutData(gridData); childComposite= spc.getBody(); TableWrapLayout tableWrapLayout= new TableWrapLayout(); tableWrapLayout.leftMargin= 0;
spc.setLayoutData(gridData); childComposite= spc.getBody(); TableWrapLayout tableWrapLayout= new TableWrapLayout(); tableWrapLayout.leftMargin= 0;
Composite body= scrolledContent.getBody(); body.setLayout(new GridLayout());
Composite body= scrolledContent.getBody(); body.setLayout(new GridLayout());
Composite body= scrolledContent.getBody(); body.setLayout(new GridLayout());