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


Java IDialogSettings类代码示例

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


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

示例1: restoreWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
/**
 * Restores control settings that were saved in the previous instance of this page.
 */
private void restoreWidgetValues() {
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] directoryNames = settings.getArray(getStoreDestinationNamesID());
		if (directoryNames == null) {
			return; // ie.- no settings stored
		}

		// destination
		setDestinationValue(directoryNames[0]);
		for (int i = 0; i < directoryNames.length; i++) {
			addDestinationItem(directoryNames[i]);
		}

		// options
		overwriteExistingFilesCheckbox.setSelection(settings.getBoolean(getStoreOverwriteExistingFilesID()));
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:22,代码来源:AbstractExportToSingleFileWizardPage.java

示例2: saveWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
/**
 * Hook method for saving widget values for restoration by the next instance of this class.
 */
private void saveWidgetValues() {
	// update directory names history
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] directoryNames = settings.getArray(getStoreDestinationNamesID());
		if (directoryNames == null) {
			directoryNames = new String[0];
		}

		directoryNames = addToHistory(directoryNames, getTargetDirectory());
		settings.put(getStoreDestinationNamesID(), directoryNames);

		// options
		settings.put(getStoreOverwriteExistingFilesID(), overwriteExistingFilesCheckbox.getSelection());
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:AbstractExportToSingleFileWizardPage.java

示例3: internalSaveWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
@Override
protected void internalSaveWidgetValues() {

	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		// update directory names history
		String[] directoryNames = settings
				.getArray(STORE_EXPORT_DESTINATION_FOLDERS_ID);
		if (directoryNames == null) {
			directoryNames = new String[0];
		}

		directoryNames = addToHistory(directoryNames, getDestinationValue());
		settings.put(STORE_EXPORT_DESTINATION_FOLDERS_ID, directoryNames);

		// store checkbox - compress
		settings.put(STORE_EXPORT_COMPRESS_CONTENTS_ID, compressContentsCheckbox.getSelection());
	}

}
 
开发者ID:eclipse,项目名称:n4js,代码行数:21,代码来源:ExportSelectionPage.java

示例4: restoreWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
@Override
protected void restoreWidgetValues() {
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] directoryNames = settings
				.getArray(STORE_EXPORT_DESTINATION_FOLDERS_ID);
		if (directoryNames == null || directoryNames.length == 0) {
			// ie.- no settings stored
		} else {

			// destination
			setDestinationValue(directoryNames[0]);
			for (int i = 0; i < directoryNames.length; i++) {
				addDestinationItem(directoryNames[i]);
			}
		}
		compressContentsCheckbox.setSelection(settings.getBoolean(STORE_EXPORT_COMPRESS_CONTENTS_ID));
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:ExportSelectionPage.java

示例5: internalSaveWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
/** save for next usage */
protected void internalSaveWidgetValues() {

	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		// update goals history
		String[] npmGoalLines = settings
				.getArray(STORE_NPM_GOAL);
		if (npmGoalLines == null) {
			npmGoalLines = new String[0];
		}

		npmGoalLines = addToHistory(npmGoalLines, getGoalValue());
		settings.put(STORE_NPM_GOAL, npmGoalLines);

		// store checkbox - compress
		settings.put(STORE_RUN_NPM_TOOL, runNpmCheckbox.getSelection());
	}

}
 
开发者ID:eclipse,项目名称:n4js,代码行数:21,代码来源:NpmToolRunnerPage.java

