+ /**
+ * Return the associated message if any.
+ *
+ * @return the associated message or NULL
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Set a message to display to the user. This message will be get after
+ * {@link KeyAction#getObject()} has been called.
+ *
+ * @param message
+ * the message
+ * @param error
+ * TRUE for an error message, FALSE for information
+ */
+ public void setMessage(String message, boolean error) {
+ this.message = message;
+ this.error = error;
+ }
+
+ /**
+ * Check if the included message ({@link KeyAction#getMessage()}) is an
+ * error message or an information message.
+ *
+ * @return TRUE for error, FALSE for information
+ */
+ public boolean isError() {
+ return error;
+ }
+
+ /**
+ * Check if the given {@link KeyStroke} should trigger this action.
+ *
+ * @param mkey
+ * the {@link KeyStroke} to check against
+ *
+ * @return TRUE if it should
+ */