|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.RadioBox
public class RadioBox
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:
com.sas.visuals.RowColumnLayout
com.sas.visuals.SelectableInterface and
derive from java.awt.Component. The default radioButtonClass used is the com.sas.visuals.RadioButton.
| 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 interface com.sas.awt.ContainerInterface |
|---|
getComponents, getLayout, invalidate, setLayout, validate |
| Field Detail |
|---|
public static final java.lang.String defaultSelectionGroupClass
public static final java.lang.String defaultRadioButtonClass
protected transient boolean noPrevAdd
| Constructor Detail |
|---|
public RadioBox()
| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
com.sas.beans.Introspector to
augment the automatically introspected information about this RadioBox.
public static int getDefaultHeight()
setDefaultHeight(int)public static int getDefaultWidth()
setDefaultWidth(int)public static void setDefaultHeight(int newHeight)
newHeight - the desired default height in pixelsgetDefaultHeight()public static void setDefaultWidth(int newWidth)
newWidth - the desired default width in pixelssetDefaultWidth(int)public void addItem(java.lang.Object item)
item - item of the SelectableInterface object to be added.
public void addItem(java.lang.Object item,
int index)
item - item of the SelectableInterface object to be added.index - zero-based index of item to add, or -1 to add at the end
protected void addModelItem(java.lang.Object item,
int index)
item - item value of radioButtonindex - index of radioButton addedpublic void addActionListener(java.awt.event.ActionListener listener)
listener - the action listener to receive eventsActionListener,
removeActionListener(java.awt.event.ActionListener)
protected void addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
addImpl in class java.awt.Containercomp - the component to addconstraints - the constraints on the componentindex - the index to add the component atpublic void addItemListener(java.awt.event.ItemListener l)
addItemListener in interface java.awt.ItemSelectablel - the listener to receive eventsItemListener,
removeItemListener(java.awt.event.ItemListener)public void contentsChanged(com.sas.collection.ContentsChangedEvent evt)
contentsChanged in interface com.sas.collection.ContentsChangedListenerevt - the ContentsChangedEvent from the model that changed.ContentsChangedListener.contentsChanged(com.sas.collection.ContentsChangedEvent)public void detachModel(com.sas.ModelInterface model)
detachModel in interface com.sas.ViewInterfacedetachModel in class ContainerVisualComponentmodel - the model to detachViewInterface.detachModel(com.sas.ModelInterface)
public int dragOver(java.awt.Point point,
int representation,
int keyState,
java.util.Vector data)
dragOver in interface ContainerInterfacedragOver in interface com.sas.DesignTimeDropTargetInterfacedragOver in class ContainerContainerComponentpoint - 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.
DesignTimeDropTargetInterface.dragOver(java.awt.Point, int, int, java.util.Vector)public com.sas.util.transforms.TransformInterface getDisplayTransform()
setDisplayTransform(com.sas.util.transforms.TransformInterface)public com.sas.util.transforms.TransformInterface getInputTransform()
setInputTransform(com.sas.util.transforms.TransformInterface)public java.lang.String[] getInitialItems()
setInitialItems(java.lang.String[])public void setInitialItems(java.lang.String[] items)
items - string array of items to add to the defaultModelgetInitialItems()public java.lang.Object getItem(int index)
index - index of the RadioButton item property to be returned.
public com.sas.util.transforms.TransformInterface getOutputTransform()
setOutputTransform(com.sas.util.transforms.TransformInterface)public java.lang.Class getRadioButtonClass()
setRadioButtonClass(java.lang.Class)public java.util.Vector getRequiredInterfaces()
getRequiredInterfaces in interface com.sas.ViewInterfacegetRequiredInterfaces in class ContainerVisualComponentViewInterface.getRequiredInterfaces()public SelectionGroupInterface getSelectionGroup()
setSelectionGroup(com.sas.visuals.SelectionGroupInterface)public int getSelectedIndex()
setSelectedIndex(int),
SelectionGroupInterface.getSelectedIndex()public java.lang.Object getSelectedItem()
setSelectedItem(java.lang.Object),
SelectionGroupInterface.getSelectedItem()public java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectableItemSelectable,
ItemSelectable.getSelectedObjects()public java.lang.String getText()
getText in interface com.sas.lang.StringDataInterfacegetSelectedItem(),
setText(java.lang.String)public boolean isDefaultModelAttached()
isDefaultModelAttached in interface com.sas.ViewDefaultModelInterfacedetachModel(com.sas.ModelInterface)public boolean isDeselectable()
true if radio buttons can be toggled to unselected.setDeselectable(boolean),
SelectionGroupInterface.isDeselectable()public void initialize()
initialize in interface com.sas.ComponentInterfaceinitialize in class ContainerVisualComponentComponentInterface.initialize()public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerItemListener.itemStateChanged(java.awt.event.ItemEvent)protected void processEvent(java.awt.AWTEvent e)
processEvent in class java.awt.Containere - the AWTEvent that was changedprotected void processActionEvent(java.awt.event.ActionEvent e)
e - the action eventComponent.enableEvents(long)protected void processItemEvent(java.awt.event.ItemEvent e)
e - the item eventComponent.enableEvents(long)public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class ContainerVisualComponentevent - the property event that was changedPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)public void refresh(com.sas.ModelInterface model)
refresh in interface com.sas.ViewInterfacerefresh in class ContainerVisualComponentmodel - model to be be refreshed and displayed on radio buttonsViewInterface.refresh(com.sas.ModelInterface)public void remove(int index)
remove in class java.awt.Containerindex - index of the item to removepublic void removeItem(java.lang.Object item)
item - radio button to removepublic void removeActionListener(java.awt.event.ActionListener listener)
listener - the listener to removeActionListener,
addActionListener(java.awt.event.ActionListener)public void removeAll()
removeAll in class java.awt.Containerpublic void removeItemListener(java.awt.event.ItemListener l)
removeItemListener in interface java.awt.ItemSelectablel - the item listener to removeItemListener,
addItemListener(java.awt.event.ItemListener)
public void replaceItem(java.lang.Object newItem,
int index)
newItem - new value of the item being replacedindex - index of the item to replacepublic void setBackground(java.awt.Color c)
setBackground in class java.awt.Componentc - the background colorpublic void setEnabled(boolean enabled)
setEnabled in interface VisualInterfacesetEnabled in class ContainerVisualComponentenabled - true to enable false to disableVisualInterface.setEnabled(boolean)public void setForeground(java.awt.Color c)
setForeground in class java.awt.Componentc - the foreground colorpublic void setDefaultValues()
setDefaultValues in interface ContainerInterfacesetDefaultValues in interface VisualInterfacesetDefaultValues in interface com.sas.ComponentInterfacesetDefaultValues in class CompositeContainerContainerInterface.setDefaultValues()public void setDeselectable(boolean state)
state - the state of the deselectable property.SelectionGroupInterface.setDeselectable(boolean),
isDeselectable()public void setDisplayTransform(com.sas.util.transforms.TransformInterface transform)
transform - the displayTransformgetDisplayTransform()public void setInputTransform(com.sas.util.transforms.TransformInterface transform)
transform - the inputTransformgetInputTransform()public void setOutputTransform(com.sas.util.transforms.TransformInterface transform)
transform - the outputTransformgetOutputTransform()public void setRadioButtonClass(java.lang.Class rClass)
className - the name of the new SelectableInterface classgetRadioButtonClass()public void setSelectionGroup(SelectionGroupInterface selectionGroup)
selectionGroup - the new SelectionGroupgetSelectionGroup()public void setSelectedIndex(int index)
index - selected item positiongetSelectedIndex()public void setSelectedItem(java.lang.Object item)
item - object of the SelectableInterface object to selectsetSelectedItem(java.lang.Object)public void setText(java.lang.String txt)
setText in interface com.sas.lang.StringDataInterfacetxt - the String to pass to setSelectedItem(String)setSelectedItem(java.lang.Object),
getText()public void setTransparent(boolean t)
setTransparent in interface VisualInterfacesetTransparent in class ContainerVisualComponentt - if true the RadioBox will be transparent; false, it will not be transparentVisualInterface.setTransparent(boolean)
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||