com.sas.visuals
Class RadioBox

com.sas.visuals.RadioBox
All Implemented Interfaces:
CompositeInterface, ContainerInterface, com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.collection.ContentsChangedListener, com.sas.ComponentInterface, com.sas.DesignTimeDropTargetInterface, com.sas.lang.StringDataInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, ValidatorInterface, com.sas.ViewDefaultModelInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener

public class RadioBox
implements java.beans.PropertyChangeListener, java.awt.ItemSelectable, java.awt.event.ItemListener, com.sas.collection.ContentsChangedListener, com.sas.ViewDefaultModelInterface, com.sas.lang.StringDataInterface

The RadioBox is a panel that contains a SelectionGroup and multiple instances of SelectableInterface members(radio buttons) of that group. The radio buttons are arranged based on the layout manager of this panel and are instances of the radioButtonClass property.

Notes:

See Also:
Serialized Form

Field Summary
static java.lang.String defaultRadioButtonClass
           
static java.lang.String defaultSelectionGroupClass
           
protected  boolean noPrevAdd
           
 
Constructor Summary
RadioBox()
          Default constructor
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Adds the specified action listener to receive action events from this button.
protected  void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
          Method that all add calls funnel through.
 void addItem(java.lang.Object item)
          Add the specified item to the RadioBox.
 void addItem(java.lang.Object item, int index)
          Add the specified item to the RadioBox at the position of index.
 void addItemListener(java.awt.event.ItemListener l)
          Adds a listener to recieve item events when the state of an item changes.
protected  void addModelItem(java.lang.Object item, int index)
          Add the specified item to the RadioBox at the position of index.
 void contentsChanged(com.sas.collection.ContentsChangedEvent evt)
          Called when the contents of the model have changed.
 void detachModel(com.sas.ModelInterface model)
          Detaches the model from this RadioBox.
 int dragOver(java.awt.Point point, int representation, int keyState, java.util.Vector data)
          Used to support Drag and Drop in the IDE at design time.
static int getDefaultHeight()
          Returns the default height of this RadioBox in pixels
static int getDefaultWidth()
          Returns the default width of this RadioBox in pixels
 com.sas.util.transforms.TransformInterface getDisplayTransform()
          Gets the display Transform.
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this RadioBox.
 java.lang.String[] getInitialItems()
          Gets the initial items in the RadioBox.
 com.sas.util.transforms.TransformInterface getInputTransform()
          Gets the input Transform.
 java.lang.Object getItem(int index)
          Gets the item of the radioButton at the specified index.
 com.sas.util.transforms.TransformInterface getOutputTransform()
          Gets the output Transform.
 java.lang.Class getRadioButtonClass()
          Gets the RadioButtonInterface class name
 java.util.Vector getRequiredInterfaces()
          Returns the required interfaces Vector for this component.
 int getSelectedIndex()
          Gets the index of the selected item in the SelectionGroupInterface object.
 java.lang.Object getSelectedItem()
          Gets the String name (by default) of the selected SelectableInterface object in the SelectionGroupInterface object.
 java.lang.Object[] getSelectedObjects()
          Gets the selected RadioButton object.
 SelectionGroupInterface getSelectionGroup()
          Gets the SelectionGroupInterface object.
 java.lang.String getText()
          Get the text of the current selectedItem.
 void initialize()
          Initialize the defaultModel with 2 items if no other model has been set and it is designTime
 boolean isDefaultModelAttached()
          Returns boolean value of whether the model is attached or not
 boolean isDeselectable()
          Returns whether or not the RadioBox can have no radio buttons selected.
 void itemStateChanged(java.awt.event.ItemEvent e)
          Receives ItemEvents from the SelectionGroup of the RadioBox and sends out ItemEvents and ActionEvents.
protected  void processActionEvent(java.awt.event.ActionEvent e)
          Processes action events occurring on this button by dispatching them to any registered ActionListener objects.
protected  void processEvent(java.awt.AWTEvent e)
          Processes events on this RadioBox.
