Name
javax.microedition.lcdui.Choice
Synopsis
This interface defines an API for user interface components, such as
List and ChoiceGroup,
implementing selection from a predefined number of choices. Each
element of a choice is composed of a text string and an optional
image. If you do not want the element to have an image, pass in
null.
There are three types of choices:
-
EXCLUSIVE Presents a series of elements and interacts with the user. When the user selects an element, it is shown to be selected using a distinct visual representation. Exactly one element must be selected at any given time.
-
IMPLICIT Serves as an
EXCLUSIVEchoice where the focused element is implicitly selected when a command is initiated.-
MULTIPLE Presents a series of elements and allows the user to select multiple elements.
public interface
Choice{ // public class fields public static final intEXCLUSIVE= 1; public static final intIMPLICIT= 2; public static final intMULTIPLE= 3; // 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 stringPart, Image imagePart); public booleanisSelected(int elementNum); public voidset(int elementNum, String stringPart, Image imagePart); public voidsetSelectedFlags(boolean[] selectedArray); public voidsetSelectedIndex ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access