org.kobjects.kui
Class KChoiceGroup

java.lang.Object
  extended by org.kobjects.kui.KItem
      extended by org.kobjects.kui.KChoiceGroup

public class KChoiceGroup
extends KItem


Field Summary
static int EXCLUSIVE
           
static int IMPLICIT
           
static int MULTIPLE
           
 java.lang.String[] options
           
static int POPUP
           
 boolean[] selected
           
 int type
           
 
Fields inherited from class org.kobjects.kui.KItem
align, APPEARANCE_BUTTON, APPEARANCE_COMPACT, APPEARANCE_FULLSCREEN, APPEARANCE_INDENT, APPEARANCE_INPUT, APPEARANCE_PLAIN, APPEARANCE_TAB, CONTENT, image, img0, img1, img2, imgCols, imgRows, imgX, imgY, LABEL, STATE_FOCUSSED, STATE_PRESSED, STATE_UNFOCUSSED
 
Constructor Summary
KChoiceGroup(java.lang.Object label, int type, java.lang.String[] options)
           
 
Method Summary
protected  int getPrefContentHeight(int w)
           
 int getSelectedIndex()
           
 java.lang.String getSelectedOption()
           
 void keyPressed(int code)
           
 void paint(Graphics g, int contentW, int contentH)
           
 void pointerPressed(int x, int y)
           
 void setSelectedIndex(int idx, boolean selected)
           
 boolean traverse(int dir, int w, int h, int[] inout)
           
 
Methods inherited from class org.kobjects.kui.KItem
getContentStyle, getLabel, getLabelStyle, getState, invalidate, keyReleased, keyRepeated, pointerDragged, pointerReleased, setContentStyle, setDefaultCommand, setImage, setImage, setLabel, setLabelStyle, setLayout, traverseOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCLUSIVE

public static final int EXCLUSIVE
See Also:
Constant Field Values

MULTIPLE

public static final int MULTIPLE
See Also:
Constant Field Values

IMPLICIT

public static final int IMPLICIT
See Also:
Constant Field Values

POPUP

public static final int POPUP
See Also:
Constant Field Values

type

public int type

options

public java.lang.String[] options

selected

public boolean[] selected
Constructor Detail

KChoiceGroup

public KChoiceGroup(java.lang.Object label,
                    int type,
                    java.lang.String[] options)
Method Detail

getPrefContentHeight

protected int getPrefContentHeight(int w)
Specified by:
getPrefContentHeight in class KItem

getSelectedOption

public java.lang.String getSelectedOption()

getSelectedIndex

public int getSelectedIndex()

paint

public void paint(Graphics g,
                  int contentW,
                  int contentH)
Specified by:
paint in class KItem

traverse

public boolean traverse(int dir,
                        int w,
                        int h,
                        int[] inout)
Overrides:
traverse in class KItem

keyPressed

public void keyPressed(int code)
Overrides:
keyPressed in class KItem

pointerPressed

public void pointerPressed(int x,
                           int y)
Overrides:
pointerPressed in class KItem

setSelectedIndex

public void setSelectedIndex(int idx,
                             boolean selected)