summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/MessageType.java
blob: 58037430a018fcb6e63f971ceb2638f545a16a87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.openslx.dozmod.gui.helper;

import javax.swing.JOptionPane;

import org.apache.logging.log4j.Level;

public enum MessageType {
	DEBUG(JOptionPane.INFORMATION_MESSAGE, -1, I18n.HELPER.getString("MessageType.debug"), Level.DEBUG),
	INFO(JOptionPane.INFORMATION_MESSAGE, -1, I18n.HELPER.getString("MessageType.info"), Level.INFO),
	WARNING(JOptionPane.WARNING_MESSAGE, -1, I18n.HELPER.getString("MessageType.warning"), Level.WARN),
	WARNING_RETRY(JOptionPane.WARNING_MESSAGE, JOptionPane.OK_CANCEL_OPTION, I18n.HELPER.getString("MessageType.warningRetry"), Level.ERROR),
	ERROR(JOptionPane.ERROR_MESSAGE, -1, I18n.HELPER.getString("MessageType.error"), Level.ERROR),
	ERROR_RETRY(JOptionPane.ERROR_MESSAGE, JOptionPane.OK_CANCEL_OPTION, I18n.HELPER.getString("MessageType.errorRetry"), Level.ERROR),
	QUESTION_YESNO(JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, I18n.HELPER.getString("MessageType.questionYesNo"), Level.INFO);

	public final String title;
	public final int optionPaneId;
	public final Level logPriority;
	public final int buttons;

	private MessageType(int paneId, int buttons, String title, Level prio) {
		this.optionPaneId = paneId;
		this.buttons = buttons;
		this.title = title;
		this.logPriority = prio;
	}
}