jMobileCore toolkit

com.jmobilecore.ui.core
Class ListCheckbox

java.lang.Object
  extended by com.jmobilecore.ui.core.Component
      extended by com.jmobilecore.ui.core.Label
          extended by com.jmobilecore.ui.core.SimpleCheckbox
              extended by com.jmobilecore.ui.core.ListCheckbox
All Implemented Interfaces:
ListComponent

public class ListCheckbox
extends SimpleCheckbox
implements ListComponent


Field Summary
protected  java.lang.Object actionCommand
          This field indicates the command has been issued by a particular list checkbox.
protected  int shortcut
          A key stoke that ia associated with a list checkbox.
 
Fields inherited from class com.jmobilecore.ui.core.SimpleCheckbox
state
 
Fields inherited from class com.jmobilecore.ui.core.Label
text
 
Fields inherited from class com.jmobilecore.ui.core.Component
alignment, background, CENTER, focusable, focusedBackground, focusedForeground, font, foreground, height, isCompletelyVisible, isFocused, isVisible, LEFT, parentScreen, RIGHT, screenY, valid, width
 
Constructor Summary
ListCheckbox(java.lang.String label, boolean state)
          Create a list checkbox
ListCheckbox(java.lang.String label, javax.microedition.lcdui.Font font, boolean state, int shortcut)
          Create a list checkbox with an associated keyboard shortcut.
ListCheckbox(java.lang.String label, javax.microedition.lcdui.Font font, boolean state, int shortcut, java.lang.Object action)
          Create a list checkbox with an associated keyboard shortcut and custom action.
 
Method Summary
 void destructor()
          Class destructor.
 java.lang.Object getAction()
          Get the object representing the ListCheckbox's action This method is required by ListComponent interface
 int getShortcut()
          Get the key code shortcut for this ListCheckbox This method is required by ListComponent interface
 void setAction(java.lang.Object action)
          Sets the object as ListCheckbox's action This method is required by ListComponent interface
 void setShortcut(int shortcut)
          Sets the key code shortcut for this ListCheckbox This method is required by ListComponent interface
 
Methods inherited from class com.jmobilecore.ui.core.SimpleCheckbox
keyPressed, paint
 
Methods inherited from class com.jmobilecore.ui.core.Label
createTitleLabel, getText, setText
 
Methods inherited from class com.jmobilecore.ui.core.Component
getBackground, getFont, getForeground, getHeight, getWidth, invalidate, isFocusOwner, keyReleased, keyRepeated, paintBackground, pointerDragged, pointerPressed, pointerReleased, prepareForeground, releaseFocus, requestFocus, setFont, setHeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jmobilecore.ui.core.ListComponent
getFont, getText, setFont, setText
 

Field Detail

actionCommand

protected java.lang.Object actionCommand
This field indicates the command has been issued by a particular list checkbox. By default the actionCommand is the label of the list checkbox, unless it has been explicitly set to a different value.


shortcut

protected int shortcut
A key stoke that ia associated with a list checkbox. To remove you have to assign to it PlatformCanvas.KEY_UNDEFINED value

Constructor Detail

ListCheckbox

public ListCheckbox(java.lang.String label,
                    boolean state)
Create a list checkbox

Parameters:
label - the label for this list checkbox.

ListCheckbox

public ListCheckbox(java.lang.String label,
                    javax.microedition.lcdui.Font font,
                    boolean state,
                    int shortcut)
Create a list checkbox with an associated keyboard shortcut.

Parameters:
label - the label for this list checkbox.
font - the label font
shortcut - key code associated witha list checkbox

ListCheckbox

public ListCheckbox(java.lang.String label,
                    javax.microedition.lcdui.Font font,
                    boolean state,
                    int shortcut,
                    java.lang.Object action)
Create a list checkbox with an associated keyboard shortcut and custom action.

Parameters:
label - the label for this list checkbox.
font - the label font
shortcut - key code associated witha list checkbox.
action - custom action for the ListCheckbox
Method Detail

destructor

public void destructor()
Class destructor. Helps VM to perform garbage collection

Overrides:
destructor in class Component

getAction

public java.lang.Object getAction()
Get the object representing the ListCheckbox's action This method is required by ListComponent interface

Specified by:
getAction in interface ListComponent
Returns:
the object associated with this ListLabel

getShortcut

public int getShortcut()
Get the key code shortcut for this ListCheckbox This method is required by ListComponent interface

Specified by:
getShortcut in interface ListComponent
Returns:
the keycode shortcut

setAction

public void setAction(java.lang.Object action)
Sets the object as ListCheckbox's action This method is required by ListComponent interface

Specified by:
setAction in interface ListComponent
Parameters:
action - the object - new action value

setShortcut

public void setShortcut(int shortcut)
Sets the key code shortcut for this ListCheckbox This method is required by ListComponent interface

Specified by:
setShortcut in interface ListComponent
Parameters:
shortcut - the keycode - new shortcut value

jMobileCore toolkit