public class CheckBoxGroup extends Vector implements EventListener, Textable, Intable
Modifier and Type | Field and Description |
---|---|
boolean |
exclusive |
boolean |
takeTarget
If takeTarget is true then ControlEvent.PRESSED events generated by the individual
boxes will have its target changed so that it appears to be coming from this group.
|
capacityIncrement, elementCount, elementData
serialVersionUID
Constructor and Description |
---|
CheckBoxGroup() |
Modifier and Type | Method and Description |
---|---|
CheckBoxGroup |
addCheck(CheckBox what)
Deprecated.
- do not use this, use CheckBox.setGroup() to add an CheckBox.
|
int |
getInt()
This returns the same value as getSelectedIndex().
|
CheckBox |
getSelected()
Returns the CheckBox currently selected.
|
int |
getSelectedIndex()
Returns the index of the CheckBox currently selected.
|
String |
getText()
Return the label of the selected checkbox, or an empty String if none
is selected.
|
void |
makePanel(String[] choices,
CellPanel destination,
int columns)
This creates a set of new CheckBox controls, each one of which is assigned a label
as specified in the choices parameter.
|
void |
onEvent(Event ev) |
void |
selectIndex(int index)
Select the CheckBox at the given index.
|
void |
setInt(int value)
This calls selectIndex() with the provided value.
|
void |
setText(String value)
This will turn on the checkbox in this group with a label the same
as the provided String value.
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, setElementAt, setSize, size, toArray, toArray, toString, trimToSize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
public boolean exclusive
public boolean takeTarget
public int getSelectedIndex()
public CheckBox getSelected()
public void selectIndex(int index)
public void onEvent(Event ev)
public void setInt(int value)
public int getInt()
public void setText(String value)
public String getText()
public void makePanel(String[] choices, CellPanel destination, int columns)
choices
- a list of lables for each checkbox.destination
- a destination panel to add to.columns
- the number of columns to add.public CheckBoxGroup addCheck(CheckBox what)