/** * Creates an expandable composite as a part of the form. * * @param parent * the expandable composite parent * @param expansionStyle * the expandable composite style * @return the expandable composite widget */ public ExpandableComposite createExpandableComposite(Composite parent, int expansionStyle) { ExpandableComposite ec = new ExpandableComposite(parent, orientation, expansionStyle); ec.setMenu(parent.getMenu()); adapt(ec, true, true); ec.setFont(boldFontHolder.getBoldFont(ec.getFont())); return ec; }
/** * Creates an expandable composite as a part of the form. * * @param parent * the expandable composite parent * @param expansionStyle * the expandable composite style * @return the expandable composite widget */ public ExpandableComposite createExpandableComposite(Composite parent, int expansionStyle) { checkDisposed(); ExpandableComposite ec = new ExpandableComposite(parent, orientation, expansionStyle); ec.setMenu(parent.getMenu()); adapt(ec, true, true); ec.setFont(boldFontHolder.getBoldFont(ec.getFont())); return ec; }
public Section addSection(Section parent, String label, String previewKey) { Section section= Section.create(getParentComposite(parent), label, previewKey); ExpandableComposite excomposite= section.getControl(); getScrolledPageContent().adaptChild(excomposite); Menu expandAllMenu= new Menu(excomposite); MenuItem expandAllItem= new MenuItem(expandAllMenu, SWT.NONE); expandAllItem.setText(PreferencesMessages.FilteredPreferencesTree_expandAll_tooltip); expandAllItem.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { setAllExpanded(section, true); } }); excomposite.setMenu(expandAllMenu); return addChild(parent, section); }