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