本文整理汇总了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;
}
示例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();
}
示例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;
}
示例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;
}
示例5: getPageDefinitions
import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public IPageDefinition[] getPageDefinitions() {
return pageDefinitions;
}
示例6: getPageDefinition
import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public IPageDefinition getPageDefinition() {
return pageDefinition;
}
示例7: setPageDefinition
import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public void setPageDefinition(final IPageDefinition pageDefinition) {
this.pageDefinition = pageDefinition;
}
示例8: PreferenceDetailsBuilder
import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
public PreferenceDetailsBuilder(final IPageDefinition pageDefinition) {
this.pageDefinition = pageDefinition;
}
示例9: getPageDefinition
import it.albertus.jface.preference.page.IPageDefinition; //导入依赖的package包/类
IPageDefinition getPageDefinition();