protected  void processItemEvent(java.awt.event.ItemEvent e)
          Processes item events occurring on this checkbox by dispatching them to any registered ItemListener objects.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Handles propertyChange events.
 void refresh(com.sas.ModelInterface model)
          Refreshes the radio buttons based on the model.
 void remove(int index)
          Removes the radioButton at the specified index.
 void removeActionListener(java.awt.event.ActionListener listener)
          Removes the specified ActionListener so it no longer receives action events.
 void removeAll()
          Removes all radio buttons from this RadioBox.
 void removeItem(java.lang.Object item)
          Removes the radioButton with the specified item.
 void removeItemListener(java.awt.event.ItemListener l)
          Removes the specified ItemListener so it no longer receives item events.
 void replaceItem(java.lang.Object newItem, int index)
          Replaces the item at the specified index with a new value.
 void setBackground(java.awt.Color c)
          Sets the background of the RadioBox and all of its subcomponents.
static void setDefaultHeight(int newHeight)
          Sets the default height of this RadioBox in pixels
 void setDefaultValues()
          Sets the initial values of the RadioBox.
static void setDefaultWidth(int newWidth)
          Sets the default width of the RadioBox in pixels
 void setDeselectable(boolean state)
          Sets the deselectable property of the SelectionGroupInterface object.
 void setDisplayTransform(com.sas.util.transforms.TransformInterface transform)
          Sets the DisplayTransform for the RadioBox.
 void setEnabled(boolean enabled)
          Sets the whether the RadioBox and its components are disabled or not.
 void setForeground(java.awt.Color c)
          Sets the foreground of the RadioBox and all of its subcomponents.
 void setInitialItems(java.lang.String[] items)
          Sets the initialItems on the RadioBox.
 void setInputTransform(com.sas.util.transforms.TransformInterface transform)
          Sets the input transform to be used when getting items in the RadioBox.
 void setOutputTransform(com.sas.util.transforms.TransformInterface transform)
          Sets the output transform to be used when setting items in the RadioBox.
 void setRadioButtonClass(java.lang.Class rClass)
          Sets the name of the SelectableInterface class to create when addItem(object) is called.
 void setSelectedIndex(int index)
          Sets the selected item in this SelectionGroup to the item at the specified position
 void setSelectedItem(java.lang.Object item)
          Sets the selected item in this RadioBox to be the radio button whose item matches the specified object.
 void setSelectionGroup(SelectionGroupInterface selectionGroup)
          Sets the SelectionGroup that contains all of the radio buttons.
 void setText(java.lang.String txt)
          Set the selectedItem to the specified text.
 void setTransparent(boolean t)
          Sets the RadioBox and all of its components transparent.
 
Methods inherited from class com.sas.awt.ContainerContainerComponent
addNotify, clone, dragEnter, dragLeave, drop, getContainerInterfaceSupportInfo, getErrorHandler, getInsets, getValidator, isIDEDnDDropBarrier, isIDEDnDDropTarget, isValid, removeNotify, setContainerInterfaceSupportInfo, setErrorHandler, setIDEDnDDropBarrier, setIDEDnDDropTarget, setInsets, setInsets, setValidator, superAddNotify, superGetInsets, superRemoveNotify, superSetDefaultValues
 
Methods inherited from class com.sas.awt.ContainerVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, computePreferredSize, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getMinimumSize, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, paint, print, printFinalize, printInitialize, queryLinks, queryLinks, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject
 
Methods inherited from interface com.sas.awt.ContainerInterface
getComponents, getLayout, invalidate, setLayout, validate
 
Methods inherited from interface com.sas.awt.VisualInterface
computePreferredSize, getBackgroundColor, getBorder, getFont, getForegroundColor, getHeight, getHorizontalPosition, getMinimumSize, getPreferredSize, getPrePainter, getVerticalPosition, getVisualInterfaceSupportInfo, getWidth, isEnabled, isFocus, isTransparent, isVisible, setBackgroundColor, setBorder, setBounds, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setPreferredSize, setPrePainter, setVerticalPosition, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate
 

Field Detail

defaultSelectionGroupClass

public static final java.lang.String defaultSelectionGroupClass
See Also:
Constant Field Values

defaultRadioButtonClass