示例6: restoreWidgetValues

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
@Override
protected void restoreWidgetValues() {
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		String[] npmGoalLines = settings
				.getArray(STORE_NPM_GOAL);
		if (npmGoalLines == null || npmGoalLines.length == 0) {
			// ie.- no settings stored
		} else {

			// destination
			setGoalValue(npmGoalLines[0]);
			for (int i = 0; i < npmGoalLines.length; i++) {
				addGoalItem(npmGoalLines[i]);
			}
		}
		runNpmCheckbox.setSelection(settings.getBoolean(STORE_RUN_NPM_TOOL));
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:NpmToolRunnerPage.java

示例7: SimpleN4MFNewProjectWizard

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
/**
 * Creates a new wizard container for creating and initializing a new N4JS project into the workspace.
 *
 * @param projectCreator
 *            the project creation logic to be triggered when finishing this wizard.
 */
@Inject
public SimpleN4MFNewProjectWizard(final IProjectCreator projectCreator) {
	super(projectCreator);
	setWindowTitle("New N4JS Project");
	setNeedsProgressMonitor(true);
	setDefaultPageImageDescriptor(NEW_PROJECT_WIZBAN_DESC);
	projectInfo = new N4MFProjectInfo();

	// Setup the dialog settings
	IDialogSettings workbenchDialogSettings = N4MFActivator.getInstance().getDialogSettings();

	IDialogSettings projectWizardSettings = workbenchDialogSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
	if (null == projectWizardSettings) {
		projectWizardSettings = workbenchDialogSettings.addNewSection(DIALOG_SETTINGS_SECTION_KEY);
	}
	setDialogSettings(projectWizardSettings);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:24,代码来源:SimpleN4MFNewProjectWizard.java

示例8: getInitialSize

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
@Override
protected Point getInitialSize() {
	IDialogSettings dialogSettings = getDialogSettings();
	if (dialogSettings == null) {
		/* no dialog settings available, so fall back to min settings */
		return new Point(minWidth, minHeight);
	}
	Point point = super.getInitialSize();
	if (point.x < minWidth) {
		point.x = minWidth;
	}
	if (point.y < minHeight) {
		point.y = minHeight;
	}
	return point;
}
 
开发者ID:de-jcup,项目名称:eclipse-batch-editor,代码行数:17,代码来源:AbstractFilterableTreeQuickDialog.java

示例9: initializeWidgetState

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
/**
 * Initialize any state related to the widgetry that should be set up each
 * time widgets are created.
 */
private void initializeWidgetState() {
	menuManager = null;
	dialogArea = null;
	titleLabel = null;
	titleSeparator = null;
	infoSeparator = null;
	infoLabel = null;
	toolBar = null;

	// If the menu item for persisting bounds is displayed, use the stored
	// value to determine whether any persisted bounds should be honored at
	// all.
	if (showDialogMenu && showPersistActions) {
		IDialogSettings settings = getDialogSettings();
		if (settings != null) {
			String key = getClass().getName() + DIALOG_USE_PERSISTED_SIZE;
			if (settings.get(key) != null || !isUsing34API)
				persistSize = settings.getBoolean(key);
			key = getClass().getName() + DIALOG_USE_PERSISTED_LOCATION;
			if (settings.get(key) != null || !isUsing34API)
				persistLocation = settings.getBoolean(key);
		}
	}
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:29,代码来源:PopupDialog.java

示例10: migrateBoundsSetting

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
private void migrateBoundsSetting() {
	IDialogSettings settings = getDialogSettings();
	if (settings == null)
		return;

	final String className = getClass().getName();

	String key = className + DIALOG_USE_PERSISTED_BOUNDS;
	String value = settings.get(key);
	if (value == null || DIALOG_VALUE_MIGRATED_TO_34.equals(value))
		return;

	boolean storeBounds = settings.getBoolean(key);
	settings.put(className + DIALOG_USE_PERSISTED_LOCATION, storeBounds);
	settings.put(className + DIALOG_USE_PERSISTED_SIZE, storeBounds);
	settings.put(key, DIALOG_VALUE_MIGRATED_TO_34);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:18,代码来源:PopupDialog.java

示例11: persistLocation

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
private void persistLocation() {
	if (shell==null || shell.isDisposed()){
		return;
	}
	IDialogSettings settings = getDialogSettings();
	if (settings != null) {
		Point shellLocation = shell.getLocation();
		Shell parent = getParent();
		if (parent != null) {
			Point parentLocation = parent.getLocation();
			shellLocation.x -= parentLocation.x;
			shellLocation.y -= parentLocation.y;
		}
		String prefix = getClass().getName();
		settings.put(prefix + DIALOG_ORIGIN_X, shellLocation.x);
		settings.put(prefix + DIALOG_ORIGIN_Y, shellLocation.y);
	}
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:19,代码来源:SelectConfigurationDialog.java

示例12: getPersistedLocation

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
private Point getPersistedLocation() {
	if (shell==null || shell.isDisposed()){
		return null;
	}
	Point result = null;
	IDialogSettings dialogSettings = getDialogSettings();
	if (dialogSettings == null) {
		return null;
	}
	try {
		int x = dialogSettings.getInt(getClass().getName() + DIALOG_ORIGIN_X);
		int y = dialogSettings.getInt(getClass().getName() + DIALOG_ORIGIN_Y);
		result = new Point(x, y);
		// The coordinates were stored relative to the parent shell.
		// Convert to display coordinates.
		Shell parentShell = getParent();
		if (parentShell != null) {
			Point parentLocation = parentShell.getLocation();
			result.x += parentLocation.x;
			result.y += parentLocation.y;
		}
	} catch (NumberFormatException e) {
	}
	return result;
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:26,代码来源:SelectConfigurationDialog.java

示例13: LinkDialog

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
public LinkDialog(
    final Shell parentShell,
    final WorkItem workItem,
    final LinkUIRegistry linkUiRegistry,
    final WIFormLinksControlOptions linksControlOptions) {
    super(parentShell);
    this.workItem = workItem;
    this.linkCollection = workItem.getLinks();
    this.linkUiRegistry = linkUiRegistry;
    this.linksControlOptions = linksControlOptions;

    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    final IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings != null) {
        initialLinkTypeName = dialogSettings.get(DIALOG_SETTINGS_LINK_TYPE_KEY);
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:18,代码来源:LinkDialog.java

示例14: NewLinkedWorkItemDialog

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
public NewLinkedWorkItemDialog(
    final Shell shell,
    final WorkItem hostWorkItem,
    final WIFormLinksControlOptions linksControlOptions) {
    super(shell);
    this.hostWorkItem = hostWorkItem;
    client = hostWorkItem.getClient();
    this.linksControlOptions = linksControlOptions;
    witVersionSupportsWILinks = client.supportsWorkItemLinkTypes();

    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    final IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings != null) {
        initialLinkTypeName = dialogSettings.get(DIALOG_SETTINGS_LINK_TYPE_KEY);
        initialWorkItemTypeName = dialogSettings.get(DIALOG_SETTINGS_WORKITEM_TYPE_KEY);
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:18,代码来源:NewLinkedWorkItemDialog.java

示例15: okPressed

import org.eclipse.jface.dialogs.IDialogSettings; //导入依赖的package包/类
@Override
protected void okPressed() {
    selectedTitle = textWorkItemTitle.getText();
    selectedComment = textWorkItemComment.getText();

    // Save the selected link-type in user setting so the next launch of the
    // dialog will
    // initially select the last used link-type.
    final IDialogSettings uiSettings = TFSCommonUIClientPlugin.getDefault().getDialogSettings();
    IDialogSettings dialogSettings = uiSettings.getSection(DIALOG_SETTINGS_SECTION_KEY);
    if (dialogSettings == null) {
        dialogSettings = uiSettings.addNewSection(DIALOG_SETTINGS_SECTION_KEY);
    }
    dialogSettings.put(DIALOG_SETTINGS_LINK_TYPE_KEY, linkTypeDisplayNames[selectedLinkTypeIndex]);
    dialogSettings.put(DIALOG_SETTINGS_WORKITEM_TYPE_KEY, workItemTypeDisplayNames[selectedWorkItemTypeIndex]);

    super.okPressed();
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:19,代码来源:NewLinkedWorkItemDialog.java


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