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


Java FileFieldEditor类代码示例

本文整理汇总了Java中org.eclipse.jface.preference.FileFieldEditor的典型用法代码示例。如果您正苦于以下问题:Java FileFieldEditor类的具体用法?Java FileFieldEditor怎么用?Java FileFieldEditor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createFieldEditors

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@Override
protected void createFieldEditors() {
    addField(new BooleanFieldEditor(PREF.PGDUMP_SWITCH,
            Messages.generalPrefPage_pg_dump_switch, getFieldEditorParent()));

    addField(new FileFieldEditor(PREF.PGDUMP_EXE_PATH,
            Messages.generalPrefPage_pg_dump_executable, getFieldEditorParent()){

        @Override
        protected boolean checkState() {
            return true;
        }
    });

    addField(new StringFieldEditor(PREF.PGDUMP_CUSTOM_PARAMS,
            Messages.generalPrefPage_pg_dump_custom_parameters, getFieldEditorParent()));

    addField(new BooleanFieldEditor(PREF.FORCE_SHOW_CONSOLE,
            Messages.generalPrefPage_show_console_when_program_write_to_console, getFieldEditorParent()));

    addField(new BooleanFieldEditor(PREF.NO_PRIVILEGES,
            Messages.dbUpdatePrefPage_ignore_privileges,
            getFieldEditorParent()));

}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:26,代码来源:GeneralPrefPage.java

示例2: createFieldEditors

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/** Creates the field editors. */
@Override
public void createFieldEditors() {
	Composite parent = getFieldEditorParent();

	Group frame = new Group(parent, SWT.NONE);
	frame.setText("Stylesheets");
	GridDataFactory.fillDefaults().indent(0, 6).grab(true, false).span(2, 1).applyTo(frame);
	GridLayoutFactory.fillDefaults().numColumns(3).margins(6, 6).applyTo(frame);

	Composite internal = new Composite(frame, SWT.NONE);
	GridDataFactory.fillDefaults().indent(0, 4).grab(true, false).applyTo(internal);
	GridLayoutFactory.fillDefaults().numColumns(3).applyTo(internal);

	// Github Syntax support
	addField(new BooleanFieldEditor(EDITOR_GITHUB_SYNTAX, "Support Github Syntax", internal));

	// Multi-Markdown support
	addField(new BooleanFieldEditor(EDITOR_MULTIMARKDOWN_METADATA, "Support Multi-Markdown Metadata", internal));

	// Browser CSS
	addField(new ComboFieldEditor(EDITOR_CSS_DEFAULT, "Default Stylesheet", builtins(), internal));
	addField(new FileFieldEditor(EDITOR_CSS_CUSTOM, "Custom Stylesheet", internal));
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:25,代码来源:PrefPageStyles.java

示例3: createFieldEditors

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@Override
protected void createFieldEditors() {

	
	FileFieldEditor defaultFilter = new FileFieldEditor(PREF_CUST_FILTER, "Custom XSLT Filter",
			getFieldEditorParent());	
	addField(defaultFilter);
	
	BooleanFieldEditor mimcXmlDeclaration = new BooleanFieldEditor(PREF_MIMICXMLDECL,
			"Mimic Dora XML Declaration (no 'encoding=UTF-8')", getFieldEditorParent());
	addField(mimcXmlDeclaration);

	BooleanFieldEditor dontAddNewLine = new BooleanFieldEditor(PREF_MIMIC_DXLEXPORT_EOF,
			"Mimic EOF of DXL Export (Add extra Line Endings to end of file)", getFieldEditorParent());
	addField(dontAddNewLine);
	
	if (!isPropertyPage()) {
		BooleanFieldEditor enableAll = new BooleanFieldEditor(PREF_ENABLE_ALL, "Enable Swiper for ALL Projects", getFieldEditorParent());
		addField(enableAll);
	}
	
}
 
开发者ID:camac,项目名称:Swiper,代码行数:23,代码来源:SwiperPreferencePage.java

示例4: createAdvancedControls

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
protected void createAdvancedControls(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 FileFieldEditor("fileSelect", "Select File: ", fileSelectionArea); // NON-NLS-1 //NON-NLS-2
editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
    public void modifyText(ModifyEvent e) {
	IPath path = new Path(MediaImportWizardPage.this.editor.getStringValue());
	setFileName(path.lastSegment());
    }
});
String[] extensions = new String[] { "*.*" }; // NON-NLS-1
editor.setFileExtensions(extensions);
fileSelectionArea.moveAbove(null);

   }
 
开发者ID:synergynet,项目名称:synergyview,代码行数:25,代码来源:MediaImportWizardPage.java

示例5: createAdvancedControls

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
protected void createAdvancedControls(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 FileFieldEditor("fileSelect","Select File: ",fileSelectionArea); //NON-NLS-1 //NON-NLS-2
	editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
		public void modifyText(ModifyEvent e) {
			IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
			setFileName(path.lastSegment());
		}
	});
	String[] extensions = new String[] { "*.*" }; //NON-NLS-1
	editor.setFileExtensions(extensions);
	fileSelectionArea.moveAbove(null);

}
 
开发者ID:jesusc,项目名称:bento,代码行数:26,代码来源:ImportWizardPage.java

示例6: createAdvancedControls

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
protected void createAdvancedControls(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 FileFieldEditor("fileSelect","Select File: ",fileSelectionArea); //NON-NLS-1 //NON-NLS-2
	editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
		public void modifyText(ModifyEvent e) {
			IPath path = new Path(OntologyImportWizardPage.this.editor.getStringValue());
			setFileName(path.lastSegment());
		}
	});
	String[] extensions = new String[] { "*.*" }; //NON-NLS-1
	editor.setFileExtensions(extensions);
	fileSelectionArea.moveAbove(null);

}
 
开发者ID:ag-csw,项目名称:SVoNt,代码行数:26,代码来源:OntologyImportWizardPage.java

示例7: createFieldEditors

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
protected void createFieldEditors() {
    // Initialize all field editors.
    FileFieldEditor dotPath = new FileFieldEditor(AutoLayoutPreferences.PREF_DOTPATH, Messages.getString("AutoLayoutDotSettingsWizardPage.dotPath"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(dotPath);

    StringFieldEditor width = new StringFieldEditor(AutoLayoutPreferences.PREF_WIDTH, Messages.getString("AutoLayoutDotSettingsWizardPage.width"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(width);

    StringFieldEditor height = new StringFieldEditor(AutoLayoutPreferences.PREF_HEIGHT, Messages.getString("AutoLayoutDotSettingsWizardPage.height"), //$NON-NLS-1$
            getFieldEditorParent());
    addField(height);

    String[][] values = { { Messages.getString("AutoLayoutDotSettingsWizardPage.topdown"), "TB" }, //$NON-NLS-1$ //$NON-NLS-2$
            { Messages.getString("AutoLayoutDotSettingsWizardPage.leftright"), "LR" } }; //$NON-NLS-1$ //$NON-NLS-2$

    RadioGroupFieldEditor orientation = new RadioGroupFieldEditor(AutoLayoutPreferences.PREF_ORIENTATION, Messages
            .getString("AutoLayoutDotSettingsWizardPage.orientation"), 1, values, getFieldEditorParent()); //$NON-NLS-1$
    addField(orientation);

    BooleanFieldEditor empty = new BooleanFieldEditor(AutoLayoutPreferences.PREF_EMPTYPOINTS, Messages
            .getString("AutoLayoutDotSettingsWizardPage.manipulateEmptyPoints"), getFieldEditorParent()); //$NON-NLS-1$
    addField(empty);

}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:27,代码来源:AutoLayoutPreferencePage.java

示例8: createFieldEditors

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@Override
protected void createFieldEditors(){
	final Composite parentComp = getFieldEditorParent();
	final RadioGroupFieldEditor groupFieldEditor =
		new RadioGroupFieldEditor(
			BATCH_OR_FTP,
			Messages.getString("PreferencePage.direktimport.label"), 2, new String[][] { //$NON-NLS-1$
				{
					Messages.getString("PreferencePage.batchscript.label"), BATCH}, { Messages.getString("PreferencePage.ftpserver.label"), FTP}}, //$NON-NLS-1$ //$NON-NLS-2$
			parentComp, true);
	final FileFieldEditor batchFileEditor =
		new FileFieldEditor(BATCH_DATEI, Messages.getString("PreferencePage.batchdatei.label"), //$NON-NLS-1$
			parentComp);
	
	addField(groupFieldEditor);
	addField(batchFileEditor);
	
	addField(new StringFieldEditor(FTP_HOST,
		Messages.getString("PreferencePage.label.host"), getFieldEditorParent())); //$NON-NLS-1$
	addField(new StringFieldEditor(FTP_USER,
		Messages.getString("PreferencePage.label.user"), getFieldEditorParent())); //$NON-NLS-1$
	addField(new StringFieldEditor(FTP_PWD,
		Messages.getString("PreferencePage.label.password"), getFieldEditorParent())); //$NON-NLS-1$
	addField(new InexistingDirectoryOKDirectoryFieldEditor(DL_DIR,
		Messages.getString("PreferencePage.label.download"), getFieldEditorParent())); //$NON-NLS-1$
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:27,代码来源:PreferencePage.java

示例9: createCompilerSettings

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
protected void createCompilerSettings(Composite parent) {
	Composite composite = createGroupComposite(parent, "Solc compiler");
	compilerPathFieldEditor = new FileFieldEditor(SolidityPreferences.COMPILER_PATH, "Path to solc", composite);
	addField(compilerPathFieldEditor);
	addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_ENABLED, "Enable solidity compiler", composite));
	addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_BIN, "Enable solidity bin output",
			composite));
	addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_AST, "Enable solidity ast output",
			composite));
	addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_ASM, "Enable solidity asm output",
			composite));
	addField(new BooleanFieldEditor(SolidityPreferences.COMPILER_OUTPUT_ABI, "Enable solidity abi output",
			composite));
	addField(new StringFieldEditor(SolidityPreferences.COMPILER_OUTPUT_PATH, "Compiler output path", composite));
}
 
