January 2002
Intermediate to advanced
264 pages
8h 3m
English
javax.microedition.lcdui.ChoiceGroup
This class implements a group of selectable elements intended to be placed within a Form. The group may have a mode that requires a single choice to be made or that allows multiple choices. It is up to the implementation to decide on the graphical representation of these modes, but it must provide visually different graphics for different modes—for example, radio buttons for single-choice mode and checkboxes for multiple-choice mode.
public classChoiceGroupextends Item implements Choice { // public constructors publicChoiceGroup(String label, int choiceType); publicChoiceGroup(String label, int choiceType, String[] stringElements, Image[] imgElements); // public instance methods public intappend(String stringPart, Image imagePart); public voiddelete(int elementNum); public ImagegetImage(int elementNum); public intgetSelectedFlags(boolean[] selectedArray); public intgetSelectedIndex( ); public StringgetString(int elementNum); public voidinsert(int elementNum, String stringElement, Image imageElement); public booleanisSelected(int elementNum); public voidset(int elementNum, String stringPart, Image imagePart); public voidsetsSelectedFlags(boolean[] selectedArray); public voidsetSelectedIndex(int elementNum, boolean selected); public intsize( ); }
Read now
Unlock full access