當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。