|
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.JCheckBox | +--com.sssw.rt.jform.AgcJCheckBox
A lightweight component that displays a check box with a text label. The AgcJCheckBox control can be bound to a database column.
A check box 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. You can specify source values for the Object value by setting the control's checked and unchecked values. When the control changes its selected state, the appropriate value (checked or unchecked) becomes the current value.
To get or change the boolean state of the control, call
AbstractButton.isSelected()
or AbstractButton.setSelected(boolean)
. You can also
call AgcJCheckBox.setValue(Object)
so that the argument value
matches the control's checked or unchecked value.
To get or change the Object values, call:
AgcJCheckBox.getCheckedValue()
or AgcJCheckBox.setCheckedValue(Object)
AgcJCheckBox.getUncheckedValue()
or AgcJCheckBox.setUncheckedValue(Object)
AgcJCheckBox.getValue()
or AgcJCheckBox.setValue(Object)
Unlike radio button controls, check box controls work independently of one another. Each check box can be bound to a different database column and represent different conditions.
Inner classes inherited from class javax.swing.JCheckBox |
JCheckBox.AccessibleJCheckBox |
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 | |
AgcJCheckBox()
Creates an initially unselected checkbox button with no text or icon. |
|
AgcJCheckBox(Icon icon)
Creates an initially unselected checkbox with an icon. |
|
AgcJCheckBox(Icon icon,
boolean selected)
Creates a checkbox with an icon and specifies whether or not it is initially selected. |
|
AgcJCheckBox(String text)
Creates an initially unselected checkbox with text. |
|
AgcJCheckBox(String text,
boolean selected)
Creates a checkbox with text and specifies whether or not it is initially selected. |
|
AgcJCheckBox(String text,
Icon icon)
Creates an initially unselected checkbox with the specified text and icon. |
|
AgcJCheckBox(String text,
Icon icon,
boolean selected)
Creates a checkbox with a text label and an icon, and specifies whether or not it is initially selected. |
Method Summary | |
Object |
getCheckedValue()
Gets the button's "checked value" - the value assigned to the check box when it is selected. |
boolean |
getState()
Deprecated. use isSelected() . |
Object |
getUncheckedValue()
Gets the button's "unchecked value" - the value assigned to the check box when it is not selected. |
Object |
getValue()
Gets the user-specified Object mapped to the current button state. |
void |
setCheckedValue(Object value)
Sets the button's "checked value" - the value assigned to the check box when it is selected. |
void |
setState(boolean state)
Deprecated. use setSelected() . |
void |
setUncheckedValue(Object value)
Sets the button's "unchecked value" - the value assigned to the check box when it is not selected. |
void |
setValue(Object value)
Sets the button's state, based on the value. |
Methods inherited from class javax.swing.JCheckBox |
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 AgcJCheckBox()
public AgcJCheckBox(Icon icon)
icon
- the image associated with the checkboxpublic AgcJCheckBox(Icon icon, boolean selected)
icon
- the image associated with the checkboxselected
- the initial selection state.
If true the checkbox is initially selected.public AgcJCheckBox(String text)
text
- the text labeling the checkboxpublic AgcJCheckBox(String text, boolean selected)
text
- the text labeling the checkboxselected
- the initial selection state.
If true the checkbox is initially selected.public AgcJCheckBox(String text, Icon icon)
text
- the text labeling the checkboxicon
- the image associated with the checkboxpublic AgcJCheckBox(String text, Icon icon, boolean selected)
text
- the text labeling the checkboxicon
- the image associated with the checkboxselected
- the initial selection state.
If true the checkbox is initially selected.Method Detail |
public void setCheckedValue(Object value)
value
- an Object that becomes the control's value when the check
box is selectedsetModel()
method.AgcJCheckBox.getCheckedValue()
,
AgcJCheckBox.getValue()
,
AgcJCheckBox.setValue(Object)
public Object getCheckedValue()
setModel()
method.AgcJCheckBox.setCheckedValue(Object)
,
AgcJCheckBox.getValue()
,
AgcJCheckBox.setValue(Object)
public void setUncheckedValue(Object value)
value
- an Object that becomes the control's value when the
check box is not selectedsetModel()
method.AgcJCheckBox.getUncheckedValue()
,
AgcJCheckBox.setCheckedValue(Object)
,
AgcJCheckBox.getValue()
,
AgcJCheckBox.setValue(Object)
public Object getUncheckedValue()
setModel()
method.AgcJCheckBox.setUncheckedValue(Object)
,
AgcJCheckBox.getCheckedValue()
,
AgcJCheckBox.getValue()
,
AgcJCheckBox.setValue(Object)
public void setValue(Object value)
value
- an Object that will be the check box valuesetValue()
doesn't change the checked and unchecked values. The
value you specify with setValue()
will be reset to the checked or
unchecked value if the user changes the button's state.
This method works only if the check box uses the default data model.
AgcJCheckBox
uses the default data model when no other model has been set using the setModel()
method.
AgcJCheckBox.getValue()
public Object getValue()
setValue()
, that value is
returned.
This method works only if the check box uses the default data model.
AgcJCheckBox
uses the default data model when no other model has been set using the setModel()
method.
AgcJCheckBox.setValue(Object)
public void setState(boolean state)
setSelected()
.
public boolean getState()
isSelected()
.
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |