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


Java PreferenceNode类代码示例

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


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

示例1: registerConfig

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
@Override
public void registerConfig() {
	ConfigurationGUISetup setup = new ConfigurationGUISetup() {

		@Override
		public void proccess(PreferenceManager mger) {
			PreferenceNode encryption = new PreferenceNode("compressMac", "Encryption", null,
					CompressMacPreference.class.getCanonicalName());
			PreferenceNode blockCipher = new PreferenceNode("blockcipher", "Block Cipher", null,
					BlockCipherPreferencePage.class.getCanonicalName());
			PreferenceNode streamCipher = new PreferenceNode("streamcipher", "Stream Cipher", null,
					StreamCipherPreferencePage.class.getCanonicalName());
			encryption.add(blockCipher);
			encryption.add(streamCipher);
			mger.addToRoot(encryption);
		}
	};

	PreferenceGUIManager.add(setup);
}
 
开发者ID:shilongdai,项目名称:vsDiaryWriter,代码行数:21,代码来源:ViperfishEncryptionProvider.java

示例2: configureWorkspaceSettings

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
private void configureWorkspaceSettings() {
	String preferenceNodeId = this.getPreferenceNodeId();
	IPreferencePage preferencePage = newPreferencePage();
	final IPreferenceNode preferenceNode = new PreferenceNode(preferenceNodeId, preferencePage);
	PreferenceManager manager = new PreferenceManager();
	manager.addToRoot(preferenceNode);
	final PreferenceDialog dialog = new PreferenceDialog(this.getControl().getShell(), manager);
	BusyIndicator.showWhile(this.getControl().getDisplay(), new Runnable() {
		@Override
		public void run() {
			dialog.create();
			dialog.setMessage(preferenceNode.getLabelText());
			dialog.open();
		}
	});
}
 
开发者ID:cincheo,项目名称:jsweet-eclipse-plugin,代码行数:17,代码来源:FieldEditorProjectPreferencePage.java

示例3: getSecondaryPreferenceNodes

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * Returns an array of the secondary preference nodes.
 */
public PreferenceNode[] getSecondaryPreferenceNodes() {
	return new PreferenceNode[] {
			new PreferenceNode("bicsMenuActions", new ActionContainerPage(
					local.getString("bicsConnector1"),
					local.getString("bicsConnector2"),
					RaptorActionContainer.BicsMenu)),
			new PreferenceNode("bics",
					new ConnectorMessageBlockPage("bics")),
			new PreferenceNode("bics", new BicsRightClickChannelMenu()),
			new PreferenceNode("bics", new BicsRightClickGamesMenu()),
			new PreferenceNode("bics", new BicsRightClickPersonMenu()),
			new PreferenceNode("bics", new ConnectorQuadrantsPage("bics")),
			new PreferenceNode("bics", new ConnectorQuadrantsPage("bics2")) };

}
 
开发者ID:evilwan,项目名称:raptor-chess-interface,代码行数:19,代码来源:BicsConnector.java

示例4: getSecondaryPreferenceNodes

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * Returns an array of the secondary preference nodes.
 */
public PreferenceNode[] getSecondaryPreferenceNodes() {
	return new PreferenceNode[] {
			new PreferenceNode("ficsMenuActions", new ActionContainerPage(
					local.getString("ficsConn3"),
					local.getString("ficsConn4"),
					RaptorActionContainer.FicsMenu)),
			new PreferenceNode("fics",
					new ConnectorMessageBlockPage("fics")),
			new PreferenceNode("fics", new FicsRightClickChannelMenu()),
			new PreferenceNode("fics", new FicsRightClickGamesMenu()),
			new PreferenceNode("fics", new FicsRightClickPersonMenu()),

			new PreferenceNode("fics", new ConnectorQuadrantsPage("fics")),
			new PreferenceNode("fics", new ConnectorQuadrantsPage("fics2")), };

}
 
开发者ID:evilwan,项目名称:raptor-chess-interface,代码行数:20,代码来源:FicsConnector.java

示例5: showPreferencePage

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * Show a single preference pages
 * 
 * @param id
 *          - the preference page identification
 * @param page
 *          - the preference page
 */