public static final java.lang.String defaultRadioButtonClass
See Also:
Constant Field Values

noPrevAdd

protected transient boolean noPrevAdd
Constructor Detail

RadioBox

public RadioBox()
Default constructor

Method Detail

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this RadioBox.

Returns:
the ExtendedBeanInfo for this class

getDefaultHeight

public static int getDefaultHeight()
Returns the default height of this RadioBox in pixels

Returns:
pixel value of the default height
See Also:
setDefaultHeight(int)

getDefaultWidth

public static int getDefaultWidth()
Returns the default width of this RadioBox in pixels

Returns:
pixel value of default width
See Also:
setDefaultWidth(int)

setDefaultHeight

public static void setDefaultHeight(int newHeight)
Sets the default height of this RadioBox in pixels

Parameters:
newHeight - the desired default height in pixels
See Also:
getDefaultHeight()

setDefaultWidth

public static void setDefaultWidth(int newWidth)
Sets the default width of the RadioBox in pixels

Parameters:
newWidth - the desired default width in pixels
See Also:
setDefaultWidth(int)

addItem

public void addItem(java.lang.Object item)
Add the specified item to the RadioBox. An instance of the radioButtonClass property will be created and its item property set to the item parameter. The radioButton will be added at the last index. If a model is attached the model will be updated to reflect the items in the RadioBox.

Parameters:
item - item of the SelectableInterface object to be added.

addItem

public void addItem(java.lang.Object item,
                    int index)
Add the specified item to the RadioBox at the position of index. An instance of the radioButtonClass property will be created and its item property set to the item parameter. If a model is attached the model will be updated to reflect the items in the RadioBox. The inputTransform will be applied to the item before it is added to the model.

Parameters:
item - item of the SelectableInterface object to be added.
index - zero-based index of item to add, or -1 to add at the end

addModelItem

protected void addModelItem(java.lang.Object item,
                            int index)
Add the specified item to the RadioBox at the position of index. Invoked when an item is added to the model, so a radioButton has to be created and added to the RadioBox.

Parameters:
item - item value of radioButton
index - index of radioButton added

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Adds the specified action listener to receive action events from this button.

Parameters:
listener - the action listener to receive events
See Also:
ActionListener, removeActionListener(java.awt.event.ActionListener)

addImpl

protected void addImpl(java.awt.Component comp,
                       java.lang.Object constraints,
                       int index)
Method that all add calls funnel through.

Overrides:
addImpl in class java.awt.Container
Parameters:
comp - the component to add
constraints - the constraints on the component
index - the index to add the component at

addItemListener

public void addItemListener(java.awt.event.ItemListener l)
Adds a listener to recieve item events when the state of an item changes.

Specified by:
addItemListener in interface java.awt.ItemSelectable
Parameters:
l - the listener to receive events
See Also:
ItemListener, removeItemListener(java.awt.event.ItemListener)

contentsChanged

public void contentsChanged(com.sas.collection.ContentsChangedEvent evt)
Called when the contents of the model have changed.

Specified by:
contentsChanged in interface com.sas.collection.ContentsChangedListener
Parameters:
evt - the ContentsChangedEvent from the model that changed.
See Also:
ContentsChangedListener.contentsChanged(com.sas.collection.ContentsChangedEvent)

detachModel

public void detachModel(com.sas.ModelInterface model)
Detaches the model from this RadioBox.

Specified by:
detachModel in interface com.sas.ViewInterface
Overrides:
detachModel in class ContainerVisualComponent
Parameters:
model - the model to detach
See Also:
ViewInterface.detachModel(com.sas.ModelInterface)

dragOver

public int dragOver(java.awt.Point point,
                    int representation,
                    int keyState,
                    java.util.Vector data)
Used to support Drag and Drop in the IDE at design time.

