org.ioc.commons.flowcontrol.messageboxfactory.MessageBoxFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ioc-commons-ext Show documentation
Show all versions of ioc-commons-ext Show documentation
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.
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);
}