protected void showPreferencePage(String id, IPreferencePage page, final IProject project) {
	final IPreferenceNode targetNode = new PreferenceNode(id, page);
	PreferenceManager manager = new PreferenceManager();
	manager.addToRoot(targetNode);
	Shell shell = getControl().getShell();
	final PreferenceDialog dialog = project == null ? new PreferenceDialog(shell, manager) : new PropertyDialog(shell,
			manager, new StructuredSelection(project));
	BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
		public void run() {
			dialog.create();
			dialog.setMessage(targetNode.getLabelText());
			dialog.open();
		}
	});
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:24,代码来源:FieldEditorOverlayPage.java

示例6: createPreferenceManager

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
protected PreferenceManager createPreferenceManager() {
	final PreferenceManager manager = new PreferenceManager();

	// Pages creation...
	final Map<IPageDefinition, PreferenceNode> preferenceNodes = new HashMap<IPageDefinition, PreferenceNode>();
	for (final IPageDefinition page : pageDefinitions) {
		final PreferenceNode preferenceNode = new ConfigurationNode(page, preferences, preferencesCallback);
		if (page.getParent() != null) {
			preferenceNodes.get(page.getParent()).add(preferenceNode);
		}
		else {
			manager.addToRoot(preferenceNode);
		}
		preferenceNodes.put(page, preferenceNode);
	}
	return manager;
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:18,代码来源:Preferences.java

示例7: showPreferencePage

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * This method allows us to open the preference dialog on the specific page, in this case the perspective page
 * 
 * @param id
 *            the id of pref page to show
 * @param page
 *            the actual page to show Copied from org.eclipse.debug.internal.ui.SWTUtil
 */
public static void showPreferencePage(String id, IPreferencePage page)
{
	final IPreferenceNode targetNode = new PreferenceNode(id, page);
	PreferenceManager manager = new PreferenceManager();
	manager.addToRoot(targetNode);
	final PreferenceDialog dialog = new PreferenceDialog(UIUtils.getActiveShell(), manager);
	BusyIndicator.showWhile(getStandardDisplay(), new Runnable()
	{
		public void run()
		{
			dialog.create();
			dialog.setMessage(targetNode.getLabelText());
			dialog.open();
		}
	});
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:25,代码来源:SWTUtil.java

示例8: registerPreferenceNodes

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
public void registerPreferenceNodes(PreferenceManager preferenceManager)
{
    String className;

    //System.out.println("BT AVAIL: " + btAvailable + " and asterisk 1.2: "
    //        + asterisk.getVersion().contains("Asterisk 1.2"));

    //if (asterisk.supportsRedirectMode() && btAvailable)
    //TODO fix the detection
    if (btAvailable)
    {
        className = BluetoothPreferencePage.class.getName();
    }
    else
    {
        className = BluetoothDisabledPreferencePage.class.getName();
    }

    PreferenceNode bluetoothNode = new PreferenceNode("bluetooth", //$NON-NLS-1$
            Messages.getString("BluetoothPreferencePage.title"), null, //$NON-NLS-1$
            className);

    preferenceManager.addToRoot(bluetoothNode);
}
 
开发者ID:rhamnett,项目名称:dazzl,代码行数:25,代码来源:BluetoothPlugin.java

示例9: initModules

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * load all providers.
 * 
 * This method loads all provider available.
 */
public static void initModules() {

	// prepare to load modules

	modules = new File("modules");
	CommonFunctions.initDir(modules);
	m = new PF4JModuleLoader();

	// put system configuration first

	ConfigurationGUISetup setup = new ConfigurationGUISetup() {

		@Override
		public void proccess(PreferenceManager mger) {
			PreferenceNode system = new PreferenceNode("system", "System", null,
					SystemPreferencePage.class.getCanonicalName());
			mger.addToRoot(system);
		}
	};

	PreferenceGUIManager.add(setup);

	// register the providers
	AuthManagers.INSTANCE.registerAuthProvider(new ViperfishAuthProvider());
	EntryDatabases.INSTANCE.registerEntryDatabaseProvider(new ViperfishEntryDatabaseProvider());
	Indexers.INSTANCE.registerIndexerProvider(new ViperfishIndexerProvider());
	JournalTransformers.INSTANCE.registerTransformerProvider(new ViperfishEncryptionProvider());

	// load third party
	m.loadModules(modules);
}
 
开发者ID:shilongdai,项目名称:vsDiaryWriter,代码行数:37,代码来源:JournalApplication.java

示例10: showPreferencePage

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * Show a single preference pages
 * 
 * @param id
 *            - the preference page identification
 * @param page
 *            - the preference page
 */
protected void showPreferencePage(String id, IPreferencePage page) {
	final IPreferenceNode targetNode = new PreferenceNode(id, page);
	PreferenceManager manager = new PreferenceManager();
	manager.addToRoot(targetNode);
	final PreferenceDialog dialog = new PreferenceDialog(getControl()
			.getShell(), manager);
	BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
		public void run() {
			dialog.create();
			dialog.setMessage(targetNode.getLabelText());
			dialog.open();
		}
	});
}
 
