Java Code Examples for docking.widgets.OptionDialog#PLAIN_MESSAGE

The following examples show how to use docking.widgets.OptionDialog#PLAIN_MESSAGE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProgramDiffPlugin.java    From ghidra with Apache License 2.0 6 votes vote down vote up
private void displayStatus(JComponent parent, String title, String message, int dialogType) {

		Component parentComponent = parent;
		if (parentComponent == null) {
			parentComponent = tool.getToolFrame();
		}

		switch (dialogType) {
			case OptionDialog.PLAIN_MESSAGE:
				Msg.showInfo(getClass(), parent, title, message);
				break;
			case OptionDialog.INFORMATION_MESSAGE:
				Msg.showInfo(getClass(), parent, title, message);
				break;
			case OptionDialog.WARNING_MESSAGE:
				Msg.showWarn(getClass(), parent, title, message);
				break;
			case OptionDialog.ERROR_MESSAGE:
				Msg.showError(getClass(), parent, title, message);
				break;
		}
	}
 
Example 2
Source File: DockingErrorDisplay.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void displayMessage(MessageType messageType, ErrorLogger errorLogger, Object originator,
		Component parent, String title, Object message, Throwable throwable) {
	int dialogType = OptionDialog.PLAIN_MESSAGE;

	String messageString = message != null ? message.toString() : null;
	String rawMessage = HTMLUtilities.fromHTML(messageString);
	switch (messageType) {
		case INFO:
			dialogType = OptionDialog.INFORMATION_MESSAGE;
			consoleDisplay.displayInfoMessage(errorLogger, originator, parent, title,
				rawMessage);
			break;
		case WARNING:
		case ALERT:
			dialogType = OptionDialog.WARNING_MESSAGE;
			consoleDisplay.displayWarningMessage(errorLogger, originator, parent, title,
				rawMessage, throwable);
			break;
		case ERROR:
			consoleDisplay.displayErrorMessage(errorLogger, originator, parent, title,
				rawMessage, throwable);
			dialogType = OptionDialog.ERROR_MESSAGE;
			break;
	}

	showDialog(title, message, throwable, dialogType, messageString, getWindow(parent));
}