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);
}
}
Aggregations