Specified by:
dragOver in interface ContainerInterface
Specified by:
dragOver in interface com.sas.DesignTimeDropTargetInterface
Overrides:
dragOver in class ContainerContainerComponent
Parameters:
point - The x/y coordinates of the mouse cursor inside the component.
representation - One of com.sas.DesignTimeDropResult.{representationComponent,representationModel,representationAttribute,representationViewer}
keyState - Unused.
data - A Vector containing information about the drag.
Returns:
One of com.sas.DesignTimeDropResult.{dragIndeterminate,dragMove,dragCopy,dragLink,dragNone}
See Also:
DesignTimeDropTargetInterface.dragOver(java.awt.Point, int, int, java.util.Vector)

getDisplayTransform

public com.sas.util.transforms.TransformInterface getDisplayTransform()
Gets the display Transform. The displayTransform is used to transform the information from the model into the form it will be displayed as.

Returns:
the displayTransform
See Also:
setDisplayTransform(com.sas.util.transforms.TransformInterface)

getInputTransform

public com.sas.util.transforms.TransformInterface getInputTransform()
Gets the input Transform. The inputTransform is used to transform the items input to methods of the RadioBox to the objects that are in the model.

Returns:
the inputTransform
See Also:
setInputTransform(com.sas.util.transforms.TransformInterface)

getInitialItems

public java.lang.String[] getInitialItems()
Gets the initial items in the RadioBox. These are the items in the defaultModel when no other model has been set on the RadioBox.

Returns:
string array of the initial items in the RadioBox
See Also:
setInitialItems(java.lang.String[])

setInitialItems

public void setInitialItems(java.lang.String[] items)
Sets the initialItems on the RadioBox. This set the items on the defaultModel and attach the defaultModel if it is not already attached. The items will all be transformed using the inputTransform before being added to the model.

Parameters:
items - string array of items to add to the defaultModel
See Also:
getInitialItems()

getItem

public java.lang.Object getItem(int index)
Gets the item of the radioButton at the specified index. The item will be transformed through the outputTransform.

Parameters:
index - index of the RadioButton item property to be returned.
Returns:
item property of the RadioButton at index.

getOutputTransform

public com.sas.util.transforms.TransformInterface getOutputTransform()
Gets the output Transform. The outputTransform is used to transform the items output from methods of the RadioBox from the objects that are in the model.

Returns:
the outputTransform
See Also:
setOutputTransform(com.sas.util.transforms.TransformInterface)

getRadioButtonClass

public java.lang.Class getRadioButtonClass()
Gets the RadioButtonInterface class name

Returns:
RadioButton class to be created when an add(String) is done.
See Also:
setRadioButtonClass(java.lang.Class)

getRequiredInterfaces

public java.util.Vector getRequiredInterfaces()
Returns the required interfaces Vector for this component.

Specified by:
getRequiredInterfaces in interface com.sas.ViewInterface
Overrides:
getRequiredInterfaces in class ContainerVisualComponent
Returns:
the required interfaces Vector for this component.
See Also:
ViewInterface.getRequiredInterfaces()

getSelectionGroup

public SelectionGroupInterface getSelectionGroup()
Gets the SelectionGroupInterface object. The selectionGroup handles the selection and deselection of SelectableInterface objects.

Returns:
SelectionGroupInterface object containing the SelectableInterface objects
See Also:
setSelectionGroup(com.sas.visuals.SelectionGroupInterface)

getSelectedIndex

public int getSelectedIndex()
Gets the index of the selected item in the SelectionGroupInterface object.

Returns:
index of the selected item
See Also:
setSelectedIndex(int), SelectionGroupInterface.getSelectedIndex()

getSelectedItem

public java.lang.Object getSelectedItem()
Gets the String name (by default) of the selected SelectableInterface object in the SelectionGroupInterface object. Will return Object if a model of Objects are attached.

Returns:
String name of the selectedItem by default, unless model with Objects is attached
See Also:
setSelectedItem(java.lang.Object), SelectionGroupInterface.getSelectedItem()

getSelectedObjects

public java.lang.Object[] getSelectedObjects()
Gets the selected RadioButton object.

Specified by:
getSelectedObjects in interface java.awt.ItemSelectable
Returns:
a one element array containing the selected radioButton object.
See Also:
ItemSelectable, ItemSelectable.getSelectedObjects()

getText

public java.lang.String getText()
Get the text of the current selectedItem. This method calls the getSelectedItem() method and returns the toString() of the selectedItem if not null, otherwise it returns null.

