|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.microedition.lcdui.Item
|
+--javax.microedition.lcdui.ChoiceGroup
A choice group provides a mechanism to select items
| Nested Class Summary | |
protected class |
ChoiceGroup.Peer
Peer class that does the drawing |
| Nested classes inherited from class javax.microedition.lcdui.Item |
|
| Field Summary |
| Fields inherited from class javax.microedition.lcdui.Item |
form, highlighted, label, peer |
| Fields inherited from interface javax.microedition.lcdui.Choice |
EXCLUSIVE, IMPLICIT, MULTIPLE |
| Constructor Summary | |
ChoiceGroup(java.lang.String label,
int type)
Create a new list |
|
ChoiceGroup(java.lang.String label,
int type,
java.lang.String[] strings,
Image[] images)
Create a new list specifying the contents of the list |
|
| Method Summary | |
int |
append(java.lang.String string,
Image image)
Append an element to the choice |
void |
delete(int pos)
Delete the element at the specified position |
Image |
getImage(int pos)
Get the image at the position |
int |
getSelectedFlags(boolean[] array)
Return the state of all the selections |
int |
getSelectedIndex()
Return the selected items index |
java.lang.String |
getString(int pos)
Get the string part of the element at the posiotion |
void |
insert(int pos,
java.lang.String string,
Image image)
Insert a new value before the specified element. |
boolean |
isSelected(int pos)
Return true if the item at the position is selected |
void |
set(int pos,
java.lang.String string,
Image image)
Set the element at the specified position to the new string and image |
void |
setSelectedFlags(boolean[] flags)
Set the selected state of every element |
void |
setSelectedIndex(int pos,
boolean selected)
Set the selection state of the item at the specified position |
int |
size()
Get the size of the choice |
| Methods inherited from class javax.microedition.lcdui.Item |
getLabel, setLabel |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ChoiceGroup(java.lang.String label,
int type)
label - The labeltype - The list type
IllegalArgumentException - if the type is not IMPLICIT, EXCLUSIVE or MULTIPLE
public ChoiceGroup(java.lang.String label,
int type,
java.lang.String[] strings,
Image[] images)
label - The labeltype - The list typestrings - The strings to displayimages - The images to display
NullPointerException - if strings is null
NullPointerException - if any of the strings is null
IllegalArgumentsException - if the images array is not null and has
a different length from the strings array
IllegalArgumentException - if the type is not IMPLICIT, EXCLUSIVE or MULTIPLE
IllegalArgumentException - if any image is multable| Method Detail |
public int append(java.lang.String string,
Image image)
append in interface Choicestring - The string part to appendimage - The image part to append
IllegalArgumentException - if the image is mutable
NullPointerException - if the string is nullpublic void delete(int pos)
delete in interface Choicepos - The position
IndexOutOfBoundsException - if the element is invalidpublic Image getImage(int pos)
getImage in interface Choicepos - The position
IndexOutOfBoundsException - if the element is invalidpublic int getSelectedFlags(boolean[] array)
getSelectedFlags in interface ChoiceIllegalArgumentException - if the array is too short
NullPointerException - if the array is nullpublic int getSelectedIndex()
getSelectedIndex in interface Choicepublic java.lang.String getString(int pos)
getString in interface Choicepos - The position
IndexOutOfBoundsException - if the element is invalid
public void insert(int pos,
java.lang.String string,
Image image)
insert in interface Choicepos - The position to insert in. The current item at that location is moved upstring - The string part to displayimage - The image part
IndexOutOfBoundsException - if the element is invalid
IllegalArgumentException - if the image is mutable
NullPointerException - if the string is nullpublic boolean isSelected(int pos)
isSelected in interface Choicepos - The position
IndexOutOfBoundsException - if the element is invalid
public void set(int pos,
java.lang.String string,
Image image)
set in interface Choicepos - The position to setstring - The string part to displayimage - The image part
IndexOutOfBoundsException - if the element is invalid
IllegalArgumentException - if the image is mutable
NullPointerException - if the string is nullpublic void setSelectedFlags(boolean[] flags)
setSelectedFlags in interface Choiceflags - The boolean array containing the selected states
IllegalArgumentException - if the array is too short
NullPointerException - if the array is null
public void setSelectedIndex(int pos,
boolean selected)
setSelectedIndex in interface Choicepos - The positionselected - True if it is selected, false otherwise
IndexOutOfBoundsException - if the element is invalidpublic int size()
size in interface Choice
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||