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


Java Composite.setFont方法代码示例

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


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

示例1: createContents

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createContents(Composite parent) {
	Composite composite = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	composite.setLayout(layout);
	composite.setFont(parent.getFont());

	GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);

	configurationBlockControl = super.createContents(composite);
	configurationBlockControl.setLayoutData(data);

	if (isProjectPreferencePage()) {
		boolean useProjectSpecificSettings = hasProjectSpecificOptions();
		enableProjectSpecificSettings(useProjectSpecificSettings);
	}

	Dialog.applyDialogFont(composite);
	return composite;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:23,代码来源:AbstractN4JSPreferencePage.java

示例2: createButtonBar

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createButtonBar(Composite parent) {
    final Composite buttonBar = new Composite(parent, SWT.NONE);
    buttonBar.setBackground(backColor);
    		
    final GridLayout layout = new GridLayout();
    layout.marginLeft = 10;
    layout.numColumns = 2;
    layout.makeColumnsEqualWidth = false;
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    buttonBar.setLayout(layout);

    final GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
    data.grabExcessHorizontalSpace = true;
    data.grabExcessVerticalSpace = false;
    buttonBar.setLayoutData(data);

    buttonBar.setFont(parent.getFont());

    // add the dialog's button bar to the right
    buttonControl = super.createButtonBar(buttonBar);
    buttonControl.setBackground(backColor);
    buttonControl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));

    return buttonBar;
}
 
开发者ID:gluonhq,项目名称:ide-plugins,代码行数:27,代码来源:PluginDialog.java

示例3: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent)
{
	initializeDialogUnits(parent);

	final Composite composite = new Composite(parent, SWT.NULL);
	composite.setFont(parent.getFont());
	composite.setLayout(initGridLayout(new GridLayout(1, false), true));
	composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));

	// create UI elements
	Control nameControl = createNameControl(composite);
	nameControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control locationControl = createLocationControl(composite);
	locationControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control workingSetControl = createWorkingSetControl(composite);
	workingSetControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control infoControl = createInfoControl(composite);
	infoControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	setControl(composite);
}
 
开发者ID:equella,项目名称:Equella,代码行数:26,代码来源:NewJPFRegistryWizardPageOne.java

示例4: createButtonBar

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createButtonBar(Composite parent) {
	Composite composite = new Composite(parent, SWT.NONE);
	// create a layout with spacing and margins appropriate for the font
	// size.
	GridLayout layout = new GridLayout();
	layout.numColumns = 0; // this is incremented by createButton
	layout.makeColumnsEqualWidth = true;
	layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN );
	layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN - 4);
	layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
	layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING -2);
	
	composite.setLayout(layout);
	GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END
			| GridData.VERTICAL_ALIGN_CENTER);
	
	composite.setLayoutData(data);
	composite.setFont(parent.getFont());
	
	// Add the buttons to the button bar.
	createButtonsForButtonBar(composite);
	return composite;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:25,代码来源:ParamterValueDialog.java

示例5: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	initializeDialogUnits(parent);

	final Composite composite= new Composite(parent, SWT.NULL);
	composite.setFont(parent.getFont());
	composite.setLayout(initGridLayout(new GridLayout(1, false), true));
	composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));

	// create UI elements
	Control nameControl= createNameControl(composite);
	nameControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control locationControl= createLocationControl(composite);
	locationControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control infoControl= createInfoControl(composite);
	infoControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	setControl(composite);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:22,代码来源:WizardNewProjectCreationPage.java

示例6: createComposite

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@SuppressWarnings("javadoc")
public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) {
	Composite g = new Composite(parent, SWT.NONE);
	g.setLayout(new GridLayout(columns, false));
	g.setFont(font);
	GridData gd = new GridData(fill);
	gd.horizontalSpan = hspan;
	g.setLayoutData(gd);
	return g;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:LaunchConfigurationMainTab.java

示例7: createDestinationGroup

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * Create the export destination specification widgets
 */
protected void createDestinationGroup(Composite parent) {
	Font font = parent.getFont();
	// destination specification group
	Composite destinationSelectionGroup = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	destinationSelectionGroup.setLayout(layout);
	destinationSelectionGroup.setLayoutData(new GridData(
			GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
	destinationSelectionGroup.setFont(font);

	Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE);
	destinationLabel.setText(getTargetLabel());
	destinationLabel.setFont(font);

	// destination name entry field
	destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE
			| SWT.BORDER);
	destinationNameField.addListener(SWT.Modify, this);
	destinationNameField.addListener(SWT.Selection, this);
	GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
			| GridData.GRAB_HORIZONTAL);
	data.widthHint = SIZING_TEXT_FIELD_WIDTH;
	destinationNameField.setLayoutData(data);
	destinationNameField.setFont(font);

	// destination browse button
	destinationBrowseButton = new Button(destinationSelectionGroup,
			SWT.PUSH);
	destinationBrowseButton.setText(N4ExportMessages.DataTransfer_browse);
	destinationBrowseButton.addListener(SWT.Selection, this);
	destinationBrowseButton.setFont(font);
	setButtonLayoutData(destinationBrowseButton);

	// new Label(parent, SWT.NONE); // vertical spacer
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:40,代码来源:AbstractExportToSingleFileWizardPage.java

示例8: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * (non-Javadoc) Method declared on IDialogPage.
 */
@Override
public void createControl(Composite parent) {

	initializeDialogUnits(parent);

	Composite composite = new Composite(parent, SWT.NULL);
	composite.setLayout(new GridLayout());
	composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
			| GridData.HORIZONTAL_ALIGN_FILL));
	composite.setFont(parent.getFont());

	createExportGoups(composite);

	restoreWidgetValues(); // ie.- subclass hook
	if (initialResourceSelection != null) {
		setupBasedOnInitialSelections();
	}

	updateWidgetEnablements();
	setPageComplete(determinePageCompletion());
	setErrorMessage(null); // should not initially have error message

	setControl(composite);

	giveFocusToDestination();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:30,代码来源:AbstractExportToSingleFileWizardPage.java

示例9: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * (non-Javadoc) Method declared on IDialogPage.
 */
@Override
public void createControl(Composite parent) {

	initializeDialogUnits(parent);

	Composite composite = new Composite(parent, SWT.NULL);
	composite.setLayout(new GridLayout());
	composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
			| GridData.HORIZONTAL_ALIGN_FILL));
	composite.setFont(parent.getFont());

	// createResourcesGroup(composite); // unwanted.
	createChoiceListGroup(composite);
	// createButtonsGroup(composite); // unwanted.

	createDestinationGroup(composite);

	createOptionsGroup(composite);

	restoreResourceSpecificationWidgetValues();
	restoreWidgetValues();

	setupBasedOnInitialSelections();

	createErrorGroup(composite);
	setControl(composite);

	updateWidgetEnablements();
	updatePageCompletion();

}
 
开发者ID:eclipse,项目名称:n4js,代码行数:35,代码来源:ExportSelectionPage.java

示例10: createErrorGroup

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * @param parent
 * @param composite
 */
private void createErrorGroup(Composite parent) {
	Composite errorGroup = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	errorGroup.setLayout(layout);
	errorGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	errorGroup.setFont(parent.getFont());
	errorText = new Text(errorGroup, SWT.READ_ONLY | SWT.WRAP | SWT.MULTI | SWT.BORDER);
	errorText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	errorText.setText("asldfjlasjflkj");
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:ExportSelectionPage.java

示例11: createErrorGroup

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void createErrorGroup(Composite parent) {
	Composite errorGroup = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	errorGroup.setLayout(layout);
	errorGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	errorGroup.setFont(parent.getFont());
	errorText = new StyledText(errorGroup, SWT.READ_ONLY | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
	errorText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:SpecProcessPage.java

示例12: createComposite

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@SuppressWarnings("javadoc")
protected static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) {
	Composite g = new Composite(parent, SWT.NONE);
	g.setLayout(new GridLayout(columns, false));
	g.setFont(font);
	GridData gd = new GridData(fill);
	gd.horizontalSpan = hspan;
	g.setLayoutData(gd);
	return g;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:AbstractLaunchConfigurationMainTab.java

示例13: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent)
{
	initializeDialogUnits(parent);

	final Composite composite = new Composite(parent, SWT.NULL);
	composite.setFont(parent.getFont());
	composite.setLayout(initGridLayout(new GridLayout(1, false), true));
	composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));

	// create UI elements
	Control nameControl = createNameControl(composite);
	nameControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control locationControl = createLocationControl(composite);
	locationControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));


	Control registryControl = registry.createContent(composite);
	registryControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control equellaControl = equella.createContent(composite);
	equellaControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control workingSetControl = createWorkingSetControl(composite);
	workingSetControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	Control infoControl = createInfoControl(composite);
	infoControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	setControl(composite);
}
 
开发者ID:equella,项目名称:Equella,代码行数:33,代码来源:NewJPFPluginWizardPageOne.java

示例14: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	Composite comp = new Composite(parent, SWT.NONE);
	setControl(comp);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), getHelpContextId());
	comp.setLayout(new GridLayout(1, true));
	comp.setFont(parent.getFont());

	createVerticalSpacer(comp, 3);
	createDebugAdapterComponent(comp);
	createDebugJSonComponent(comp);

}
 
开发者ID:tracymiranda,项目名称:dsp4e,代码行数:14,代码来源:DSPMainTab.java

示例15: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * (non-Javadoc) Method declared on IDialogPage.
 */
public void createControl(Composite parent) {
	initializeDialogUnits(parent);
	// top level group
	Composite topLevel = new Composite(parent, SWT.NONE);
	topLevel.setLayout(new GridLayout());
	topLevel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
			| GridData.HORIZONTAL_ALIGN_FILL));
	topLevel.setFont(parent.getFont());
	PlatformUI.getWorkbench().getHelpSystem()
			.setHelp(topLevel, IIDEHelpContextIds.NEW_FILE_WIZARD_PAGE);

	// resource and container group
	resourceGroup = new ResourceAndContainerGroup(topLevel, this,
			getNewFileLabel(),
			IDEWorkbenchMessages.WizardNewFileCreationPage_file, false,
			SIZING_CONTAINER_GROUP_HEIGHT);
	resourceGroup.setAllowExistingResources(initialAllowExistingResources);
	initialPopulateContainerNameField();
	createAdvancedControls(topLevel);
	if (initialFileName != null) {
		resourceGroup.setResource(initialFileName);
	}
	if (initialFileExtension != null) {
		resourceGroup.setResourceExtension(initialFileExtension);
	}
	validatePage();
	// Show description on opening
	setErrorMessage(null);
	setMessage(null);
	setControl(topLevel);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:35,代码来源:WizardNewFileCreationPage.java


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