org.apache.pivot.wtk
Class Form.Flag

java.lang.Object
  extended by org.apache.pivot.wtk.Form.Flag
Enclosing class:
Form

public static class Form.Flag
extends Object

Represents an message alert associated with a form field.


Field Summary
static String MESSAGE_KEY
           
static String MESSAGE_TYPE_KEY
           
 
Constructor Summary
Form.Flag()
          Creates a new flag with a type of "error" and no message.
Form.Flag(MessageType messageType)
          Creates a new flag with the given message type and no message.
Form.Flag(MessageType messageType, String message)
          Creates a new flag with the given type and message.
 
Method Summary
static Form.Flag decode(String flag)
           
 String getMessage()
          Returns the flag message.
 MessageType getMessageType()
          Returns the flag's message type.
 void setMessage(String message)
          Sets the flag message.
 void setMessageType(MessageType messageType)
          Sets the flag's message type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_TYPE_KEY

public static final String MESSAGE_TYPE_KEY
See Also:
Constant Field Values

MESSAGE_KEY

public static final String MESSAGE_KEY
See Also:
Constant Field Values
Constructor Detail

Form.Flag

public Form.Flag()
Creates a new flag with a type of "error" and no message.


Form.Flag

public Form.Flag(MessageType messageType)
Creates a new flag with the given message type and no message.

Parameters:
messageType - The type of the flag.

Form.Flag

public Form.Flag(MessageType messageType,
                 String message)
Creates a new flag with the given type and message.

Parameters:
messageType - The type of the flag.
message - The message text associated with the flag, or null for no message.
Method Detail

getMessageType

public MessageType getMessageType()
Returns the flag's message type.

Returns:
The message type of the flag.

setMessageType

public void setMessageType(MessageType messageType)
Sets the flag's message type.

Parameters:
messageType -

getMessage

public String getMessage()
Returns the flag message.

Returns:
The message text associated with the flag, or null if there is no message.

setMessage

public void setMessage(String message)
Sets the flag message.

Parameters:
message - The message text associated with the flag, or null if there is no message.

decode

public static Form.Flag decode(String flag)