Package org.apache.pivot.wtk
Class Form.Flag
- java.lang.Object
 - 
- org.apache.pivot.wtk.Form.Flag
 
 
- 
- Enclosing class:
 - Form
 
public static class Form.Flag extends java.lang.ObjectRepresents an message alert associated with a form field. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMESSAGE_KEYstatic java.lang.StringMESSAGE_TYPE_KEY 
- 
Constructor Summary
Constructors Constructor Description Flag()Creates a new flag with a type of "error" and no message.Flag(MessageType messageType)Creates a new flag with the given message type and no message.Flag(MessageType messageType, java.lang.String message)Creates a new flag with the given type and message. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Form.Flagdecode(java.lang.String flag)java.lang.StringgetMessage()Returns the flag message.MessageTypegetMessageType()Returns the flag's message type.voidsetMessage(java.lang.String message)Sets the flag message.voidsetMessageType(MessageType messageType)Sets the flag's message type. 
 - 
 
- 
- 
Field Detail
- 
MESSAGE_TYPE_KEY
public static final java.lang.String MESSAGE_TYPE_KEY
- See Also:
 - Constant Field Values
 
 
- 
MESSAGE_KEY
public static final java.lang.String MESSAGE_KEY
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
Flag
public Flag()
Creates a new flag with a type of "error" and no message. 
- 
Flag
public Flag(MessageType messageType)
Creates a new flag with the given message type and no message.- Parameters:
 messageType- The type of the flag.
 
- 
Flag
public Flag(MessageType messageType, java.lang.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, ornullfor 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- The new message type for this flag.- Throws:
 java.lang.IllegalArgumentException- if the message type isnull.
 
- 
getMessage
public java.lang.String getMessage()
Returns the flag message.- Returns:
 - The message text associated with the flag, or 
nullif there is no message. 
 
- 
setMessage
public void setMessage(java.lang.String message)
Sets the flag message.- Parameters:
 message- The message text associated with the flag, ornullif there is no message.
 
- 
decode
public static Form.Flag decode(java.lang.String flag)
 
 - 
 
 -