com.arsdigita.bebop.form
Class RadioGroup
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.form.Widget
com.arsdigita.bebop.form.OptionGroup
com.arsdigita.bebop.form.RadioGroup
- All Implemented Interfaces:
- BebopConstants, Cloneable, Component, Lockable
- public class RadioGroup
- extends OptionGroup
- implements BebopConstants
A class
representing a group of associated radio buttons.
- Version:
- $Id: //core-platform/dev/src/com/arsdigita/bebop/form/RadioGroup.java#9 $
- Author:
- Karl Goldstein, Uday Mathur, Rory Solomon, Michael Pih
Field Summary |
static int |
HORIZONTAL
Specifies that options should be laid out left to right. |
static String |
versionId
|
static int |
VERTICAL
Specifies that options should be laid out top to bottom. |
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Fields inherited from interface com.arsdigita.bebop.util.BebopConstants |
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA |
Method Summary |
void |
generateWidget(PageState state,
Element parent)
Generates the DOM for a radio button group
|
protected String |
getElementTag()
The XML tag. |
int |
getLayout()
Returns the layout for the options in this radio group. |
String |
getType()
Returns a string naming the type of this widget. |
boolean |
isMultiple()
Is this a multiple (and not single) selection option group? |
void |
setLayout(int layout)
Sets the layout for the options in this radio group. |
Methods inherited from class com.arsdigita.bebop.form.OptionGroup |
addOption, addOption, clearOptions, clone, getOptions, getOptions, isCompound, removeOption, removeOption, removeOption, removeOption, setOptionSelected, setOptionSelected |
Methods inherited from class com.arsdigita.bebop.form.Widget |
addError, addError, addPrintListener, addValidationListener, createParameterListener, firePrintEvent, fireValidation, generateErrors, generateXML, getDefaultValue, getErrors, getForm, getName, getParameterData, getParameterModel, getValue, isPassIn, register, removePrintListener, removeValidationListener, respond, setDefaultValue, setDisabled, setForm, setHint, setOnBlur, setOnChange, setOnFocus, setOnKeyUp, setOnSelect, setParameterModel, setPassIn, setPrintListener, setReadOnly, setValidateInvisible, setValidationGuard, setValue, toString, validateInvisible |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
children, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
versionId
public static final String versionId
- See Also:
- Constant Field Values
HORIZONTAL
public static final int HORIZONTAL
- Specifies that options should be laid out left to right.
- See Also:
- Constant Field Values
VERTICAL
public static final int VERTICAL
- Specifies that options should be laid out top to bottom.
- See Also:
- Constant Field Values
RadioGroup
public RadioGroup(String name)
RadioGroup
public RadioGroup(ParameterModel model)
getType
public String getType()
- Returns a string naming the type of this widget.
- Specified by:
getType
in class Widget
getElementTag
protected String getElementTag()
- The XML tag.
- Overrides:
getElementTag
in class Widget
- Returns:
- The tag to be used for the top level DOM element
generated for this type of Widget.
generateWidget
public void generateWidget(PageState state,
Element parent)
- Generates the DOM for a radio button group
Generates DOM fragment:
<bebop:radioGroup name=...>
<bebop:radio name=... value=... label=... [checked=...]>
option value
</bebop:option>
...
</bebop:radioGroup>
- Overrides:
generateWidget
in class Widget
isMultiple
public boolean isMultiple()
- Is this a multiple (and not single) selection option group?
- Overrides:
isMultiple
in class OptionGroup
- Returns:
- true if this OptionGroup can have more than one
selected option; false otherwise.
setLayout
public void setLayout(int layout)
- Sets the layout for the options in this radio group.
- Parameters:
layout
- one of RadioGroup.VERTICAL or RadioGroup.HORIZONTAL
getLayout
public int getLayout()
- Returns the layout for the options in this radio group.
- Returns:
- one of RadioGroup.VERTICAL or RadioGroup.HORIZONTAL
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC