protected void updateSectionStyle(ExpandableComposite excomposite) { excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); }
protected void updateSectionStyle(ExpandableComposite excomposite) { excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); }
protected void updateSectionStyle(ExpandableComposite excomposite) { excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); }
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); }
/** * Creates an ExpandibleComposite widget * @param parent the parent to add this widget to * @param style the style for ExpandibleComposite expanding handle, and layout * @param label the label for the widget * @param hspan how many columns to span in the parent * @param fill the fill style for the widget * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code> * @return a new ExpandibleComposite widget * @since 3.6 */ public static ExpandableComposite createExpandibleComposite(Composite parent, int style, String label, int hspan, int fill) { ExpandableComposite ex = new ExpandableComposite(parent, SWT.NONE, style); ex.setText(label); ex.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); GridData gd = new GridData(fill); gd.horizontalSpan = hspan; ex.setLayoutData(gd); return ex; }
/** * Creates an ExpandibleComposite widget * @param parent the parent to add this widget to * @param style the style for ExpandibleComposite expanding handle, and layout * @param label the label for the widget * @param hspan how many columns to span in the parent * @param fill the fill style for the widget * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code> * @return a new ExpandibleComposite widget */ public static ExpandableComposite createExpandibleComposite(Composite parent, int style, String label, int hspan, int fill) { ExpandableComposite ex = new ExpandableComposite(parent, SWT.NONE, style); ex.setText(label); ex.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); GridData gd = new GridData(fill); gd.horizontalSpan = hspan; ex.setLayoutData(gd); return ex; }
/** * Creates an ExpandibleComposite widget * * @param parent the parent to add this widget to * @param style the style for ExpandibleComposite expanding handle, and layout * @param label the label for the widget * @param hspan how many columns to span in the parent * @param fill the fill style for the widget * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code> * @return a new ExpandibleComposite widget */ public static ExpandableComposite createExpandibleComposite(Composite parent, String label, int hspan, int fill) { ExpandableComposite ex = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); ex.setText(label); ex.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); GridData gd = new GridData(fill); gd.horizontalSpan = hspan; gd.grabExcessHorizontalSpace = true; ex.setLayoutData(gd); return ex; }
/** * Creates an ExpandibleComposite widget * * @param parent the parent to add this widget to * @param label the label for the widget * @param hspan how many columns to span in the parent * @param fill the fill style for the widget * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code> * @return a new ExpandibleComposite widget */ public static ExpandableComposite createExpandibleComposite(Composite parent, String label, int hspan, int fill) { ExpandableComposite ex = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); ex.setText(label); ex.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); GridData gd = new GridData(fill); gd.horizontalSpan = hspan; gd.grabExcessHorizontalSpace = true; ex.setLayoutData(gd); return ex; }
/** * Creates an ExpandibleComposite widget * * @param parent the parent to add this widget to * @param style the style for ExpandibleComposite expanding handle, and layout * @param label the label for the widget * @param hspan how many columns to span in the parent * @param fill the fill style for the widget * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code> * @return a new ExpandibleComposite widget */ public static ExpandableComposite createExpandibleComposite(Composite parent, String label, int hspan, int fill) { ExpandableComposite ex = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); ex.setText(label); ex.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); GridData gd = new GridData(fill); gd.horizontalSpan = hspan; gd.grabExcessHorizontalSpace = true; ex.setLayoutData(gd); return ex; }
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) { ExpandableComposite excomposite= new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); excomposite.setText(label); excomposite.setExpanded(false); excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1)); excomposite.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanged(ExpansionEvent e) { expandedStateChanged((ExpandableComposite) e.getSource()); } }); fExpandedComposites.add(excomposite); makeScrollableCompositeAware(excomposite); return excomposite; }
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) { ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); excomposite.setText(label); excomposite.setExpanded(false); excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1)); excomposite.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { expandedStateChanged((ExpandableComposite) e.getSource()); } }); expandedComposites.add(excomposite); makeScrollableCompositeAware(excomposite); return excomposite; }
/** * 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; }
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) { ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); excomposite.setText(label); excomposite.setExpanded(false); excomposite.setFont(JFaceResources.getFontRegistry().getBold( JFaceResources.DIALOG_FONT)); excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1)); excomposite.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanged(ExpansionEvent e) { expandedStateChanged((ExpandableComposite) e.getSource()); } }); fExpandedComposites.add(excomposite); makeScrollableCompositeAware(excomposite); return excomposite; }
/** * 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; }
/** * 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; }
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns, Key key) { ExpandableComposite excomposite= new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); excomposite.setText(label); if (key != null) { excomposite.setData(key); } excomposite.setExpanded(false); excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1)); excomposite.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { expandedStateChanged((ExpandableComposite) e.getSource()); } }); fExpandableComposites.add(excomposite); makeScrollableCompositeAware(excomposite); return excomposite; }
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns, Key key) { ExpandableComposite excomposite= new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); excomposite.setText(label); if (key != null) { excomposite.setData(key); } excomposite.setExpanded(false); excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1)); excomposite.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { expandedStateChanged((ExpandableComposite) e.getSource()); } }); fExpandableComposites.add(excomposite); makeScrollableCompositeAware(excomposite); return excomposite; }
/** * 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; }