本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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);
}
示例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;
}
示例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;
}