|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.form.BaseRadio
public abstract class BaseRadio
The BaseRadio is an abstract TransformationBean for creating a Radio input field, which is used for attributes which can take a single value from a set of alternatives.
The Radio TransformationBean gathers the alternatives from a model via the setModel method. A model must implement the javax.swing.ListModel interface in order to be used.
Note that subclasses of this bean actually provide the markup rendering used in/with Servlet and JavaServer Pages technologies. If you need to add support for a markup language that is not explicitly provided with AppDev Studio, then you must extend this class.
For More Information:
JSP custom tags provide an alternative to using the TransformationBeans. Visit the Custom Tag Library Reference for additional information on the sas:Radio custom tag.
Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .
Field Summary | |
---|---|
protected javax.swing.ListModel |
model
The model for the Radio. |
static java.lang.String |
RB_KEY
Key used to lookup resources in the resource bundle. |
Constructor Summary | |
---|---|
BaseRadio()
Construct a new Radio |
Method Summary | |
---|---|
boolean |
getHorizontalAlignment()
Returns the value of horizontal alignment. |
int |
getLabelOrientation()
Returns the current setting for where to display the radio element's text. |
javax.swing.ListModel |
getModel()
Return the model for the Radio. |
int |
getSelectedIndex()
Gets the index value of a single item to be marked as selected |
java.lang.String |
getSelectedItem()
Gets the value of a single item to be marked as selected |
boolean |
isBreak()
Gets the flag indicating whether to force a break after each input field. |
boolean |
isLabelBolding()
Returns whether the to bold the label when the checkbox is selected: TRUE bold label |
boolean |
isLabelVisible()
Returns labelVisible value |
protected boolean |
isSelected(int index)
Determines if the given index should be marked as selected |
protected boolean |
isSelected(java.lang.String value)
Determines if the given value should be marked as selected |
boolean |
isValidateSelection()
Returns whether or not exceptions are thrown for setSelectedIndex() and setSelectedItem(). |
void |
setBreak(boolean value)
Forces a break after each input field. |
void |
setHorizontalAlignment(boolean value)
Sets the alignment of the radio buttons horizontally instead of vertically. |
void |
setLabelBolding(boolean value)
Sets whether the to bold the label when the checkbox is selected: TRUE bold label Default value is FALSE. |
void |
setLabelOrientation(int orientation)
Sets the position for where to display the radio element's text. |
void |
setLabelVisible(boolean value)
Sets the labelVisible to true if text is to be displayed with the Radio buttons |
void |
setModel(javax.swing.ListModel listModel)
Sets the model for the Radio. |
void |
setSelectedIndex(int value)
Sets the index of a single item to be marked as selected. |
void |
setSelectedItem(java.lang.String value)
Sets the value of a single item to be marked as selected. |
void |
setSelectedItem(java.lang.String value,
int defaultIndex)
Sets the value of a single item to be marked as selected. |
void |
setValidateSelection(boolean value)
Determines whether or not exceptions are thrown for setSelectedIndex() and setSelectedItem(). |
Field Detail |
---|
public static final java.lang.String RB_KEY
protected javax.swing.ListModel model
Constructor Detail |
---|
public BaseRadio()
Method Detail |
---|
public javax.swing.ListModel getModel()
setModel(javax.swing.ListModel)
public void setModel(javax.swing.ListModel listModel)
listModel
- the model for the RadiogetModel()
public int getLabelOrientation()
public void setLabelOrientation(int orientation)
orientation
- the orientation of the radio text
java.lang.IllegalArgumentException
- if orientation is invalidpublic void setSelectedIndex(int value) throws java.io.IOException
index
- The 0-based index of the item to be selected, or -1 for none
java.lang.IllegalArgumentException
- Thrown if index is out of bounds and setValidateSelection(true)
java.io.IOException
setValidateSelection(boolean)
public void setSelectedItem(java.lang.String value) throws java.io.IOException
value
- The value of the item to be selected
java.lang.IllegalArgumentException
- Thrown if item is not found and setValidateSelection(true)
java.io.IOException
setValidateSelection(boolean)
public void setSelectedItem(java.lang.String value, int defaultIndex)
value
- The value of the item to be selectedindex
- The 0-based index of the item to be selected, or -1 to remain the same, if selectedItem does not existpublic int getSelectedIndex()
public java.lang.String getSelectedItem()
protected boolean isSelected(int index)
index
- The index to check
protected boolean isSelected(java.lang.String value)
index
- The value to check
public void setBreak(boolean value)
break
- Set to true to force a line break after each input fieldpublic boolean isBreak()
public void setLabelVisible(boolean value)
value
- Determines whether button text is displayedpublic boolean isLabelVisible()
public void setHorizontalAlignment(boolean value)
value
- The horizontal alignment valuepublic boolean getHorizontalAlignment()
public void setValidateSelection(boolean value)
value
- true if exceptions should be thrown for setSelectedIndex() and setSelectedItem()setSelectedIndex(int)
,
setSelectedItem(java.lang.String)
public boolean isValidateSelection()
public void setLabelBolding(boolean value)
value
- true to bold the label when the checkbox is selectedpublic boolean isLabelBolding()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |