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.log4j.Level;
public enum MessageType {
DEBUG(JOptionPane.INFORMATION_MESSAGE, -1, "Debug", Level.DEBUG),
INFO(JOptionPane.INFORMATION_MESSAGE, -1, "Hinweis", Level.INFO),
WARNING(JOptionPane.WARNING_MESSAGE, -1, "Warnung", Level.WARN),
WARNING_RETRY(JOptionPane.WARNING_MESSAGE, JOptionPane.OK_CANCEL_OPTION, "Fehler", Level.ERROR),
ERROR(JOptionPane.ERROR_MESSAGE, -1, "Fehler", Level.ERROR),
ERROR_RETRY(JOptionPane.ERROR_MESSAGE, JOptionPane.OK_CANCEL_OPTION, "Fehler", Level.ERROR),
QUESTION_YESNO(JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, "Frage", 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;
}
}
|