All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.servlet.tbeans.form.html
Class Radio

    com.sas.servlet.tbeans.form.html.Radio

All Implemented Interfaces:
  com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, ComplexStyleInterface, FormElementModificationEventInterface, RadioStyleKeysInterface, com.sas.servlet.tbeans.form.JavaScriptObjectCreationInterface, com.sas.servlet.tbeans.JavaScriptEventHandlerInterface, RenderableInterface, TransformationInterface, GenericValidatorInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable, javax.swing.SwingConstants

Direct Known Subclasses:
  CellContentsRadioEditor

    public class Radio

implements RadioStyleKeysInterface, ComplexStyleInterface

The Radio is a TransformationBean™ that generates the appropriate HTML 4.0 for creating an HTML Radio input field, which is used for attributes which can take a single value from a set of alternatives.

The Radio Transformation Bean gathers the alternatives from a model via the setModel method. A model must implement the javax.swing.ListModel interface in order to be used.

### Accessibility

The Section 508 Accessibility standards, such as making application tasks available through the keyboard, are incorporated into our components to improve usability for all of our software products which benefits every SAS user.

This component is fully compliant with the Web-based standards outlined in Section 508. The compliance is based on producing the correct output, having keyboard equivalent and surfacing the necessary properties to assist consumers of the component to be compliant.

The following keyboard equivalents are supported by this component:

KeyBoard Access | Behavior/Result
--- | ---
TAB | TAB moves the focus to the radio button. Hitting TAB while the radio button has focus will navigate focus to the next tabbable component.
ALT+ACCESSKEY | Pressing ALT+ACCESSKEY will navigate focus to the radio button. The ACCESSKEY indicates the keyboard character used as a shortcut to activate the element.
ARROW KEYS | Arrow keys allow the user to navigate to and select a radio button.

The following properties are provided to assist in making the application using this component accessible:

- AccessKey
- TabIndex
- KeyDown
- KeyPress
- KeyUp

The Radio is one of several TransformationBeans™ that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean™, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans™ as well as the TransformationBeans™ Style Sheet Reference.

Note that the toString() method on this class calls the `write` method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

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 .

The Radio is one of several TransformationBeans™ that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The Radio uses the following JavaScript files:

  sas_radioBox.js

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.sas.servlet.tbeans.form.BaseRadio
`model, RB_KEY`

Fields inherited from interface com.sas.servlet.tbeans.form.html.RadioStyleKeysInterface
`RADIO_BOX, RADIO_CONTAINER, RADIO_CONTAINER_CELL, RADIO_INNER_CONTAINER, RADIO_INNER_CONTAINER_LABEL_CELL, RADIO_INNER_CONTAINER_RADIO_CELL, RADIO_LABEL`

Constructor Summary
`Radio()` Construct a new Radio input field
`Radio(java.lang.String name, javax.swing.ListModel model)` Construct a new Radio input field

Method Summary
`java.util.Map` | `getStyleMap()` Returns the style map for this radio.
`boolean` | `isContainerDefaults()` Determines if container defaults should be written out.
`void` | `setContainerDefaults(boolean value)` Used only when orientation is horizontal.
`void` | `write(java.io.PrintWriter out)` Writes the transformed representation of the object

Methods inherited from class com.sas.servlet.tbeans.form.BaseRadio
`getHorizontalAlignment, getLabelOrientation, getModel, getSelectedIndex, getSelectedItem, isBreak, isLabelBolding, isLabelVisible, isSelected, isSelected, isValidateSelection, setBreak, setHorizontalAlignment, setLabelBolding, setLabelOrientation, setLabelVisible, setModel, setSelectedIndex, setSelectedItem, setSelectedItem, setValidateSelection`

Methods inherited from class com.sas.servlet.tbeans.form.BaseFormElement
`getAccessKey, getErrorHandler, getModificationEventName, getName, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyleInfo, getTabIndex, getTitle, getValidationFunctions, getValidator, isEnabled, isValid, isValidationEnabled, setAccessKey, setEnabled, setErrorHandler, setId, setModificationEventName, setName, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyleInfo, setTabIndex, setTitle, setValidator, writeJavaScriptObject, writeJavaScriptObjectValidate, writeJavaScriptValidatorObject, writeValidationScript`

Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
`addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setInputTransform, setLocale, setLocaleDependentProperties, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write`

Constructor Detail

### Radio

    public Radio()

  Construct a new Radio input field

### Radio

    public Radio(java.lang.String name,
                 javax.swing.ListModel model)

  Construct a new Radio input field

  Parameters:
    `name` - The field name
    `model` - The model for the radio alternatives

Method Detail

### getStyleMap

    public java.util.Map getStyleMap()

  Returns the style map for this radio.

  STYLE KEY | DEFAULT STYLE
  RADIO_BOX | NONE
  RADIO_LABEL | NONE
  RADIO_CONTAINER | NONE
  RADIO_CONTAINER_CELL | NONE
  RADIO_INNER_CONTAINER | NONE
  RADIO_INNER_CONTAINER_LABEL_CELL | NONE
  RADIO_INNER_CONTAINER_RADIO_CELL | NONE

  Specified by:
    `getStyleMap` in interface `ComplexStyleInterface`
  Returns:
    styles used for this Radio

### setContainerDefaults

    public void setContainerDefaults(boolean value)

  Used only when orientation is horizontal. Used to indicate whether or not to write out default values of 0 for cellspacing and cellpadding on the table used as a container. FALSE by default.

  Parameters:
    `value` - TRUE to write out container defaults.

### isContainerDefaults

    public boolean isContainerDefaults()

  Determines if container defaults should be written out.

  Returns:
    TRUE if container defaults should be written out.

### write

    public void write(java.io.PrintWriter out)
               throws java.io.IOException

  Writes the transformed representation of the object

  Specified by:
    `write` in interface `TransformationInterface`
  Specified by:
    `write` in interface `com.sas.util.WriteToPrintWriterInterface`
  Overrides:
    `write` in class `BaseFormElement`
  Parameters:
    `out` - The output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.