|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.tellu.cdlc.gui.GuiElement
framework.RadioButtonElement
public class RadioButtonElement
RadioButtonelement.java
Draws radio buttons The radio button alternatives are set in the choices vector by calling setChoices(Vector choices). Pressing fire activates the radio button element. Selecting a different button is then done by pressing right/left.
Field Summary |
---|
Fields inherited from class no.tellu.cdlc.gui.GuiElement |
---|
ANY, DECIMAL, EMAILADDR, NUMERIC, PASSWORD, PASSWORD_NUMERIC, PHONENUMBER, URL |
Constructor Summary | |
---|---|
RadioButtonElement()
Constructor RadioButtonElement |
|
RadioButtonElement(java.lang.String elementId)
Constructor RadioButtonElement |
Method Summary | |
---|---|
void |
elementLayoutManager()
Updates the width and the height of the RadioButtonElement |
boolean |
fire(int key)
Activates the radio buttons if they're not, deactivates them otherwise. |
int |
getSelectedIndex()
|
java.lang.String |
getStringValue()
|
boolean |
moveLeft(int x)
Handles the selection of radio buttons when the key for moving left is pressed. |
boolean |
moveRight(int x)
Handles the selection of radio buttons when the key for moving right is pressed. |
void |
paint(javax.microedition.lcdui.Graphics g,
boolean selected)
Paints the radio buttons, their text and a dotted rectangle around the selected radio button. |
void |
setChoices(java.util.Vector choices)
Sets the radio buttons' alternatives. |
Methods inherited from class no.tellu.cdlc.gui.GuiElement |
---|
backPressed, callbackAction, changeFont, charPressed, clearButton, clearFields, contains, countCharactersToWidth, countCharactersToWidth, drawBorder, drawBorder, drawString, drawString, getComponentAt, getCurrGuiElement, getElement, getElementId, getFieldColour, getFieldType, getFont, getFontColour, getHeight, getHelpString, getInnerheight, getInnerWidth, getInsetBottom, getInsetLeft, getInsetRight, getInsetTop, getLabel, getLineColour, getMaxCharacters, getMaxHeight, getMaxWidth, getMinCharacters, getParent, getPreferredHeight, getPreferredWidth, getSoundFileName, getValue, getWidth, getWidtOfString, getWidtOfString, getX, getY, init, isAllElementsComplete, isBorderVisible, isEditable, isFocused, isHidden, isInputValidated, isLayoutNeeded, isMaximumSizeSet, isPreferredHeightSizeSet, isPreferredSizeSet, isPreferredWidhtSizeSet, isSelectable, isVisible, moveDown, moveToShow, moveUp, numberPressed, paint, paint, poundPressed, remove, replaceTabInString, setAutoLayout, setBorderVisible, setBounds, setDrawBackground, setEditable, setElementId, setElementListner, setElementPosition, setFieldType, setFocused, setFont, setFrameSize, setGroupElement, setHeight, setHelpString, setHidden, setInsetBottom, setInsetLeft, setInsetRight, setInsets, setInsetTop, setLabel, setLayoutNeeded, setLayoutNeeded, setMaxCharacters, setMaximumSize, setMinCharacters, setParent, setPreferredSize, setSelectable, setSize, setSoundFileName, setWidth, setX, setY, starPressed, truncate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RadioButtonElement()
public RadioButtonElement(java.lang.String elementId)
elementId
- The id of the object of this classMethod Detail |
---|
public void elementLayoutManager()
elementLayoutManager
in class no.tellu.cdlc.gui.GuiElement
public void paint(javax.microedition.lcdui.Graphics g, boolean selected)
paint
in class no.tellu.cdlc.gui.GuiElement
public void setChoices(java.util.Vector choices)
choices
- a vector containing string alternativespublic java.lang.String getStringValue()
public int getSelectedIndex()
public boolean moveLeft(int x)
moveLeft
in class no.tellu.cdlc.gui.GuiElement
public boolean moveRight(int x)
moveRight
in class no.tellu.cdlc.gui.GuiElement
public boolean fire(int key)
fire
in class no.tellu.cdlc.gui.GuiElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |