org.apache.beehive.netui.util.tags
Class GroupOption

Object
  extended by GroupOption
All Implemented Interfaces:
Serializable

public class GroupOption
extends Object
implements Serializable

GroupOption is a simple JavaBean that can be used to fully specify the name, value, alt text and accesskey of either a CheckBoxGroup or a RadioButtonGroup. The name will appear in the HTML after the checkbox or radio button. The name attribute is required for outpu by the tags. The value can either be set separately or will default to the name. Optionally and alt text attribute and accesskey value can be provided.

See Also:
Serialized Form

Constructor Summary
GroupOption()
          Default Constructor.
GroupOption(String name)
          Construct a GroupOption setting the name.
GroupOption(String name, String value)
          Construct a GroupOption setting the name and value.
GroupOption(String name, String value, String alt, char accessKey)
          Construct a GroupOption setting all the values.
 
Method Summary
 char getAccessKey()
          Get the accesskey of the option.
 String getAlt()
          Get the alt text of the option.
 String getName()
          Get the name of the option.
 String getValue()
          Get the value of the option.
 void setAccessKey(char accessKey)
          Set the alt text of the option.
 void setAlt(String alt)
          Set the alt text of the option.
 void setName(String name)
          Set the name of the option which will appear next to the option.
 void setValue(String value)
          Set the value of the option.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupOption

public GroupOption()
Default Constructor.


GroupOption

public GroupOption(String name)
Construct a GroupOption setting the name.


GroupOption

public GroupOption(String name,
                   String value)
Construct a GroupOption setting the name and value.


GroupOption

public GroupOption(String name,
                   String value,
                   String alt,
                   char accessKey)
Construct a GroupOption setting all the values.

Method Detail

setName

public void setName(String name)
Set the name of the option which will appear next to the option.

Parameters:
name - The name of the created option.

getName

public String getName()
Get the name of the option.

Returns:
The name of the option that was set.

setValue

public void setValue(String value)
Set the value of the option. Thie value will be written out as the value attribute.

Parameters:
value - The name of the created option.

getValue

public String getValue()
Get the value of the option. If no value has been set this method will return value assigned to the name property.

Returns:
The value of the option.

setAlt

public void setAlt(String alt)
Set the alt text of the option.

Parameters:
alt - The text that will be set for the alt attribute.

getAlt

public String getAlt()
Get the alt text of the option.

Returns:
The alt text of the option.

setAccessKey

public void setAccessKey(char accessKey)
Set the alt text of the option.

Parameters:
accessKey - The value that will be set for the accesskey attribute.

getAccessKey

public char getAccessKey()
Get the accesskey of the option.

Returns:
The accessKey of the option.