danger.ui
Class CheckBoxGroup

java.lang.Object
  |
  +--danger.app.Listener
        |
        +--danger.ui.View
              |
              +--danger.ui.Container
                    |
                    +--danger.ui.Control
                          |
                          +--danger.ui.CheckBoxGroup
Direct Known Subclasses:
RadioGroup

public class CheckBoxGroup
extends Control

Composite control for managing a group of check boxes


Field Summary
static int kDefaultSpacing
           
 
Fields inherited from class danger.ui.Control
mValue
 
Fields inherited from class danger.ui.View
mOriginX, mOriginY, mStyle, STATE_CAN_FOCUS, STATE_DEBUG_BOUNDS, STATE_ENABLED, STATE_FOCUSED, STATE_TRANSPARENT, STATE_VISIBLE
 
Constructor Summary
CheckBoxGroup()
           
CheckBoxGroup(java.lang.String inGroupLabel, java.lang.String[] inLabels)
           
CheckBoxGroup(java.lang.String inGroupLabel, java.lang.String[] inLabels, int[] inDefaults, int inSpacing)
           
CheckBoxGroup(java.lang.String inGroupLabel, java.lang.String[] inLabels, int[] inDefaults, int[] ids, int inSpacing)
           
 
Method Summary
 boolean eventKeyUp(char inChar, Event event)
          Processes key releases directed at this container.
 boolean eventWidgetUp(int inWhichWidget, Event event)
          Handle the release of a device widget
 Rect getInterestingRect(Rect r)
           
 int getItemValue(int inItemIndex)
           
 int getValueOfItemWithID(int inItemID)
           
 boolean keepRectInView(View inChangingView, Rect inImportantRect)
           
 void loseFocus()
           
 void paint(Pen p)
          Draw the contents of this View.
 void setCheckBoxLabels(java.lang.String inGroupLabel, java.lang.String[] inLabels, int[] inDefaults, int[] ids, int inSpacing)
           
 void setHasBorder(boolean inHasBorder)
           
 void setItemEvent(int inItemIndex, Listener inListener, int inType)
           
 void setItemValue(int inItemIndex, int inValue)
           
 void setValueOfItemWithID(int inItemID, int inValue)
           
 void takeFocus(boolean inFromAbove)
           
 
Methods inherited from class danger.ui.Control
drawFocusBox, drawIdleBox, drawIdleBox, getEvent, getEventListener, getEventType, getHasBorder, getString, getTitle, getValue, sendEvent, setEvent, setEvent, setEvent, setEvent, setEvent, setEventListener, setTitle, setValue
 
Methods inherited from class danger.ui.Container
addChild, addChild, addChildAt, advanceFocus, childCount, childIsOnScreen, disable, enable, eventKeyDown, eventKeyHeld, eventKeyRepeat, eventPeriodicPulse, eventShortcut, eventWidgetDown, eventWidgetHeld, getBottomChild, getChildAt, getChildIndex, getChildWithID, getDescendantWithID, getFirstChild, getFirstFocusableChild, getFocusedChild, getLastChild, getLastFocusableChild, hideAllChildren, moveChildToIndex, paintChildren, receiveEvent, reflowChildren, removeAllChildren, removeChild, reverseFocus, setFocusedChild, setFocusedChild, setWindow, showAllChildren, snapToChildren
 
Methods inherited from class danger.ui.View
clear, copyStyle, getAcceptFocus, getBackgroundColor, getBottom, getBounds, getBounds, getFrame, getFrame, getHeight, getInterestingRect, getLeft, getOrigin, getOrigin, getOriginX, getOriginY, getParent, getRight, getSibling, getStyle, getStyleColor, getStyleFont, getTop, getWidth, getWindow, globalToLocal, hide, invalidate, invalidate, invalidate, isEnabled, isFocusable, isFocused, isOnScreen, isTransparent, isVisible, localToGlobal, localToGlobal, localToWindow, moveBy, offsetOrigin, offsetOrigin, onAddedToParent, onDecoded, onPeriodicPulse, onRemovedFromParent, onStyleChanged, onWindowPaint, receiveEventInternal, resetOrigin, sendEventToWindow, setAcceptFocus, setBackgroundColor, setBottom, setDebugBounds, setEnabled, setFrame, setHeight, setKeyedValue, setLeft, setOrigin, setOrigin, setPosition, setRight, setSize, setStyle, setStyleColor, setStyleFont, setStyleFrameColor, setTop, setTransparent, setVisible, setWidth, shouldDropEvent, show, styleIsDefault, willFocusWithin, windowToLocal
 
Methods inherited from class danger.app.Listener
cancelEvents, sendEvent, sendEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kDefaultSpacing

public static final int kDefaultSpacing
Constructor Detail

CheckBoxGroup

public CheckBoxGroup()

CheckBoxGroup

public CheckBoxGroup(java.lang.String inGroupLabel,
                     java.lang.String[] inLabels)

CheckBoxGroup

public CheckBoxGroup(java.lang.String inGroupLabel,
                     java.lang.String[] inLabels,
                     int[] inDefaults,
                     int inSpacing)

CheckBoxGroup

public CheckBoxGroup(java.lang.String inGroupLabel,
                     java.lang.String[] inLabels,
                     int[] inDefaults,
                     int[] ids,
                     int inSpacing)
Method Detail

setCheckBoxLabels

public void setCheckBoxLabels(java.lang.String inGroupLabel,
                              java.lang.String[] inLabels,
                              int[] inDefaults,
                              int[] ids,
                              int inSpacing)

setHasBorder

public void setHasBorder(boolean inHasBorder)
Overrides:
setHasBorder in class Control

eventKeyUp

public boolean eventKeyUp(char inChar,
                          Event event)
Description copied from class: Container
Processes key releases directed at this container.
Overrides:
eventKeyUp in class Container
Following copied from class: danger.ui.Container
Parameters:
c - the character being released.

eventWidgetUp

public boolean eventWidgetUp(int inWhichWidget,
                             Event event)
Description copied from class: Container
Handle the release of a device widget
Overrides:
eventWidgetUp in class Container
Following copied from class: danger.ui.Container
Parameters:
inWidget - the widget that went down
Returns:
whether or not the event was consumed

paint

public void paint(Pen p)
Description copied from class: View
Draw the contents of this View. This method is called by the graphics system when the View needs to be repainted. A Pen will be provided which is appropriately clipped and translated for drawing on this View.
Overrides:
paint in class Container

takeFocus

public void takeFocus(boolean inFromAbove)
Overrides:
takeFocus in class Container

loseFocus

public void loseFocus()
Overrides:
loseFocus in class Container

keepRectInView

public boolean keepRectInView(View inChangingView,
                              Rect inImportantRect)
Overrides:
keepRectInView in class View

getInterestingRect

public Rect getInterestingRect(Rect r)
Overrides:
getInterestingRect in class View

getItemValue

public int getItemValue(int inItemIndex)

getValueOfItemWithID

public int getValueOfItemWithID(int inItemID)

setItemValue

public void setItemValue(int inItemIndex,
                         int inValue)

setValueOfItemWithID

public void setValueOfItemWithID(int inItemID,
                                 int inValue)

setItemEvent

public void setItemEvent(int inItemIndex,
                         Listener inListener,
                         int inType)


Danger Confidential. Copyright © 2000-2003, Danger Inc.