开发者ID:kwin,项目名称:cppcheclipse,代码行数:23,代码来源:FieldEditorOverlayPage.java

示例11: showPreferencePage

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * Show a single preference pages
 * @param id - the preference page identification
 * @param page - the preference page
 */
protected void showPreferencePage(String id, IPreferencePage page) {
	final IPreferenceNode targetNode = new PreferenceNode(id, page);
	PreferenceManager manager = new PreferenceManager();
	manager.addToRoot(targetNode);
	final PreferenceDialog dialog =
		new PreferenceDialog(getControl().getShell(), manager);
	BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
		public void run() {
			dialog.create();
			dialog.setMessage(targetNode.getLabelText());
			dialog.open();
		}
	});
}
 
开发者ID:camac,项目名称:Swiper,代码行数:20,代码来源:FieldEditorOverlayPage.java

示例12: showPreferencePage

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
 * Show a single preference pages
 * 
 * @param id
 *          - the preference page identification
 * @param page
 *          - the preference page
 */
protected void showPreferencePage(String id, IPreferencePage page) {
	final IPreferenceNode targetNode = new PreferenceNode(id, page);
	PreferenceManager manager = new PreferenceManager();
	manager.addToRoot(targetNode);
	final PreferenceDialog dialog = new PreferenceDialog(getControl().getShell(), manager);
	BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
		public void run() {
			dialog.create();
			dialog.setMessage(targetNode.getLabelText());
			dialog.open();
		}
	});
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:22,代码来源:OverlayPage.java

示例13: registerPreferenceNodes

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
public void registerPreferenceNodes(PreferenceManager preferenceManager) {
    String className;
    className = LwrfPreferencePage.class.getName();
    PreferenceNode lwrfNode = new PreferenceNode("lwrf", //$NON-NLS-1$
            Messages.getString("LwrfPreferencePage.title"), null, //$NON-NLS-1$
            className);
    preferenceManager.addToRoot(lwrfNode);
}
 
开发者ID:rhamnett,项目名称:dazzl,代码行数:9,代码来源:LwrfPlugin.java

示例14: showPreferencePage

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
protected void showPreferencePage(String id, IPreferencePage page) {
	final IPreferenceNode targetNode = new PreferenceNode(id, page);
	PreferenceManager manager = new PreferenceManager();
	manager.addToRoot(targetNode);
	final PreferenceDialog dialog = 
			new PreferenceDialog(getControl().getShell(), manager);
	BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
		public void run() {
			dialog.create();
			dialog.setMessage(targetNode.getLabelText());
			dialog.open();
		}
	});
}
 
开发者ID:eposse,项目名称:osate2-agcl,代码行数:15,代码来源:FieldEditorOverlayPage.java

示例15: Preferences

import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
public Preferences(Shell parent) {
PreferenceManager preferenceManager = new PreferenceManager();

PreferenceNode general = new PreferenceNode("General", new PreferencePageGeneral());
preferenceManager.addToRoot(general);

PreferenceNode cmd = new PreferenceNode("Command line", new PreferencePageCmd());
preferenceManager.addToRoot(cmd);

preferenceDialog = new PreferenceDialog(parent, preferenceManager);
preferenceDialog.setPreferenceStore(preferences);
}
 
开发者ID:DaveVoorhis,项目名称:Rel,代码行数:13,代码来源:Preferences.java


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