當前位置: 首頁>>代碼示例>>Java>>正文


Java Composite.getFont方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.Composite.getFont方法的典型用法代碼示例。如果您正苦於以下問題:Java Composite.getFont方法的具體用法?Java Composite.getFont怎麽用?Java Composite.getFont使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.Composite的用法示例。


在下文中一共展示了Composite.getFont方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createControl

import org.eclipse.swt.widgets.Composite; //導入方法依賴的package包/類
/**
 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
 **/
@Override
public void createControl(Composite parent) {
	Font font = parent.getFont();
	Composite comp = createComposite(parent, font, 1, 1, GridData.FILL_BOTH);
	createFileGroup(comp);
	setControl(comp);

}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:12,代碼來源:LaunchConfigurationMainTab.java

示例2: 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

示例3: createControl

import org.eclipse.swt.widgets.Composite; //導入方法依賴的package包/類
/**
 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
 */
@Override
public void createControl(Composite parent) {
	Font font = parent.getFont();
	Composite comp = createComposite(parent, font, 1, 1, GridData.FILL_BOTH);
	createResourceGroup(comp);
	createImplementationIdGroup(comp);
	setControl(comp);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:12,代碼來源:AbstractLaunchConfigurationMainTab.java

示例4: createDestinationGroup

import org.eclipse.swt.widgets.Composite; //導入方法依賴的package包/類
/**
 * Create the export destination specification widgets
 *
 * @param parent
 *            org.eclipse.swt.widgets.Composite
 */
@SuppressWarnings("unused")
@Override
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("npm Target Folder");
	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);
	BidiUtils.applyBidiProcessing(destinationNameField, StructuredTextTypeHandlerFactory.FILE);

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

	new Label(parent, SWT.NONE); // vertical spacer
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:47,代碼來源:ExportSelectionPage.java


注:本文中的org.eclipse.swt.widgets.Composite.getFont方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。