Search in sources :

Example 1 with MessageType

use of pcgen.core.utils.MessageType in project pcgen by PCGen.

the class ShowMessageGuiObserver method showMessageDialog.

public void showMessageDialog(MessageWrapper messageWrapper) {
    MessageType mt = messageWrapper.getMessageType();
    String title = messageWrapper.getTitle();
    if (title == null) {
        title = Constants.APPLICATION_NAME;
    }
    String message = String.valueOf(messageWrapper.getMessage());
    if (mt.equals(MessageType.WARNING)) {
        uiDelegate.showWarningMessage(title, message);
    } else if (mt.equals(MessageType.ERROR)) {
        uiDelegate.showErrorMessage(title, message);
    } else {
        uiDelegate.showInfoMessage(title, message);
    }
}
Also used : MessageType(pcgen.core.utils.MessageType)

Aggregations

MessageType (pcgen.core.utils.MessageType)1