当前位置: 首页>>代码示例>>Java>>正文


Java ExpandableComposite.setFont方法代码示例

本文整理汇总了Java中org.eclipse.ui.forms.widgets.ExpandableComposite.setFont方法的典型用法代码示例。如果您正苦于以下问题:Java ExpandableComposite.setFont方法的具体用法?Java ExpandableComposite.setFont怎么用?Java ExpandableComposite.setFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.forms.widgets.ExpandableComposite的用法示例。


在下文中一共展示了ExpandableComposite.setFont方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
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;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:17,代码来源:OptionsConfigurationBlock.java

示例2: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
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;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:18,代码来源:OptionsConfigurationBlock.java

示例3: createProblemCategory

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private Composite createProblemCategory(Composite parent, String label) {
  // Expandable panel for each category of problems
  ExpandableComposite expandPanel = new ExpandableComposite(parent, SWT.NONE,
      ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
  expandPanel.setText(label);
  expandPanel.setExpanded(false);
  expandPanel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
  expandPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
  expandPanel.addExpansionListener(new ExpansionAdapter() {
    @Override
    public void expansionStateChanged(ExpansionEvent e) {
      topPanel.layout(true, true);
      scrollPanel.setMinSize(topPanel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    }
  });

  // Create panel to store the actual problems
  Composite categoryPanel = new Composite(expandPanel, SWT.NONE);
  categoryPanel.setLayout(new GridLayout(2, false));
  expandPanel.setClient(categoryPanel);

  return categoryPanel;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:24,代码来源:ErrorsWarningsPage.java

示例4: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:OptionsConfigurationBlock.java

示例5: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
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());
		}
	});
	//fExpandables.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:16,代码来源:AbstractWizardNewTypeScriptProjectCreationPage.java

示例6: updateSectionStyle

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected void updateSectionStyle(ExpandableComposite excomposite) {
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:4,代码来源:AbstractConfigurationBlock.java

示例7: createAdvancedOptions

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void createAdvancedOptions(Composite parent) {
  IPixelConverter converter = PixelConverterFactory.createPixelConverter(JFaceResources.getDialogFont());

  // Expandable panel for advanced options
  final ExpandableComposite expandPanel = new ExpandableComposite(parent, SWT.NONE,
      ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
  expandPanel.setText("Advanced");
  expandPanel.setExpanded(false);
  expandPanel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
  GridData expandPanelGridData = new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1);
  expandPanelGridData.verticalIndent = converter.convertHeightInCharsToPixels(1);
  expandPanel.setLayoutData(expandPanelGridData);
  expandPanel.addExpansionListener(new ExpansionAdapter() {
    @Override
    public void expansionStateChanged(ExpansionEvent e) {
      Shell shell = getShell();
      shell.setLayoutDeferred(true); // Suppress redraw flickering

      Point size = shell.getSize();
      int shellHeightDeltaOnExpand = advancedContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
      if (expandPanel.isExpanded()) {
        shell.setSize(size.x, size.y + shellHeightDeltaOnExpand);
      } else {
        shell.setSize(size.x, size.y - shellHeightDeltaOnExpand);
      }
      shell.layout(true, true);

      shell.setLayoutDeferred(false);
    }
  });

  advancedContainer = new Composite(expandPanel, SWT.NONE);
  advancedContainer.setLayoutData(new GridData());
  advancedContainer.setFont(parent.getFont());
  advancedContainer.setLayout(new GridLayout(1, false));
  expandPanel.setClient(advancedContainer);

  // Additional compiler parameters field
  SWTFactory.createLabel(advancedContainer, "Additional compiler arguments:", 1);
  extraArgsText = SWTUtilities.createMultilineTextbox(advancedContainer, SWT.BORDER, false);
  GridData extraArgsGridData = new GridData(GridData.FILL_HORIZONTAL);
  extraArgsGridData.heightHint = converter.convertHeightInCharsToPixels(5);
  extraArgsText.setLayoutData(extraArgsGridData);

  // Additional VM args field
  SWTFactory.createLabel(advancedContainer, "VM arguments:", 1);
  vmArgsText = SWTUtilities.createMultilineTextbox(advancedContainer, SWT.BORDER, false);
  GridData vmArgsGridData = new GridData(GridData.FILL_HORIZONTAL);
  vmArgsGridData.heightHint = converter.convertHeightInCharsToPixels(5);
  vmArgsText.setLayoutData(vmArgsGridData);
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:52,代码来源:GWTCompileDialog.java

示例8: createExpandibleComposite

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:29,代码来源:SWTFactory.java

示例9: createExpandibleComposite

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:22,代码来源:SWTFactory.java


注:本文中的org.eclipse.ui.forms.widgets.ExpandableComposite.setFont方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。