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


Java IPageDefinition类代码示例

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


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

示例1: createPreferenceManager

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的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

示例2: Preferences

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public Preferences(final IPageDefinition[] pageDefinitions, final IPreference[] preferences, final IPreferencesCallback preferencesCallback, final Image[] images) {
	this.preferencesCallback = preferencesCallback;
	this.pageDefinitions = pageDefinitions;
	this.preferences = preferences;
	this.images = images;
	this.preferenceManager = createPreferenceManager();
	this.preferenceStore = createPreferenceStore();
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:9,代码来源:Preferences.java

示例3: ConfigurationNode

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public ConfigurationNode(final IPageDefinition pageDefinition, final IPreference[] preferences, final IPreferencesCallback preferencesCallback) {
	super(pageDefinition.getNodeId(), pageDefinition.getLabel().replace("&&", "&"), pageDefinition.getImage(), pageDefinition.getPageClass() != null ? pageDefinition.getPageClass().getName() : null);
	this.pageDefinition = pageDefinition;
	this.preferences = preferences;
	this.preferencesCallback = preferencesCallback;
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:7,代码来源:ConfigurationNode.java

示例4: openDialog

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public int openDialog(final Shell parentShell, final IPageDefinition selectedPage) throws IOException {
	// Load configuration file if exists...
	final File file = new File(preferencesCallback.getFileName());
	if (file.exists()) {
		loadConfigurationFile(file);
	}

	final PreferenceDialog preferenceDialog = new EnhancedPreferenceDialog(parentShell, preferenceManager, dialogTitle, images);

	preferenceDialog.setPreferenceStore(preferenceStore);

	if (selectedPage != null) {
		preferenceDialog.setSelectedNode(selectedPage.getNodeId());
	}

	final Map<String, String> configurationBackup = new HashMap<String, String>();
	for (final IPreference preference : preferences) {
		if (preference.isRestartRequired()) {
			configurationBackup.put(preference.getName(), preferenceStore.getString(preference.getName()));
		}
	}

	// Open configuration dialog...
	final int returnCode = preferenceDialog.open();

	if (returnCode == Window.OK) {
		// Reload configuration (autosaved by PreferenceStore on OK button)...
		try {
			preferencesCallback.reload(); // Callback
		}
		catch (final IOException ioe) {
			final String message = JFaceMessages.get("err.preferences.reload");
			logger.log(Level.WARNING, message, ioe);
			EnhancedErrorDialog.openError(parentShell, dialogTitle, message, IStatus.WARNING, ioe, new Image[] { Display.getCurrent().getSystemImage(SWT.ICON_WARNING) });
		}
	}

	for (final Entry<String, String> backedUpProperty : configurationBackup.entrySet()) {
		final String oldValue = backedUpProperty.getValue();
		final String newValue = preferenceStore.getString(backedUpProperty.getKey());
		if ((oldValue != null && newValue == null) || (oldValue == null && newValue != null) || (oldValue != null && !oldValue.equals(newValue))) {
			restartRequired = true;
			break;
		}
	}

	return returnCode;
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:49,代码来源:Preferences.java

示例5: getPageDefinitions

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public IPageDefinition[] getPageDefinitions() {
	return pageDefinitions;
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:4,代码来源:Preferences.java

示例6: getPageDefinition

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public IPageDefinition getPageDefinition() {
	return pageDefinition;
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:4,代码来源:PreferenceDetails.java

示例7: setPageDefinition

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public void setPageDefinition(final IPageDefinition pageDefinition) {
	this.pageDefinition = pageDefinition;
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:4,代码来源:PreferenceDetails.java

示例8: PreferenceDetailsBuilder

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public PreferenceDetailsBuilder(final IPageDefinition pageDefinition) {
	this.pageDefinition = pageDefinition;
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:4,代码来源:PreferenceDetails.java

示例9: getPageDefinition

import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
IPageDefinition getPageDefinition(); 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:2,代码来源:IPreference.java


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