package de.dhbw.humbuch.event;

/**
 * Object for the Guava EventBus containing a message and a message type
 * 
 */
public class MessageEvent {

	public final String caption;
	public final String message;
	public final Type type;

	public enum Type {
		INFO, TRAYINFO, WARNING, ERROR;
	}

	/**
	 * Creates an event with the specified message and {@link Type}.INFO as
	 * standard type
	 * 
	 * @param message
	 *            {@link String} containing the message
	 */
	public MessageEvent(String message) {
		this("", message, Type.INFO);
	}

	/**
	 * Creates an event with the specified caption, message and {@link Type}.INFO as
	 * standard type
	 * 
	 * @param caption
	 * 			  {@link String} containing the caption
	 * @param message
	 *            {@link String} containing the message
	 */
	public MessageEvent(String caption, String message) {
		this(caption, message, Type.INFO);
	}
	
	/**
	 * Creates an event with the specified caption, empty message and type
	 * 
	 * @param caption
	 * 			  {@link String} containing the caption
	 * @param message
	 *            {@link String} containing the message
	 */
	public MessageEvent(String caption, Type type) {
		this(caption, "", type);
	}
	
	/**
	 * Creates an event with the specified caption, message and type
	 * 
	 * @param caption
	 * 			  {@link String} containing the caption
	 * @param message
	 *            {@link String} containing the message
	 * @param type
	 *            {@link Type} defining the message type
	 */
	public MessageEvent(String caption, String message, Type type) {
		this.caption = caption;
		this.message = message;
		this.type = type;
	}
}

@@ -328,23 +328,23 @@
 ecified 
-message
+caption
  and %7B@l
@@ -485,31 +485,31 @@
 vent(String 
-message
+caption
 ) %7B%0A%09%09this(%22
@@ -511,19 +511,19 @@
 his(
-%22%22, message
+caption, %22%22
 , Ty

Set caption of notification by default, not the notification message.