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


Java DialogSettings类代码示例

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


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

示例1: ImportWizard

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public ImportWizard() {
	setWindowTitle(App.messages.getString("app.window.title"));
	setNeedsProgressMonitor(true);
	setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(App.class, "images/i2b2Import2.png"));

	DialogSettings dialogSettings = new DialogSettings("userInfo");
	try {
		// loads existing settings if any. 
		dialogSettings.load(DIALOG_SETTING_FILE);
	} catch (IOException e) {
           System.out.println("INFO: Unable to locate user settings file.  Default values will be used.");
		//e.printStackTrace();
	}    

	setDialogSettings(dialogSettings);



}
 
开发者ID:stephenlorenz,项目名称:o2i2b2,代码行数:20,代码来源:ImportWizard.java

示例2: MasterSelectionDialog

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public MasterSelectionDialog ( final Shell parentShell, final World world )
{
    super ( parentShell );
    this.world = world;
    setHelpAvailable ( false );

    this.dialogSettings = DialogSettings.getOrCreateSection ( Activator.getDefault ().getDialogSettings (), "MasterSelectionDialog" );
    this.lastSelection = loadLastSelection ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:10,代码来源:MasterSelectionDialog.java

示例3: setUp

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
@Before
public void setUp() {
  launchManager = mock( ILaunchManager.class );
  when( launchManager.getLaunchModes() ).thenReturn( new ILaunchMode[ 0 ] );
  DialogSettings dialogSettings = new DialogSettings( "section-name" );
  launchModeSetting = new LaunchModeSetting( launchManager, dialogSettings );
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:8,代码来源:LaunchModeDropDownActionTest.java

示例4: save

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public static void save(ColumnGroupSet columnGroups) {
    try {
        final IDialogSettings settings = new DialogSettings("column_group_list");
        settings.put("database", columnGroups.getDatabase());
        int index = 0;
        for (final ColumnGroup columnGroup : columnGroups) {
            final IDialogSettings columnGroupSection = new DialogSettings("column_group_" + index);
            index++;
            columnGroupSection.put("group_name", columnGroup.getGroupName());
            int columnIndex = 0;
            for (final NormalColumn normalColumn : columnGroup.getColumns()) {
                final IDialogSettings columnSection = new DialogSettings("column_" + columnIndex);
                columnIndex++;
                columnSection.put("physical_name", null2Blank(normalColumn.getPhysicalName()));
                columnSection.put("logical_name", null2Blank(normalColumn.getLogicalName()));
                columnSection.put("type", null2Blank(normalColumn.getType()));
                columnSection.put("length", null2Blank(normalColumn.getTypeData().getLength()));
                columnSection.put("decimal", null2Blank(normalColumn.getTypeData().getDecimal()));
                columnSection.put("array", normalColumn.getTypeData().isArray());
                columnSection.put("array_dimension", null2Blank(normalColumn.getTypeData().getArrayDimension()));
                columnSection.put("unsigned", normalColumn.getTypeData().isUnsigned());
                columnSection.put("not_null", normalColumn.isNotNull());
                columnSection.put("unique", normalColumn.isUniqueKey());
                columnSection.put("default_value", null2Blank(normalColumn.getDefaultValue()));
                columnSection.put("constraint", null2Blank(normalColumn.getConstraint()));
                columnSection.put("description", null2Blank(normalColumn.getDescription()));
                columnGroupSection.addSection(columnSection);
            }
            settings.addSection(columnGroupSection);
        }
        settings.save(getPath());
    } catch (final IOException e) {
        Activator.showExceptionDialog(e);
    }
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:36,代码来源:GlobalColumnGroupSet.java

示例5: doLoad

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
protected void doLoad(String s) {
  	StringReader r = new StringReader(s);
  	IDialogSettings settings = new DialogSettings(getPreferenceName());
  	try {
	settings.load(r);
} catch (IOException e) {
	trace.error(e.getMessage(), e);
}
  	
combo.removeAll();

int index = -1;
String selection = settings.get(P_SELECTED_SET);
String list[] = settings.getArray(P_SET_KEYS);
for (int i=0; list != null && i<list.length; i++) {
	String key = list[i];

	IDialogSettings section = settings.getSection(key);
	if (section != null) {
		PickListSet set = new PickListSet(section);
		setsByName.put(key, set);
		
		combo.add(key);
		if (CommonUtils.equals(selection, key)) {
			index = i;
		}
	}
}
combo.add(ITEM_NEW);

if (index != -1) {
	combo.select(index);
	lastSelection = index;
}
  }
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:36,代码来源:PickListSetEditor.java

示例6: doStore

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
@Override
protected void doStore() {
	try {
		int index = combo.getSelectionIndex();
		
		IDialogSettings settings = new DialogSettings(getPreferenceName());
		settings.put(P_SET_KEYS, combo.getItems());
		settings.put(P_SELECTED_SET, combo.getItem(index));
		for(int i=0; i<combo.getItemCount(); i++) {
			String key = combo.getItem(i);
			if (key.equals(ITEM_NEW)) {
				continue;
			}
			
			PickListSet set = setsByName.get(key);
			if (i == index) {
				set = new PickListSet(key, Arrays.asList(pickListEditor.getSelectedListControl().getItems()));
				setsByName.put(key, set);
			}
			settings.addSection(set.getSettings());
		}
		StringWriter w = new StringWriter();
		settings.save(w);
		getPreferenceStore().putValue(getPreferenceName(), w.toString());
	} catch(Exception e) {
		trace.error(e.getMessage(), e);
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:29,代码来源:PickListSetEditor.java

示例7: buildSettings

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public static IDialogSettings buildSettings(String settingsName, List<PickListSet> list) {
	IDialogSettings settings = new DialogSettings(settingsName);
	List<String> keys = new ArrayList<String>();
	for (PickListSet set : list) {
		settings.addSection(set.getSettings());
		keys.add(set.getName());
	}
	settings.put(P_SET_KEYS, keys.toArray(new String[0]));
	return settings;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:11,代码来源:PickListSetEditor.java

示例8: writeCriteria

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
private void writeCriteria() {
    final IDialogSettings s = DialogSettings.getOrCreateSection(Activator.getPlugin().getDialogSettings(), PAGE_NAME);
    final int historySize = Math.min(history.size(), HISTORY_SIZE);
    final IDialogSettings allCriteria = DialogSettings.getOrCreateSection(s, STORE_SEARCH_CRITERIA);
    for (int i = 0; i < historySize; i++) {
        final IDialogSettings searchCriteria = allCriteria.addNewSection(STORE_SEARCH_CRITERIA + "[" + i + "]");
        final Criteria criteria = history.get(i);
        searchCriteria.put(STORE_SEARCH_TERM, criteria.searchTerm);
        searchCriteria.put(STORE_MATCH_TYPES, criteria.matchType);
    }
}
 
开发者ID:GRA-UML,项目名称:tool,代码行数:12,代码来源:ReferenceLibrarySearchPage.java

示例9: getDialogBoundsSettings

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
@Override
protected IDialogSettings getDialogBoundsSettings ()
{
    return DialogSettings.getOrCreateSection ( Activator.getDefault ().getDialogSettings (), "EventDetailsDialog" );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:6,代码来源:EventDetailsDialog.java

示例10: getDialogBoundsSettings

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
@Override
protected IDialogSettings getDialogBoundsSettings ()
{
    return DialogSettings.getOrCreateSection ( this.dialogSettings, "bounds" );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:6,代码来源:MasterSelectionDialog.java

示例11: SetExternalNameWizard

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public SetExternalNameWizard ( final IStructuredSelection selection )
{
    this.selection = selection;
    setDialogSettings ( DialogSettings.getOrCreateSection ( Activator.getDefault ().getDialogSettings (), "setExternalNameWizard" ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:6,代码来源:SetExternalNameWizard.java

示例12: getDialogBoundsSettings

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
@Override
protected IDialogSettings getDialogBoundsSettings ()
{
    return DialogSettings.getOrCreateSection ( Activator.getDefault ().getDialogSettings (), "componentOutputDialog" ); //$NON-NLS-1$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:6,代码来源:ComponentOutputDialog.java

示例13: load

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public static GroupSet load() {
    final GroupSet columnGroups = new GroupSet();

    try {
        final IDialogSettings settings = new DialogSettings("column_group_list");
        String database = settings.get("database");
        if (database == null) {
            database = DBManagerFactory.getAllDBList().get(0);
        }
        columnGroups.setDatabase(database);

        final String path = getPath();
        final File columnGroupListFile = new File(path);

        if (columnGroupListFile.exists()) {
            settings.load(path);

            final UniqueWordDictionary dictionary = new UniqueWordDictionary();

            for (final IDialogSettings columnGroupSection : settings.getSections()) {
                final ColumnGroup columnGroup = new ColumnGroup();

                columnGroup.setGroupName(columnGroupSection.get("group_name"));

                for (final IDialogSettings columnSection : columnGroupSection.getSections()) {
                    final String physicalName = columnSection.get("physical_name");
                    final String logicalName = columnSection.get("logical_name");
                    final SqlType sqlType = SqlType.valueOfId(columnSection.get("type"));
                    final String defaultValue = columnSection.get("default_value");
                    final String description = columnSection.get("description");
                    final String constraint = columnSection.get("constraint");
                    final boolean notNull = Boolean.valueOf(columnSection.get("not_null")).booleanValue();
                    final boolean unique = Boolean.valueOf(columnSection.get("unique")).booleanValue();
                    final Integer length = toInteger(columnSection.get("length"));
                    final Integer decimal = toInteger(columnSection.get("decimal"));
                    final boolean array = Boolean.valueOf(columnSection.get("array")).booleanValue();
                    final Integer arrayDimension = toInteger(columnSection.get("array_dimension"));
                    final boolean unsigned = Boolean.valueOf(columnSection.get("unsigned")).booleanValue();
                    final boolean zerofill = Boolean.valueOf(columnSection.get("zerofill")).booleanValue();
                    final boolean binary = Boolean.valueOf(columnSection.get("binary")).booleanValue();
                    final String args = columnSection.get("args");
                    final boolean charSemantics = Boolean.valueOf(columnSection.get("char_semantics")).booleanValue();

                    final TypeData typeData = new TypeData(length, decimal, array, arrayDimension, unsigned, zerofill, binary, args, charSemantics);

                    Word word = new Word(physicalName, logicalName, sqlType, typeData, description, database);
                    word = dictionary.getUniqueWord(word, true);

                    final NormalColumn column = new NormalColumn(word, notNull, false, unique, false, defaultValue, constraint, null, null, null);

                    columnGroup.addColumn(column);
                }

                columnGroups.add(columnGroup);
            }
        }
    } catch (final IOException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }

    return columnGroups;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:63,代码来源:GlobalGroupSet.java

示例14: save

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public static void save(final GroupSet columnGroups) {
    try {
        final IDialogSettings settings = new DialogSettings("column_group_list");

        settings.put("database", columnGroups.getDatabase());

        int index = 0;

        for (final ColumnGroup columnGroup : columnGroups) {
            final IDialogSettings columnGroupSection = new DialogSettings("column_group_" + index);
            index++;

            columnGroupSection.put("group_name", columnGroup.getGroupName());

            int columnIndex = 0;

            for (final NormalColumn normalColumn : columnGroup.getColumns()) {
                final IDialogSettings columnSection = new DialogSettings("column_" + columnIndex);
                columnIndex++;

                columnSection.put("physical_name", null2Blank(normalColumn.getPhysicalName()));
                columnSection.put("logical_name", null2Blank(normalColumn.getLogicalName()));
                columnSection.put("type", null2Blank(normalColumn.getType()));
                columnSection.put("length", null2Blank(normalColumn.getTypeData().getLength()));
                columnSection.put("decimal", null2Blank(normalColumn.getTypeData().getDecimal()));
                columnSection.put("array", normalColumn.getTypeData().isArray());
                columnSection.put("array_dimension", null2Blank(normalColumn.getTypeData().getArrayDimension()));
                columnSection.put("unsigned", normalColumn.getTypeData().isUnsigned());
                columnSection.put("zerofill", normalColumn.getTypeData().isZerofill());
                columnSection.put("binary", normalColumn.getTypeData().isBinary());

                columnSection.put("not_null", normalColumn.isNotNull());
                columnSection.put("unique", normalColumn.isUniqueKey());
                columnSection.put("default_value", null2Blank(normalColumn.getDefaultValue()));
                columnSection.put("constraint", null2Blank(normalColumn.getConstraint()));
                columnSection.put("description", null2Blank(normalColumn.getDescription()));
                columnSection.put("char_semantics", normalColumn.getTypeData().isCharSemantics());

                columnGroupSection.addSection(columnSection);
            }

            settings.addSection(columnGroupSection);
        }

        settings.save(getPath());

    } catch (final IOException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:51,代码来源:GlobalGroupSet.java

示例15: save

import org.eclipse.jface.dialogs.DialogSettings; //导入依赖的package包/类
public static void save(GroupSet columnGroups) {
	try {
		IDialogSettings settings = new DialogSettings("column_group_list");

		settings.put("database", columnGroups.getDatabase());

		int index = 0;

		for (ColumnGroup columnGroup : columnGroups) {
			IDialogSettings columnGroupSection = new DialogSettings(
					"column_group_" + index);
			index++;

			columnGroupSection
					.put("group_name", columnGroup.getGroupName());

			int columnIndex = 0;

			for (NormalColumn normalColumn : columnGroup.getColumns()) {
				IDialogSettings columnSection = new DialogSettings(
						"column_" + columnIndex);
				columnIndex++;

				columnSection.put("physical_name",
						null2Blank(normalColumn.getPhysicalName()));
				columnSection.put("logical_name",
						null2Blank(normalColumn.getLogicalName()));
				columnSection.put("type",
						null2Blank(normalColumn.getType()));
				columnSection.put("length", null2Blank(normalColumn
						.getTypeData().getLength()));
				columnSection.put("decimal", null2Blank(normalColumn
						.getTypeData().getDecimal()));
				columnSection.put("array", normalColumn.getTypeData()
						.isArray());
				columnSection.put("array_dimension",
						null2Blank(normalColumn.getTypeData()
								.getArrayDimension()));
				columnSection.put("unsigned", normalColumn.getTypeData()
						.isUnsigned());
				columnSection.put("zerofill", normalColumn.getTypeData()
						.isZerofill());
				columnSection.put("binary", normalColumn.getTypeData()
						.isBinary());

				columnSection.put("not_null", normalColumn.isNotNull());
				columnSection.put("unique", normalColumn.isUniqueKey());
				columnSection.put("default_value",
						null2Blank(normalColumn.getDefaultValue()));
				columnSection.put("constraint",
						null2Blank(normalColumn.getConstraint()));
				columnSection.put("description",
						null2Blank(normalColumn.getDescription()));
				columnSection.put("char_semantics", normalColumn
						.getTypeData().isCharSemantics());

				columnGroupSection.addSection(columnSection);
			}

			settings.addSection(columnGroupSection);
		}

		settings.save(getPath());

	} catch (IOException e) {
		ERDiagramActivator.showExceptionDialog(e);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:69,代码来源:GlobalGroupSet.java


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