framework
Class CheckBoxElement

java.lang.Object
  extended by no.tellu.cdlc.gui.GuiElement
      extended by framework.CheckBoxElement
All Implemented Interfaces:
no.tellu.cdlc.gui.ElementListner

public class CheckBoxElement
extends no.tellu.cdlc.gui.GuiElement

CheckBoxelement.java

Draws (a) check box(es).

The check box alternatives are set in the choices vector by calling setChoices(Vector choices).

Pressing fire checks/unchecks the selected check box.


Field Summary
 
Fields inherited from class no.tellu.cdlc.gui.GuiElement
ANY, DECIMAL, EMAILADDR, NUMERIC, PASSWORD, PASSWORD_NUMERIC, PHONENUMBER, URL
 
Constructor Summary
CheckBoxElement()
          Constructor CheckBoxElement
 
Method Summary
 void elementLayoutManager()
          Controls the height of the check box element.
 boolean fire(int key)
          Sets the check box to be chosen if it is not already, and unchooses it if it is chosen.
 void paint(javax.microedition.lcdui.Graphics g, boolean selected)
          Paints the check box, its text and a dotted rectangle around it if it is selected.
 void setChoices(java.util.Vector choices)
          Sets the check box alternative(s).
 
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, moveLeft, moveRight, 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

CheckBoxElement

public CheckBoxElement()
Constructor CheckBoxElement

Method Detail

elementLayoutManager

public void elementLayoutManager()
Controls the height of the check box element.

Overrides:
elementLayoutManager in class no.tellu.cdlc.gui.GuiElement

paint

public void paint(javax.microedition.lcdui.Graphics g,
                  boolean selected)
Paints the check box, its text and a dotted rectangle around it if it is selected.

Overrides:
paint in class no.tellu.cdlc.gui.GuiElement

setChoices

public void setChoices(java.util.Vector choices)
Sets the check box alternative(s).

Parameters:
choices - a vector containing string alternatives

fire

public boolean fire(int key)
Sets the check box to be chosen if it is not already, and unchooses it if it is chosen.

Overrides:
fire in class no.tellu.cdlc.gui.GuiElement