01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: /*
09: * Created on 30.03.2005
10: */
11: package de.uka.ilkd.key.gui.notification.events;
12:
13: import de.uka.ilkd.key.gui.notification.NotificationEventID;
14:
15: /**
16: * If the system wants to inform the user it may emit this event. If the
17: * flavour of the information is that of an error message, one should use the
18: * {@link de.uka.ilkd.key.gui.notification.events.GeneralFailureEvent}
19: * instead.
20: */
21: public class GeneralInformationEvent extends NotificationEvent {
22:
23: /** the message with the information to be displayed */
24: private final String informationMessage;
25:
26: /** the context/ category of this message (e.g. used as window title) */
27: private final String context;
28:
29: /**
30: * Creates an event informing the user about the fact given as string
31: * @param context the String describing the context/category of the
32: * information (e.g. used as window title, head line etc.)
33: * @param informationMessage the String containing the information
34: */
35: public GeneralInformationEvent(String context,
36: String informationMessage) {
37: super (NotificationEventID.GENERAL_INFORMATION);
38: this .context = context;
39: this .informationMessage = informationMessage;
40: }
41:
42: /**
43: * Creates an event informing the user about the fact given as string
44: * @param informationMessage the String containing the information
45: */
46: public GeneralInformationEvent(String informationMessage) {
47: this ("Information", informationMessage);
48: }
49:
50: /**
51: * returns the context as string
52: */
53: public String getContext() {
54: return context;
55: }
56:
57: /**
58: * returns the information as string
59: */
60: public String getMessage() {
61: return informationMessage;
62: }
63:
64: }
|