private Composite createInnerComposite(ExpandableComposite excomposite, int nColumns, Font font) { Composite inner = new Composite(excomposite, SWT.NONE); inner.setFont(font); inner.setLayout(new GridLayout(nColumns, false)); excomposite.setClient(inner); return inner; }
private Composite createInnerComposite(ExpandableComposite excomposite, int nColumns, Font font) { Composite inner= new Composite(excomposite, SWT.NONE); inner.setFont(font); inner.setLayout(new GridLayout(nColumns, false)); excomposite.setClient(inner); return inner; }
private Composite createInnerComposite(ExpandableComposite excomposite, int nColumns, Font font) { Composite inner= new Composite(excomposite, SWT.NONE); inner.setFont(font); inner.setLayout(new GridLayout(nColumns, false)); excomposite.setClient(inner); return inner; }
private Composite createInnerComposite(ExpandableComposite excomposite, int nColumns, Font font) { Composite inner= new Composite(excomposite, SWT.NONE); inner.setFont(font); inner.setLayout(new GridLayout(nColumns, false)); excomposite.setClient(inner); return inner; }
/** * New ncolumn composite. * * @param parent the parent * @param cols the cols * @return the composite */ public Composite newNcolumnComposite(Composite parent, int cols) { Composite composite = toolkit.createComposite(parent); if (parent instanceof ExpandableComposite) ((ExpandableComposite) parent).setClient(composite); GridLayout layout = new GridLayout(cols, !EQUAL_WIDTH); layout.marginHeight = 0; layout.marginWidth = 0; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); return composite; }
protected Composite createSection(String label, Composite composite, int nColumns) { ExpandableComposite excomposite = createStyleSection(composite, label, nColumns); Composite inner = new Composite(excomposite, SWT.NONE); inner.setFont(composite.getFont()); inner.setLayout(new GridLayout(nColumns, false)); excomposite.setClient(inner); return inner; }
public static Section create(Composite parentComposite, String label, String previewKey) { final ExpandableComposite excomposite= new FormatterPreferenceSectionComposite(parentComposite, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); excomposite.clientVerticalSpacing= 0; excomposite.setText(label); excomposite.setExpanded(false); excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, GRID_COLUMNS, 1)); Composite inner= new Composite(excomposite, SWT.NONE); inner.setFont(parentComposite.getFont()); GridLayout layout= new GridLayout(GRID_COLUMNS, false); layout.marginWidth= 0; layout.marginLeft= 5; inner.setLayout(layout); excomposite.setClient(inner); return new Section(label, excomposite, inner, previewKey); }
@Override protected void createContents(Composite parent) { final Composite p = parent; expandable = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TREE_NODE | ExpandableComposite.TWISTIE); super.createContents(expandable); createClearButton(group); expandable.setClient(group); expandable.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { p.layout(); adjustSize(e.getState()); } }); }
excomposite.setClient(contents);
excomposite.setClient(contents);
excomposite.setClient(contents);
private void createHttpAuthSection(SectionComposite parent) { int style = SWT.NONE; if (getWorkingCopy().getCredentials(AuthenticationType.HTTP, false) != null) { style |= ExpandableComposite.EXPANDED; } ExpandableComposite section = parent.createSection(Messages.RepositoryLocationPart_HTTP_Authentication, style); section.clientVerticalSpacing = 5; Composite composite = new Composite(section, SWT.NONE); section.setClient(composite); GridLayoutFactory.fillDefaults().numColumns(3).applyTo(composite); Label label; Button enableButton = new Button(composite, SWT.CHECK); GridDataFactory.fillDefaults().grab(true, false).span(3, 1).applyTo(enableButton); enableButton.setText(Messages.RepositoryLocationPart_Enable_HTTP_Authentication); label = new Label(composite, SWT.NONE); label.setText(Messages.RepositoryLocationPart_User); Text userText = new Text(composite, SWT.BORDER); GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(userText); label = new Label(composite, SWT.NONE); label.setText(Messages.RepositoryLocationPart_Password); Text passwordText = new Text(composite, SWT.BORDER | SWT.PASSWORD); GridDataFactory.fillDefaults().grab(true, false).applyTo(passwordText); Button savePasswordButton = new Button(composite, SWT.CHECK); savePasswordButton.setText(Messages.RepositoryLocationPart_Save_Password); bindUserCredentials(AuthenticationType.HTTP, enableButton, userText, passwordText, null, savePasswordButton, false); }
/** * Creates an {@link ExpandableComposite} with a client composite and a default grid layout * @param parent * @param title * @return */ private Composite createExpansibleComposite(Composite parent, String title) { ExpandableComposite ecomp = SWTFactory.createExpandibleComposite(parent, title, 1, GridData.FILL_HORIZONTAL); ecomp.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanged(ExpansionEvent e) { Object obj = e.getSource(); handleExpand(getScrollingParent(obj)); } }); ecomp.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); fExpComps.add(ecomp); Composite client = SWTFactory.createComposite(ecomp, 2, 1, GridData.FILL_BOTH); ecomp.setClient(client); return client; }
section.setClient(composite); GridLayoutFactory.fillDefaults().numColumns(3).applyTo(composite);
/** * Creates an {@link ExpandableComposite} with a client composite and a default grid layout * @param parent * @param title * @return a new expandable composite */ private Composite createExpansibleComposite(Composite parent, String title) { ExpandableComposite ecomp = SWTFactory.createExpandibleComposite(parent, title, 1, GridData.FILL_HORIZONTAL); ecomp.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { Object obj = e.getSource(); handleExpand(getScrollingParent(obj)); } }); ecomp.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); fExpComps.add(ecomp); Composite client = SWTFactory.createComposite(ecomp, 2, 1, GridData.FILL_BOTH); ecomp.setClient(client); return client; }
/** * Creates an {@link ExpandableComposite} with a client composite and a * default grid layout * * @param parent * @param title * @return */ private Composite createExpansibleComposite(Composite parent, String title) { ExpandableComposite ecomp = SWTFactory.createExpandibleComposite(parent, title, 1, GridData.FILL_HORIZONTAL); ecomp.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { Object obj = e.getSource(); handleExpand(getScrollingParent(obj)); } }); ecomp.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); fExpComps.add(ecomp); Composite client = SWTFactory.createComposite(ecomp, 2, 1, GridData.FILL_BOTH); ecomp.setClient(client); return client; }
expandable.setClient(sectionClient); expandable.setExpanded(expand);
patchOptions.setClient(c); patchOptions.setExpanded(true); GridLayout gl= new GridLayout(); gl.numColumns= 3;
expandable.setExpanded(true); expandable.setClient(sectionClient);
.grab(true, false).hint(300, SWT.DEFAULT).create()); advanced.setClient(advancedComposite); advanced.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanged(ExpansionEvent e) {