com.raj.htmlForms
Class HtmlGroups

java.lang.Object
  |
  +--com.raj.htmlForms.HtmlFormElement
        |
        +--com.raj.htmlForms.HtmlInput
              |
              +--com.raj.htmlForms.HtmlGroups
Direct Known Subclasses:
HtmlCheckBoxGroup, HtmlRadioGroup

public abstract class HtmlGroups
extends HtmlInput

This abstract class forms the superclass of all the HTML grouping facilities. Currently these consist of 'checkbox' and 'radio', both of which are accessed by the <input> tag.

The group will be populated by a data structure capable of mapping keys to entries. The keys in this data structure will be the value of the group element and the entry will be the displayed text. The name should come from the setName() method

This class (HtmlGroups.java) is part of the com.raj.htmlForms package that automatically generates HTML forms programmatically.

CREATED 22-FEB-2002, Copyright (c) Rajnish Bhaskar 2002

Author:
Rajnish Bhaskar

Field Summary
 
Fields inherited from class com.raj.htmlForms.HtmlFormElement
isXHTML, out
 
Constructor Summary
HtmlGroups()
           
 
Method Summary
 boolean getDisplayAsColumn()
          gets whether the check box group should be displayed as a row or as a column
 java.util.Map getEntries()
           
 java.lang.String getValueToBeChecked()
          gets the value of the element in the group which should be checked by default
 void reset()
          resets all attributes of the element back to a blank state
 void setDisplayAsColumn(boolean x)
          specifies whether the check box group should be displayed as a row or as a column
 void setEntries(java.util.Map x)
          specifies the data structure from which the entries will be generated
 void setValueToBeChecked(java.lang.String x)
          specifies which element in this group should be checked by default.
 
Methods inherited from class com.raj.htmlForms.HtmlInput
getAccessKey, getDisabled, getReadOnly, getSize, getValue, isDisabled, setAccessKey, setReadOnly, setSize, setValue, toString
 
Methods inherited from class com.raj.htmlForms.HtmlFormElement
getDir, getId, getLang, getName, getOnBlur, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getTabIndex, getTheClass, getTitle, getXhtml, setDir, setId, setLang, setName, setOnBlur, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyle, setStyle, setTabIndex, setTheClass, setTitle, setXhtml, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HtmlGroups

public HtmlGroups()
Method Detail

setEntries

public void setEntries(java.util.Map x)
specifies the data structure from which the entries will be generated


getEntries

public java.util.Map getEntries()

setValueToBeChecked

public void setValueToBeChecked(java.lang.String x)
specifies which element in this group should be checked by default. This string should match the value of one of the elements in the group. If no matches are found then no entry will be cbecked


getValueToBeChecked

public java.lang.String getValueToBeChecked()
gets the value of the element in the group which should be checked by default


setDisplayAsColumn

public void setDisplayAsColumn(boolean x)
specifies whether the check box group should be displayed as a row or as a column


getDisplayAsColumn

public boolean getDisplayAsColumn()
gets whether the check box group should be displayed as a row or as a column

Returns:
true == group will be displayed as a column; false == group will be displayed as a row

reset

public void reset()
Description copied from class: HtmlFormElement
resets all attributes of the element back to a blank state

Overrides:
reset in class HtmlInput