sk.uniba.euromath.editor.widgets
Enum MessageLevelEnum

java.lang.Object
  extended by java.lang.Enum<MessageLevelEnum>
      extended by sk.uniba.euromath.editor.widgets.MessageLevelEnum
All Implemented Interfaces:
Serializable, Comparable<MessageLevelEnum>

public enum MessageLevelEnum
extends Enum<MessageLevelEnum>

Contains three kinds of messages: error message, warning and info.

Author:
Martin Vysny

Enum Constant Summary
ERROR
          Error message.
INFO
          Info message.
WARNING
          Warning message.
 
Method Summary
 ValidityMessages newMessage(String message)
          Produces validity messages instance, with given message.
 ValidityMessages setMessage(ValidityMessages messages, String message)
          Produces validity messages instance, with given message.
protected abstract  void setMessageInternal(ValidityMessages messages, String message)
          Produces validity messages instance, with given message.
static MessageLevelEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MessageLevelEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ERROR

public static final MessageLevelEnum ERROR
Error message.


WARNING

public static final MessageLevelEnum WARNING
Warning message.


INFO

public static final MessageLevelEnum INFO
Info message.

Method Detail

values

public static final MessageLevelEnum[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(MessageLevelEnum c : MessageLevelEnum.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static MessageLevelEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

setMessageInternal

protected abstract void setMessageInternal(ValidityMessages messages,
                                           String message)
Produces validity messages instance, with given message. Message must not change when it already is non-null in given messages object.

Parameters:
message - set this message
messages - set the message to this object.

setMessage

public final ValidityMessages setMessage(ValidityMessages messages,
                                         String message)
Produces validity messages instance, with given message. Message does not change when it already is non-null in given messages object.

Parameters:
message - set this message
messages - set the message to this object. If null then new instance of validity messages object shall be created.
Returns:
messages, or new instance of messages object if messages was null.

newMessage

public final ValidityMessages newMessage(String message)
Produces validity messages instance, with given message.

Parameters:
message - message to set
Returns:
new instance of messages object


Copyright © 2003-2006 null. All Rights Reserved.