danger.ui
Class IconLabel

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

public class IconLabel
extends GroupBox


Field Summary
static int kIconAlignment_Bottom
           
static int kIconAlignment_Top
           
static int kIconAlignment_VerticalCenter
           
protected  Button mButton
           
protected  Bitmap mIcon
           
protected  int mIconAlignment_Vertical
           
protected  int mIconY
           
protected  PopupMenu mMenu
           
protected  View mSaveFocus
           
 
Fields inherited from class danger.ui.GroupBox
kControlPos_Left, 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
IconLabel()
           
IconLabel(Bitmap inIcon, java.lang.String inTitle)
           
 
Method Summary
 Button addButton(java.lang.String inButtonTitle)
           
 Button getButton()
           
 boolean keepRectInView(View inChangingView, Rect inImportantRect)
           
 void loseFocus()
           
 void paint(Pen p)
          Draw the contents of this View.
 void setIcon(Bitmap inIcon)
           
 void setIconVerticalAlignment(int inAlign)
           
 void setSize(int inWidth, int inHeight)
           
 void takeFocus(boolean inFromAbove)
           
 boolean willFocusWithin(Rect r)
           
 
Methods inherited from class danger.ui.GroupBox
addChild, addChildAt, drawBackground, enable, eventWidgetDown, eventWidgetUp, getAutoResize, getInterestingRect, isFocusable, layoutOnOffControl, receiveEvent, reflowChildren, removeAllChildren, removeChild, setAutoResize, setOnOffControl, setOnOffControl, setValue, snapToChildren, updateChildrenEnabledState
 
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, moveChildToIndex, paintChildren, reverseFocus, setFocusedChild, setFocusedChild, setWindow, showAllChildren
 
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

mIcon

protected Bitmap mIcon

mIconY

protected int mIconY

mIconAlignment_Vertical

protected int mIconAlignment_Vertical

mSaveFocus

protected View mSaveFocus

mButton

protected Button mButton

mMenu

protected PopupMenu mMenu

kIconAlignment_VerticalCenter

public static final int kIconAlignment_VerticalCenter

kIconAlignment_Top

public static final int kIconAlignment_Top

kIconAlignment_Bottom

public static final int kIconAlignment_Bottom
Constructor Detail

IconLabel

public IconLabel()

IconLabel

public IconLabel(Bitmap inIcon,
                 java.lang.String inTitle)
Method Detail

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 GroupBox

setSize

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

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 GroupBox

willFocusWithin

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

setIcon

public void setIcon(Bitmap inIcon)

addButton

public Button addButton(java.lang.String inButtonTitle)

getButton

public Button getButton()

setIconVerticalAlignment

public void setIconVerticalAlignment(int inAlign)


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