Name

javax.microedition.lcdui.ChoiceGroup

Synopsis

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 classChoiceGroup extends Item implements Choice {
   // public constructors
   public ChoiceGroup(String label, int choiceType);
   public ChoiceGroup(String label, int choiceType, String[] stringElements, 
          Image[] imgElements);
   // public instance methods
   public int append(String stringPart, Image imagePart);
   public void delete(int elementNum);
   public Image getImage(int elementNum);
   public int getSelectedFlags(boolean[] selectedArray);
   public int getSelectedIndex(  );
   public String getString(int elementNum);
   public void insert(int elementNum, String stringElement, Image imageElement);
   public boolean isSelected(int elementNum);
   public void set(int elementNum, String stringPart, Image imagePart);
   public void setsSelectedFlags(boolean[] selectedArray);
   public void setSelectedIndex(int elementNum, boolean selected);
   public int size(  );
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.