Specified by:
getText in interface com.sas.lang.StringDataInterface
Returns:
the selectedItem of the RadioBox in String form
See Also:
getSelectedItem(), setText(java.lang.String)

isDefaultModelAttached

public boolean isDefaultModelAttached()
Returns boolean value of whether the model is attached or not

Specified by:
isDefaultModelAttached in interface com.sas.ViewDefaultModelInterface
Returns:
boolean representing whether model is attached
See Also:
detachModel(com.sas.ModelInterface)

isDeselectable

public boolean isDeselectable()
Returns whether or not the RadioBox can have no radio buttons selected.

Returns:
true if radio buttons can be toggled to unselected.
See Also:
setDeselectable(boolean), SelectionGroupInterface.isDeselectable()

initialize

public void initialize()
Initialize the defaultModel with 2 items if no other model has been set and it is designTime

Specified by:
initialize in interface com.sas.ComponentInterface
Overrides:
initialize in class ContainerVisualComponent
See Also:
ComponentInterface.initialize()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Receives ItemEvents from the SelectionGroup of the RadioBox and sends out ItemEvents and ActionEvents.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
See Also:
ItemListener.itemStateChanged(java.awt.event.ItemEvent)

processEvent

protected void processEvent(java.awt.AWTEvent e)
Processes events on this RadioBox.

Overrides:
processEvent in class java.awt.Container
Parameters:
e - the AWTEvent that was changed

processActionEvent

protected void processActionEvent(java.awt.event.ActionEvent e)
Processes action events occurring on this button by dispatching them to any registered ActionListener objects. NOTE: This method will not be called unless action events are enabled for this component; this happens when one of the following occurs: a) An ActionListener object is registered via addActionListener() b) Action events are enabled via enableEvents()

Parameters:
e - the action event
See Also:
Component.enableEvents(long)

processItemEvent

protected void processItemEvent(java.awt.event.ItemEvent e)
Processes item events occurring on this checkbox by dispatching them to any registered ItemListener objects. NOTE: This method will not be called unless item events are enabled for this component; this happens when one of the following occurs: a) An ItemListener object is registered via addItemListener() b) Item events are enabled via enableEvents()

Parameters:
e - the item event
See Also:
Component.enableEvents(long)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Handles propertyChange events.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class ContainerVisualComponent
Parameters:
event - the property event that was changed
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

refresh

public void refresh(com.sas.ModelInterface model)
Refreshes the radio buttons based on the model.

Specified by:
refresh in interface com.sas.ViewInterface
Overrides:
refresh in class ContainerVisualComponent
Parameters:
model - model to be be refreshed and displayed on radio buttons
See Also:
ViewInterface.refresh(com.sas.ModelInterface)

remove

public void remove(int index)
Removes the radioButton at the specified index. The item in the model at the index position will also be removed.

Overrides:
remove in class java.awt.Container
Parameters:
index - index of the item to remove

removeItem

public void removeItem(java.lang.Object item)
Removes the radioButton with the specified item. The item is transformed using the inputTransform and then removed from the model.

Parameters:
item - radio button to remove

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Removes the specified ActionListener so it no longer receives action events.

Parameters:
listener - the listener to remove
See Also:
ActionListener, addActionListener(java.awt.event.ActionListener)

removeAll

public void removeAll()
Removes all radio buttons from this RadioBox.

Overrides:
removeAll in class java.awt.Container

removeItemListener

public void removeItemListener(java.awt.event.ItemListener l)
Removes the specified ItemListener so it no longer receives item events.

Specified by:
removeItemListener in interface java.awt.ItemSelectable
Parameters:
l - the item listener to remove
See Also:
ItemListener, addItemListener(java.awt.event.ItemListener)

replaceItem

public void replaceItem(java.lang.Object newItem,
                        int index)
Replaces the item at the specified index with a new value. The item is transformed with the inputTransform before replacing the item in the model at the specified index.

Parameters:
newItem - new value of the item being replaced
index - index of the item to replace

setBackground

public void setBackground(java.awt.Color c)
Sets the background of the RadioBox and all of its subcomponents.

Overrides:
setBackground in class java.awt.Component
Parameters:
c - the background color

setEnabled

public void setEnabled(boolean enabled)
Sets the whether the RadioBox and its components are disabled or not.

Specified by:
setEnabled in interface VisualInterface
Overrides:
setEnabled in class ContainerVisualComponent
Parameters:
enabled - true to enable false to disable
See Also:
VisualInterface.setEnabled(boolean)

setForeground

public void setForeground(java.awt.Color c)
Sets the foreground of the RadioBox and all of its subcomponents.

Overrides:
setForeground in class java.awt.Component
Parameters:
c - the foreground color

setDefaultValues

public void setDefaultValues()
Sets the initial values of the RadioBox.

Specified by:
setDefaultValues in interface ContainerInterface
Specified by:
setDefaultValues in interface VisualInterface
Specified by:
setDefaultValues in interface com.sas.ComponentInterface
Overrides:
setDefaultValues in class CompositeContainer
See Also:
ContainerInterface.setDefaultValues()

setDeselectable

public void setDeselectable(boolean state)
Sets the deselectable property of the SelectionGroupInterface object. Allows all radio buttons to be in the deselected state at the same time.

Parameters:
state - the state of the deselectable property.
See Also:
SelectionGroupInterface.setDeselectable(boolean), isDeselectable()

setDisplayTransform

public void setDisplayTransform(com.sas.util.transforms.TransformInterface transform)
Sets the DisplayTransform for the RadioBox. Transforms all Item properties into display form. The default transform is null, which does an IdentityTransform.

Parameters:
transform - the displayTransform
See Also:
getDisplayTransform()

setInputTransform

public void setInputTransform(com.sas.util.transforms.TransformInterface transform)
Sets the input transform to be used when getting items in the RadioBox. The default transform is null, which does an IdentityTransform.

Parameters:
transform - the inputTransform
See Also:
getInputTransform()

setOutputTransform

public void setOutputTransform(com.sas.util.transforms.TransformInterface transform)
Sets the output transform to be used when setting items in the RadioBox. The default transform is null, which does an IdentityTransform.

Parameters:
transform - the outputTransform
See Also:
getOutputTransform()

setRadioButtonClass

public void setRadioButtonClass(java.lang.Class rClass)
Sets the name of the SelectableInterface class to create when addItem(object) is called. The class must also derive from java.awt.Component.

Parameters:
className - the name of the new SelectableInterface class
See Also:
getRadioButtonClass()

setSelectionGroup

public void setSelectionGroup(SelectionGroupInterface selectionGroup)
Sets the SelectionGroup that contains all of the radio buttons. This will not remove or add radio buttons to the model or the RadioBox if the selectionGroup already has some members.

Parameters:
selectionGroup - the new SelectionGroup
See Also:
getSelectionGroup()

setSelectedIndex

public void setSelectedIndex(int index)
Sets the selected item in this SelectionGroup to the item at the specified position

Parameters:
index - selected item position
See Also:
getSelectedIndex()

setSelectedItem

public void setSelectedItem(java.lang.Object item)
Sets the selected item in this RadioBox to be the radio button whose item matches the specified object. If more than one radio button matches the specified object, the one with the smallest index is selected. The item will be transformed with the inputTransform before being selected.

Parameters:
item - object of the SelectableInterface object to select
See Also:
setSelectedItem(java.lang.Object)

setText

public void setText(java.lang.String txt)
Set the selectedItem to the specified text. This method calls the setSelectedItem(String) method with the specified String.

Specified by:
setText in interface com.sas.lang.StringDataInterface
Parameters:
txt - the String to pass to setSelectedItem(String)
See Also:
setSelectedItem(java.lang.Object), getText()

setTransparent

public void setTransparent(boolean t)
Sets the RadioBox and all of its components transparent.

Specified by:
setTransparent in interface VisualInterface
Overrides:
setTransparent in class ContainerVisualComponent
Parameters:
t - if true the RadioBox will be transparent; false, it will not be transparent
See Also:
VisualInterface.setTransparent(boolean)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.