danger.ui
Class GroupBox

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

public class GroupBox
extends Control


Field Summary
static int kControlPos_Left
           
static int kControlPos_Top
           
 
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
GroupBox()
           
GroupBox(Control inControl)
           
GroupBox(Control inControl, int inControlPosition)
           
GroupBox(java.lang.String inTitle)
           
 
Method Summary
 void addChild(View child, int id)
           
 void addChildAt(View inChild, int index)
           
protected  void drawBackground(Pen p, Rect r)
           
 void enable()
           
 boolean eventWidgetDown(int inWhichWidget, Event event)
          Handle the pressing of a device widget
 boolean eventWidgetUp(int inWhichWidget, Event event)
          Handle the release of a device widget
 boolean getAutoResize()
           
 Rect getInterestingRect(Rect outRect)
           
 boolean isFocusable()
           
 boolean keepRectInView(View inChangingView, Rect inImportantRect)
           
protected  void layoutOnOffControl()
           
 void paint(Pen p)
          Draw the contents of this View.
 boolean receiveEvent(Event e)
          Entry point for event processing.
 void reflowChildren(View inBaseChild, int inAmount)
           
 void removeAllChildren()
           
 void removeChild(View inChild)
          Removes a child View from this View.
 void setAutoResize(boolean inAutoResize)
           
 void setOnOffControl(Control inControl, int inControlPosition)
           
 void setOnOffControl(Control inControl, int inControlPosition, boolean added)
           
 void setSize(int inWidth, int inHeight)
           
 void setValue(int inValue)
           
 void snapToChildren(int inLeft, int inTop, int inRight, int inBottom)
          Reduces the size of this Container so that it exactly fits around its children with no extra space.
protected  void updateChildrenEnabledState()
           
 boolean willFocusWithin(Rect r)
           
 
Methods inherited from class danger.ui.Control
drawFocusBox, drawIdleBox, drawIdleBox, getEvent, getEventListener, getEventType, getHasBorder, getString, getTitle, getValue, sendEvent, setEvent, setEvent, setEvent, setEvent, setEvent, setEventListener, setHasBorder, setTitle
 
Methods inherited from class danger.ui.Container
addChild, advanceFocus, childCount, childIsOnScreen, disable, eventKeyDown, eventKeyHeld, eventKeyRepeat, eventKeyUp, eventPeriodicPulse, eventShortcut, eventWidgetHeld, getBottomChild, getChildAt, getChildIndex, getChildWithID, getDescendantWithID, getFirstChild, getFirstFocusableChild, getFocusedChild, getLastChild, getLastFocusableChild, hideAllChildren, loseFocus, moveChildToIndex, paintChildren, reverseFocus, setFocusedChild, setFocusedChild, setWindow, showAllChildren, takeFocus
 
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, 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, setStyle, setStyleColor, setStyleFont, setStyleFrameColor, setTop, setTransparent, setVisible, setWidth, shouldDropEvent, show, styleIsDefault, 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

kControlPos_Top

public static final int kControlPos_Top

kControlPos_Left

public static final int kControlPos_Left
Constructor Detail

GroupBox

public GroupBox()

GroupBox

public GroupBox(java.lang.String inTitle)

GroupBox

public GroupBox(Control inControl,
                int inControlPosition)

GroupBox

public GroupBox(Control inControl)
Method Detail

setOnOffControl

public void setOnOffControl(Control inControl,
                            int inControlPosition)

setOnOffControl

public void setOnOffControl(Control inControl,
                            int inControlPosition,
                            boolean added)

addChild

public void addChild(View child,
                     int id)
Overrides:
addChild in class Container

addChildAt

public void addChildAt(View inChild,
                       int index)
Overrides:
addChildAt in class Container

removeChild

public void removeChild(View inChild)
Description copied from class: View
Removes a child View from this View. A UIException will be thrown if this View is not a container or does not contain the specified child
Overrides:
removeChild in class Container

removeAllChildren

public void removeAllChildren()
Overrides:
removeAllChildren in class Container

snapToChildren

public void snapToChildren(int inLeft,
                           int inTop,
                           int inRight,
                           int inBottom)
Description copied from class: Container
Reduces the size of this Container so that it exactly fits around its children with no extra space. It then expands the size of the Container by the passed-in margin quantities.
Overrides:
snapToChildren in class Container
Following copied from class: danger.ui.Container
Parameters:
inLeft - left margin
inTop - top margin
inRight - right margin
inBottom - bottom margin

setSize

public void setSize(int inWidth,
                    int inHeight)
Overrides:
setSize in class View

layoutOnOffControl

protected void layoutOnOffControl()

reflowChildren

public void reflowChildren(View inBaseChild,
                           int inAmount)
Overrides:
reflowChildren in class Container

enable

public void enable()
Overrides:
enable in class Container

updateChildrenEnabledState

protected void updateChildrenEnabledState()

setAutoResize

public final void setAutoResize(boolean inAutoResize)

getAutoResize

public final boolean getAutoResize()

drawBackground

protected void drawBackground(Pen p,
                              Rect r)

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

receiveEvent

public boolean receiveEvent(Event e)
Description copied from class: Listener
Entry point for event processing. Default behaviour is to do nothing and return false. Normally this method is called from a Dispatcher when it discovers an Event in its queue that is targetted at this Listener.
Overrides:
receiveEvent in class Container

eventWidgetUp

public final 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

eventWidgetDown

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

willFocusWithin

public boolean willFocusWithin(Rect r)
Overrides:
willFocusWithin in class View

keepRectInView

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

getInterestingRect

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

setValue

public void setValue(int inValue)
Overrides:
setValue in class Control

isFocusable

public boolean isFocusable()
Overrides:
isFocusable in class View


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