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


Java Composite.moveAbove方法代碼示例

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


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

示例1: createControl

import org.eclipse.swt.widgets.Composite; //導入方法依賴的package包/類
public void createControl(Composite parent) {
	Composite fileSelectionArea = new Composite(parent, SWT.NONE);
	GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
			| GridData.FILL_HORIZONTAL);
	fileSelectionArea.setLayoutData(fileSelectionData);

	GridLayout fileSelectionLayout = new GridLayout();
	fileSelectionLayout.numColumns = 3;
	fileSelectionLayout.makeColumnsEqualWidth = false;
	fileSelectionLayout.marginWidth = 0;
	fileSelectionLayout.marginHeight = 0;
	fileSelectionArea.setLayout(fileSelectionLayout);
	
	editor = new ProjectFileFieldEditor("fileSelect","Select File: ",fileSelectionArea);
	editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
		public void modifyText(ModifyEvent e) {
			IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
			filePath = path.toString();
			updateStatus();
		}
	});
	fileSelectionArea.moveAbove(null);
	updateStatus();
	setControl(fileSelectionArea);		
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:26,代碼來源:ImportWizardPage.java

示例2: createControl

import org.eclipse.swt.widgets.Composite; //導入方法依賴的package包/類
public void createControl(Composite parent) {
	Composite fileSelectionArea = new Composite(parent, SWT.NONE);
	GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
			| GridData.FILL_HORIZONTAL);
	fileSelectionArea.setLayoutData(fileSelectionData);

	GridLayout fileSelectionLayout = new GridLayout();
	fileSelectionLayout.numColumns = 3;
	fileSelectionLayout.makeColumnsEqualWidth = false;
	fileSelectionLayout.marginWidth = 0;
	fileSelectionLayout.marginHeight = 0;
	fileSelectionArea.setLayout(fileSelectionLayout);
	
	String projectName = getSelectedProject();
	projectName = (projectName == null) ? "":Engine.PROJECTS_PATH + "/" + projectName + ".car";
	editor = new ProjectFileFieldEditor("fileSelect","Select File: ",fileSelectionArea);
	editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
		public void modifyText(ModifyEvent e) {
			IPath path = new Path(ExportWizardPage.this.editor.getStringValue());
			filePath = path.toString();
			updateStatus();
		}
	});
	editor.getTextControl(fileSelectionArea).setText(projectName);
	fileSelectionArea.moveAbove(null);
	updateStatus();
	setControl(fileSelectionArea);		
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:29,代碼來源:ExportWizardPage.java

示例3: createAdvancedControls

import org.eclipse.swt.widgets.Composite; //導入方法依賴的package包/類
protected void createAdvancedControls(Composite parent) {
	LOGGER.debug("Creating Import Engine XML layout");
	Composite fileSelectionArea = new Composite(parent, SWT.NONE);
	fileSelectionArea.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));

	GridLayout fileSelectionLayout = new GridLayout();
	fileSelectionLayout.makeColumnsEqualWidth = false;
	fileSelectionLayout.marginWidth = 0;
	fileSelectionLayout.marginHeight = 0;
	fileSelectionArea.setLayout(fileSelectionLayout);

	editor = new FileFieldEditor("fileSelect", Messages.SELECT_FILE_LABEL_TEXT, fileSelectionArea);
	editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			IPath path = new Path(ImportEngineXmlWizardPage.this.editor.getStringValue());
			if (path.segment(0) != null) {
				targetxmlFilePath = editor.getStringValue();
				setFileName(path.lastSegment());
			} else {
				targetxmlFilePath = null;
				displayError();
			}
		}
	});
	String[] extensions = new String[] { ALLOWED_EXTENSIONS }; // NON-NLS-1
	editor.setFileExtensions(extensions);
	fileSelectionArea.moveAbove(null);

	Composite fileSelectionArea2 = new Composite(parent, SWT.NONE);
	fileSelectionArea2.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL));
	GridLayout fileSelectionLayout2 = new GridLayout();
	fileSelectionLayout2.numColumns = 2;

	fileSelectionLayout2.makeColumnsEqualWidth = false;
	fileSelectionLayout2.marginWidth = 0;
	fileSelectionLayout2.marginHeight = 0;
	fileSelectionArea2.setLayout(fileSelectionLayout2);
	Font fontNote = new Font(fileSelectionArea2.getDisplay(), TIMES_NEW_ROMAN_BALTIC_FONT, 9, SWT.BOLD);
	Label lblNoteHeader = new Label(fileSelectionArea2, SWT.NONE);
	lblNoteHeader.setText(Messages.NOTE_LABEL_HEADER_TEXT);
	lblNoteHeader.setFont(fontNote);
	Label lblNote = new Label(fileSelectionArea2, SWT.NONE);

	GridData gd_lblNote = new GridData(SWT.BOTTOM, SWT.CENTER, false, false, 1, 1);
	gd_lblNote.widthHint = 391;
	lblNote.setLayoutData(gd_lblNote);
	lblNote.setText(Messages.NOTE_MESSAGE_TEXT);

}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:50,代碼來源:ImportEngineXmlWizardPage.java


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