|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.swing.visuals.TriStateCheckBox
public class TriStateCheckBox
An implementation of a tri-state check box -- an item that can be selected, deselected, or in a mixed state and which displays its state to the user. By convention, any number of check boxes in a group can be selected. See How to Use Buttonc, Check Boxes, and Radio Buttons in The Java Tutorial for examples and information on using check boxes.
| Nested Class Summary | |
|---|---|
static class |
TriStateCheckBox.TriStateCheckBoxModel
The TriStateCheckBox model |
| Field Summary | |
|---|---|
static int |
MIXED
Value representing mixed, or in the indeterminate state |
static int |
OFF
Value representing not selected |
static int |
ON
Value representing selected |
static java.lang.String |
RB_KEY
|
| Constructor Summary | |
|---|---|
TriStateCheckBox()
Creates an initially unselected check box button with no text, no icon. |
|
TriStateCheckBox(javax.swing.Icon icon)
Creates an initially unselected check box with an icon. |
|
TriStateCheckBox(javax.swing.Icon icon,
boolean selected)
Creates a check box with an icon and specifies whether or not it is initially selected. |
|
TriStateCheckBox(javax.swing.Icon icon,
int value)
Creates a check box with an icon and specifies its initial value. |
|
TriStateCheckBox(java.lang.String text)
Creates an initially unselected check box with text. |
|
TriStateCheckBox(java.lang.String text,
boolean selected)
Creates a check box with text and specifies whether or not it is initially selected. |
|
TriStateCheckBox(java.lang.String text,
javax.swing.Icon icon)
Creates an initially unselected check box with the specified text and icon. |
|
TriStateCheckBox(java.lang.String text,
javax.swing.Icon icon,
boolean selected)
Creates a check box with text and icon, and specifies whether or not it is initially selected. |
|
TriStateCheckBox(java.lang.String text,
javax.swing.Icon icon,
int value)
Creates a check box with text and icon, and specifies whether or not it is initially selected. |
|
TriStateCheckBox(java.lang.String text,
int value)
Creates a check box with text and specifies its initial value. |
|
| Method Summary | |
|---|---|
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to
augment the automatically introspected information about this TriStateCheckBox. |
int |
getSelectedValue()
Returns the current value of the checkBox. |
boolean |
isCycleEnabled()
Returns whether the checkbox cycles through all three values. |
void |
setCycleEnabled(boolean b)
Sets whether the checkBox should cycle through all three values. |
void |
setSelectedValue(int value)
Sets the current value of the checkBox. |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
public static final int OFF
public static final int MIXED
public static final int ON
| Constructor Detail |
|---|
public TriStateCheckBox()
public TriStateCheckBox(javax.swing.Icon icon)
icon - the Icon image to display
public TriStateCheckBox(javax.swing.Icon icon,
boolean selected)
icon - the Icon image to displayselected - a boolean value indicating the initial selection
state. If true the check box is selected
public TriStateCheckBox(javax.swing.Icon icon,
int value)
icon - the Icon image to displayvalue - an integer indicating the initial selection state.public TriStateCheckBox(java.lang.String text)
text - the text of the check box.
public TriStateCheckBox(java.lang.String text,
boolean selected)
text - the text of the check box.selected - a boolean value indicating the initial selection
state. If true the check box is selected
public TriStateCheckBox(java.lang.String text,
int value)
text - the text of the check box.value - an integer indicating the initial selection state.
public TriStateCheckBox(java.lang.String text,
javax.swing.Icon icon)
text - the text of the check box.icon - the Icon image to display
public TriStateCheckBox(java.lang.String text,
javax.swing.Icon icon,
boolean selected)
text - the text of the check box.icon - the Icon image to displayselected - a boolean value indicating the initial selection
state. If true the check box is selected
public TriStateCheckBox(java.lang.String text,
javax.swing.Icon icon,
int value)
text - the text of the check box.icon - the Icon image to displayvalue - an integer indicating the initial selection state.| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
com.sas.beans.Introspector to
augment the automatically introspected information about this TriStateCheckBox.
public void setCycleEnabled(boolean b)
b - if true, the checkBox cycles,
or else the checkBox switches between ON and OFF once those values
have been reached.public boolean isCycleEnabled()
public void setSelectedValue(int value)
value - The new value of the checkBoxpublic int getSelectedValue()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||