开发者ID:Yakindu,项目名称:solidity-ide,代码行数:16,代码来源:SolidityCompilerPreferencePage.java

示例10: createControl

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@Override
public void createControl(Composite parent) 
{
	container = new Composite(parent, SWT.NONE);
	container.setLayout(new GridLayout(2, false));

	this.sourceFileField = new FileFieldEditor("fileSelect", "[y] Source Archive:", container);
	sourceFileField.setFileExtensions( new String[]{"*.zip"} );
	// Set the starting path to the downloads folder or home dir of the current user.
	sourceFileField.setFilterPath( new File(System.getProperty("user.home")) );

	sourceFileField.getTextControl( container ).addModifyListener( new ModifyListener() 
	{
		@Override
		public void modifyText( ModifyEvent e )
		{
			// no validation just yet, as this even gets triggered:
			// (1) copy and paste: once
			// (2) manual typing: once per character entered
			// (3) per change button - selection: once
			// so because of #2: need to do validation when submitting the wizard (in it's performFinish())
			// TODO: there must be a better way, but the FocusListener does not see when the selection is done via the browse button
			
			setErrorMessage(null);
			setPageComplete(true);
			// let the wizard update it's buttons
			getWizard().getContainer().updateButtons();
		}
	} );
			
	// required to avoid an error in the system
	setControl(container);
	// if this is an optional page, we set this page to complete right away.
	setPageComplete(isOptional);
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:36,代码来源:AttachSourcesPage.java

示例11: createControl

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
@Override
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);
	
	LabelFieldEditor player1labelFieldEditor = new LabelFieldEditor("Select Player 1 Squad.", fileSelectionArea);
	player1labelFieldEditor.adjustForNumColumns(3);
	
	setEditorPlayer1(new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea)); //NON-NLS-1 //NON-NLS-2
	String[] extensions = new String[] { "*.json", "*.xws" }; //NON-NLS-1
	getEditorPlayer1().setFileExtensions(extensions);
	
	fileSelectionArea.moveAbove(null);
	
	new SpacerFieldEditor(fileSelectionArea);
	
	LabelFieldEditor player2labelFieldEditor = new LabelFieldEditor("Select Player 2 Squad.", fileSelectionArea);
	player2labelFieldEditor.adjustForNumColumns(3);
	setEditorPlayer2(new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea)); //NON-NLS-1 //NON-NLS-2
	editorPlayer2.setFileExtensions(extensions);
	
	setControl(fileSelectionArea);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:33,代码来源:PlayerSquadsImportWizardPage.java

示例12: ProgramFieldEditor

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
public ProgramFieldEditor(String key, String label, Composite parent, String[] msg) {
	super(key, label, true, FileFieldEditor.VALIDATE_ON_KEY_STROKE, parent);
	this.msg = msg;

	setErrorMessage(msg[0]);
	setEmptyStringAllowed(true);
	getTextControl().setToolTipText(msg[1]);
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:9,代码来源:ProgramFieldEditor.java

示例13: createAdvancedControls

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#createAdvancedControls(org.eclipse.swt.widgets.Composite)
 */
protected void createAdvancedControls(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 FileFieldEditor("fileSelect", UMLMessage.LABEL_SELECT_FILE, fileSelectionArea); //$NON-NLS-1$
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
        /**
         * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
         */
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(RMDataExcelFileImportWizardPage.this.editor.getStringValue());
            setFileName(path.lastSegment());
        }
    });

    editor.setFileExtensions(UICoreConstant.PROJECT_CONSTANTS__IMPORT_RM_DATA_EXCEL_FILE_EXTENSIONS);
    fileSelectionArea.moveAbove(null);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:30,代码来源:RMDataExcelFileImportWizardPage.java

示例14: createAdvancedControls

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#createAdvancedControls(org.eclipse.swt.widgets.Composite)
 */
protected void createAdvancedControls(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 FileFieldEditor("fileSelect", UMLMessage.LABEL_SELECT_FILE, fileSelectionArea); //$NON-NLS-1$
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener() {
        /**
         * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
         */
        public void modifyText(ModifyEvent e) {
            IPath path = new Path(ProfileImportWizardPage.this.editor.getStringValue());
            isSourceExist = true;
            setFileExtension(path.getFileExtension());
            setFileName(path.lastSegment());
        }
    });

    editor.setFileExtensions(UICoreConstant.PROJECT_CONSTANTS__UML_PROFILE_FILE_EXTENSIONS);
    fileSelectionArea.moveAbove(null);

}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:33,代码来源:ProfileImportWizardPage.java

示例15: createFieldEditors

import org.eclipse.jface.preference.FileFieldEditor; //导入依赖的package包/类
/**
 * Add the ZAP preferences to the preferences page.
 */
@Override
protected void createFieldEditors() {
	FileFieldEditor zapJarLocation = new FileFieldEditor(ZAP_JAR_LOCATION, "ZAP JAR Location:",
			getFieldEditorParent());
	zapJarLocation.setEmptyStringAllowed(false);
	addField(zapJarLocation);

	DirectoryFieldEditor zapSessionDirectory = new DirectoryFieldEditor(ZAP_SESSION_DIRECTORY,
			"ZAP Session Directory", getFieldEditorParent());
	zapSessionDirectory.setEmptyStringAllowed(false);
	addField(zapSessionDirectory);

	StringFieldEditor zapSessionName = new StringFieldEditor(ZAP_SESSION_NAME, "ZAP Session Name",
			getFieldEditorParent());
	zapSessionName.setEmptyStringAllowed(false);
	addField(zapSessionName);

	IntegerFieldEditor zapProxyPort = new IntegerFieldEditor(ZAP_PROXY_PORT, "ZAP Proxy Port:",
			getFieldEditorParent());
	zapProxyPort.setValidRange(0, 99999);
	zapProxyPort.setEmptyStringAllowed(false);
	addField(zapProxyPort);

	StringFieldEditor zapApiKey = new StringFieldEditor(ZAP_API_KEY, "ZAP API Key", getFieldEditorParent());
	zapApiKey.setEmptyStringAllowed(false);
	addField(zapApiKey);
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:31,代码来源:ZAPPreferencePage.java


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