|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.AbstractButton | +--javax.swing.JToggleButton | +--javax.swing.JRadioButton | +--com.sssw.rt.jform.AgcJRadioButton
A lightweight component that displays a radio button with a text label. A radio button control has a boolean value indicating whether it is selected. It also has an Object value that is stored in the database when the control is bound to a database column.
Several radio buttons are generally grouped together so that only one is selected at a time. The checked value for the selected button becomes the value of all the buttons in the group. When using data-binding, all the buttons in the group should be bound to a single database column. The checked value for the selected button is the value stored in the database.
In the Form Designer, you create a group by
specifying the same group name (using the Group property)
for each radio button control. You can use the Rectangle control to
visually group radio button controls. You can call AgcJRadioButton.getButtonGroup()
and AgcJRadioButton.setButtonGroup(String)
to manage button
grouping in code.
In the Form Designer, you can specify a value of any data type for each button. This is equivalent to calling setCheckedValue() for the control.
There are several methods for dealing with the button's state and values:
AbstractButton.isSelected()
or AbstractButton.setSelected(boolean)
.
AgcJRadioButton.getCheckedValue()
or AgcJRadioButton.setCheckedValue(Object)
.
AgcJRadioButton.getValue()
.
AgcJRadioButton.setValue(Object)
.
Inner classes inherited from class javax.swing.JRadioButton |
JRadioButton.AccessibleJRadioButton |
Inner classes inherited from class javax.swing.JToggleButton |
JToggleButton.AccessibleJToggleButton,
JToggleButton.ToggleButtonModel |
Inner classes inherited from class javax.swing.AbstractButton |
AbstractButton.AccessibleAbstractButton,
AbstractButton.ButtonChangeListener |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AgcJRadioButton()
Creates an initially unselected radio button with no text. |
|
AgcJRadioButton(Icon icon)
Creates an initially unselected radio button with the specified image but no text. |
|
AgcJRadioButton(Icon icon,
boolean selected)
Creates a radio button with the specified image and selection state, but no text. |
|
AgcJRadioButton(String text)
Creates an unselected radio button with the specified text. |
|
AgcJRadioButton(String text,
boolean selected)
Creates a radio button with the specified text and selection state. |
|
AgcJRadioButton(String text,
Icon icon)
Creates a radio button that has the specified text and image, and that is initially unselected. |
|
AgcJRadioButton(String text,
Icon icon,
boolean selected)
Creates a radio button that has the specified text, image, and selection state. |
Method Summary | |
String |
getButtonGroup()
Gets the name of the button group for the radio button. |
Object |
getCheckedValue()
Gets the button's "checked value" - the value assigned to the button group when the current button is selected. |
boolean |
getState()
Deprecated. use isSelected(). |
Object |
getValue()
Gets the user-specified Object that is the current value for the button group. |
void |
setButtonGroup(String buttongroup)
Sets the name of the button group for the radio button. |
void |
setCheckedValue(Object value)
Sets the radio button's "checked value" - the value assigned to the button group when the current button is selected. |
void |
setState(boolean state)
Deprecated. use setSelected(). |
void |
setValue(Object value)
Selects one of the buttons in the button group, based on the value of Object. |
Methods inherited from class javax.swing.JRadioButton |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.form.AgiHelpInfo |
getHelpInfo,
setHelpInfo |
Constructor Detail |
public AgcJRadioButton()
public AgcJRadioButton(Icon icon)
icon
- the image displayed on the radio buttonpublic AgcJRadioButton(Icon icon, boolean selected)
icon
- the image displayed on the radio buttonselected
- if true, the button is initially selected;
otherwise, the button is initially unselectedpublic AgcJRadioButton(String text)
text
- the text label displayed on the radio buttonpublic AgcJRadioButton(String text, boolean selected)
text
- the text label displayed on the radio buttonselected
- if true, the button is initially selected;
otherwise, the button is initially unselectedpublic AgcJRadioButton(String text, Icon icon)
text
- the text label displayed on the radio buttonicon
- the image displayed on the radio buttonpublic AgcJRadioButton(String text, Icon icon, boolean selected)
text
- the text label displayed on the radio buttonicon
- the image displayed on the radio buttonMethod Detail |
public void setCheckedValue(Object value)
value
- an Object that becomes the group's value when the
radio button is selectedsetModel()
method.AgcJRadioButton.getCheckedValue()
,
AgcJRadioButton.getValue()
,
AgcJRadioButton.setValue(Object)
public Object getCheckedValue()
setModel()
method.AgcJRadioButton.setCheckedValue(Object)
,
AgcJRadioButton.getValue()
,
AgcJRadioButton.setValue(Object)
public void setValue(Object value)
value
- an Object whose value is intended to match the checked
value of a button in the button groupsetModel()
method.AgcJRadioButton.getValue()
public Object getValue()
setModel()
method.AgcJRadioButton.setValue(Object)
public void setState(boolean state)
AbstractButton.setSelected(boolean)
public boolean getState()
AbstractButton.isSelected()
public String getButtonGroup()
AgcJRadioButton.setButtonGroup(String)
public void setButtonGroup(String buttongroup)
buttongroup
- a String that is the group nameAgcJRadioButton.getButtonGroup()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |