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


Java UserPrompter类代码示例

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


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

示例1: createUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createUserPrompter(String question,
		UserPromptType responseType, UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		String... buttonNames) {
    if (UserPromptType.TEXT.equals(responseType) && optionType.equals(UserPromptOptions.OK_CANCEL)) {
        return new TextUserPrompter(owner, question, defaultResponseType, defaultResponse, buttonNames[0], buttonNames[1]);
    } else {
        return new DialogUserPrompter(optionType, defaultResponseType, owner, question, buttonNames);
    }
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:11,代码来源:SwingUIUserPrompterFactory.java

示例2: createDatabaseUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createDatabaseUserPrompter(String question,
		List<Class<? extends SPDataSource>> dsTypes,
		UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		DataSourceCollection<SPDataSource> dsCollection,
		String... buttonNames) {
	return new DataSourceUserPrompter(question, optionType, defaultResponseType, (SPDataSource) defaultResponse, 
			owner, question, dsCollection, dsTypes, buttonNames);
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:10,代码来源:SwingUIUserPrompterFactory.java

示例3: createDatabaseUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createDatabaseUserPrompter(String question,
		List<Class<? extends SPDataSource>> dsTypes,
		UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		DataSourceCollection<SPDataSource> dsCollection,
		String... buttonNames) {
	return upfMissingLoadedDB.createDatabaseUserPrompter(question, dsTypes, optionType, defaultResponseType,
			defaultResponse, dsCollection, buttonNames);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:10,代码来源:WabitSwingSessionImpl.java

示例4: createDatabaseUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createDatabaseUserPrompter(String question,
		List<Class<? extends SPDataSource>> dsTypes,
		UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		DataSourceCollection<SPDataSource> dsCollection,
		String... buttonNames) {
	return upf.createDatabaseUserPrompter(question, dsTypes, optionType, defaultResponseType,
			defaultResponse, dsCollection, buttonNames);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:10,代码来源:WabitSwingSessionContextImpl.java

示例5: createUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createUserPrompter(String question,
		UserPromptType responseType, UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		String... buttonNames) {
	return upf.createUserPrompter(question, responseType, optionType, defaultResponseType,
			defaultResponse, buttonNames);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:8,代码来源:WabitSwingSessionContextImpl.java

示例6: createUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
/**
 * Returns a user prompter that always gives the default response, since
 * this is a headless session context and there is no user to ask.
 */
public UserPrompter createUserPrompter(String question,
        UserPromptType responseType, UserPromptOptions optionType,
        UserPromptResponse defaultResponseType, Object defaultResponse,
        String... buttonNames) {
    return new DefaultUserPrompter(optionType, defaultResponseType, defaultResponse);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:11,代码来源:WabitSessionContextImpl.java

示例7: createDatabaseUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createDatabaseUserPrompter(String question,
        List<Class<? extends SPDataSource>> dsTypes,
        UserPromptOptions optionType,
        UserPromptResponse defaultResponseType, Object defaultResponse,
        DataSourceCollection<SPDataSource> dsCollection,
        String... buttonNames) {
    return new DefaultUserPrompter(optionType, defaultResponseType, defaultResponse);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:9,代码来源:WabitSessionContextImpl.java

示例8: createUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createUserPrompter(String question,
		UserPromptType responseType, UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		String... buttonNames) {
	DefaultUserPrompterFactory dupf = new DefaultUserPrompterFactory();
	return dupf.createUserPrompter(question, responseType, optionType, defaultResponseType, defaultResponse, buttonNames);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:8,代码来源:WabitSessionImpl.java

示例9: createDatabaseUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createDatabaseUserPrompter(String question,
		List<Class<? extends SPDataSource>> dsTypes,
		UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		DataSourceCollection<SPDataSource> dsCollection,
		String... buttonNames) {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:10,代码来源:StubWabitSwingSession.java

示例10: createUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
@Override
public UserPrompter createUserPrompter(String question,
        UserPromptType responseType, UserPromptOptions optionType,
        UserPromptResponse defaultResponseType, Object defaultResponse,
        String... buttonNames) {
    timesUserWasPrompted++;
    return new DefaultUserPrompterFactory().createUserPrompter(question, responseType, 
            optionType, defaultResponseType, defaultResponse, buttonNames);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:10,代码来源:WorkspaceSAXHandlerTest.java

示例11: setUp

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public void setUp() {
	
	final PlDotIni defaultPlIni = new PlDotIni();
	
	try {
	
		defaultPlIni.read(new File("ca/sqlpower/sql/default_database_types.ini"));
		
		defaultPlIni.read(new File("ca/sqlpower/demodata/example_database.ini"));
	
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

	WabitSessionContext context = new StubWabitSessionContext() {
		@Override
		public UserPrompter createUserPrompter(String question,
				UserPromptType responseType, UserPromptOptions optionType,
				UserPromptResponse defaultResponseType,
				Object defaultResponse, String... buttonNames) {
			fail("Loading the example workspace should not prompt the user, it should just work."
					+ " Prompt was: " + question);
			throw new IllegalStateException();
		}

		@Override
		public DataSourceCollection<SPDataSource> getDataSources() {
			return defaultPlIni;
		}
	};

	session = new StubWabitSession(context);
       wsp = new WabitSessionPersister("testing persister", session, true);

}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:37,代码来源:WabitSessionPersisterTest.java

示例12: createUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createUserPrompter(String question,
		UserPromptType responseType, UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		String... buttonNames) {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:8,代码来源:StubWabitSession.java

示例13: createDatabaseUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createDatabaseUserPrompter(String question,
		List<Class<? extends SPDataSource>> dsTypes,
		UserPromptOptions optionType,
		UserPromptResponse defaultResponseType, Object defaultResponse,
		DataSourceCollection<SPDataSource> dsCollection,
		String... buttonNames) {
	return null;
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:9,代码来源:StubWabitSessionContext.java

示例14: createListUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public <T> UserPrompter createListUserPrompter(String question,
		List<T> responses, T defaultResponse) {
	return new ModalDialogListUserPrompter<T>(owner, question, responses, defaultResponse);
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:5,代码来源:SwingUIUserPrompterFactory.java

示例15: createUserPrompter

import ca.sqlpower.util.UserPrompter; //导入依赖的package包/类
public UserPrompter createUserPrompter(String question, UserPromptType responseType, UserPromptOptions optionType, UserPromptResponse defaultResponseType, Object defaultResponse, String ...buttonNames) {
	return upfMissingLoadedDB.createUserPrompter(question, responseType, optionType, defaultResponseType, defaultResponse, buttonNames);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:4,代码来源:WabitSwingSessionImpl.java


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