public class RadioButtonGroup extends MustInputField
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
additionalTagFragments |
protected java.lang.String |
className |
protected int |
editBeginIndex |
comment, focus, name, placeholder, toolTipText
Constructor and Description |
---|
RadioButtonGroup(java.lang.String[] checkLabels) |
RadioButtonGroup(java.lang.String[] checkLabels,
java.lang.String[] values) |
RadioButtonGroup(java.lang.String[] checkLabels,
java.lang.String[] values,
java.lang.String[] links) |
RadioButtonGroup(java.lang.String name,
java.lang.String[] checkLabels,
java.lang.String[] values) |
RadioButtonGroup(java.lang.String name,
java.lang.String[] checkLabels,
java.lang.String[] values,
java.lang.String[] links) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys the markupable.
|
void |
fetchYourValueFromRequest(GeneralizedRequest request)
Causes the component to read user input by calling request.getParameter and
update the internal mirrored value.
|
java.lang.String |
getCreationTag()
Returns the tag sequence that's needed to show this object in the user
interface.
|
int |
getSelectedIndex()
Returns the index of the currently selected item.
|
java.lang.String |
getSelectedKey()
Returns the key of the currently selected item.
|
boolean |
isModified()
Indicates whether the component's value differs from its initial value.
|
void |
selectFirstEnabledItem()
Selects the first of all enabled items.
|
void |
setAdditionalTagFragments(java.lang.String additionalTagFragments)
Sets the component's additional tag fragments.
|
void |
setClassName(java.lang.String className)
Sets the component's class name - may be used to assign formatting
via stylesheets.
|
static void |
setDefaultAdditionalTagFragments(java.lang.String newDefaultAdditionalTagFragments)
Sets the component's default additional tag fragments.
|
static void |
setDefaultClassName(java.lang.String newDefaultClassName)
Sets the component's default class name - may be used to assign formatting
via stylesheets.
|
void |
setEnabled(boolean enabled)
Enables or disables all items.
|
void |
setEnabled(int anIndex,
boolean enabled)
Enables or disables an item by index.
|
void |
setLinks(java.lang.String[] links)
Changes the links of the radio buttons, e.g. with encoded stuff like jsessionid.
|
void |
setSelectedIndex(int anIndex)
Selects the item at index.
|
void |
setSelectedKey(java.lang.String key)
Selects the item by its key.
|
getName, setComment, setFocus, setPlaceHolder, setToolTipText, toString
protected java.lang.String className
protected java.lang.String additionalTagFragments
protected int editBeginIndex
public RadioButtonGroup(java.lang.String[] checkLabels)
public RadioButtonGroup(java.lang.String[] checkLabels, java.lang.String[] values)
public RadioButtonGroup(java.lang.String[] checkLabels, java.lang.String[] values, java.lang.String[] links)
public RadioButtonGroup(java.lang.String name, java.lang.String[] checkLabels, java.lang.String[] values)
public RadioButtonGroup(java.lang.String name, java.lang.String[] checkLabels, java.lang.String[] values, java.lang.String[] links)
public void setLinks(java.lang.String[] links)
links
- the new links to usepublic static void setDefaultClassName(java.lang.String newDefaultClassName)
newDefaultClassName
- the component's default class namepublic void setClassName(java.lang.String className)
newDefaultClassName
- the component's class namepublic static void setDefaultAdditionalTagFragments(java.lang.String newDefaultAdditionalTagFragments)
newDefaultClassName
- the component's default additional tag fragments.public void setAdditionalTagFragments(java.lang.String additionalTagFragments)
newDefaultClassName
- the component's additional tag fragments.public void setEnabled(boolean enabled)
enabled
- whether the items should be enabeld or notpublic void setEnabled(int anIndex, boolean enabled)
anIndex
- an int specifying the item to select, where 0 specifiesenabled
- whether the item should be enabeld or notpublic void selectFirstEnabledItem()
public void setSelectedKey(java.lang.String key)
key
- the key of the item to selectpublic void setSelectedIndex(int anIndex)
anIndex
- an int specifying the item to select, where 0 specifies
the first itempublic int getSelectedIndex()
public java.lang.String getSelectedKey()
public java.lang.String getCreationTag()
public void fetchYourValueFromRequest(GeneralizedRequest request)
fetchYourValueFromRequest
in interface ValueFetcher
fetchYourValueFromRequest
in class MustInputField
request
- the current requestpublic boolean isModified()
public void destroy()
Markupable
destroy
in interface Markupable
destroy
in class MustInputField
Markupable.destroy()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de