All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ioc.commons.flowcontrol.messageboxfactory.MessageBoxFactory Maven / Gradle / Ivy

Go to download

Library which contains some extension classes for the library IOC-Commons. It provides some interface definitions and some tool classes which are non-dependent from the used technology; i.e. the classes and interfaces from this library do not depend on the choosen ioc-commons-implementation library.

There is a newer version: 1.2.1
Show newest version
package org.ioc.commons.flowcontrol.messageboxfactory;

/**
 * An useful definition for implementing a message box factory.
 * 
 * @author Jesús Lunar Pérez
 * 
 */
public interface MessageBoxFactory {
	public interface ConfirmResponse {
		/**
		 * @param userResponse
		 *            true if user clicked YES; false if user clicked NO.
		 */
		void onUserResponse(boolean userResponse);
	}

	public interface PromptResponse {
		/**
		 * @param userResponse
		 *            true if user clicked ACCEPT; false if user clicked CANCEL.
		 * @param response
		 *            Text entered by user if user pressed ACCEPT. In case user
		 *            pressed CANCEL (userResponse==false), the value is
		 *            indetermined.
		 */
		void onUserResponse(boolean userResponse, String response);
	}

	void info(String caption, String message, Object... messageParams);

	void alert(String caption, String message, Object... messageParams);

	void error(String caption, String message, Object... messageParams);

	void confirm(String caption, String message, ConfirmResponse confirmResponse, Object... messageParams);

	void prompt(String caption, String message, String initialValue, PromptResponse promptResponse,
			Object... messageParams);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy