danger.ui
Class Button
java.lang.Object
|
+--danger.app.Listener
|
+--danger.ui.View
|
+--danger.ui.Container
|
+--danger.ui.Control
|
+--danger.ui.Button
- Direct Known Subclasses:
- QuietButton
- public class Button
- extends Control
| 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, 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, loseFocus, moveChildToIndex, paintChildren, reflowChildren, removeAllChildren, removeChild, reverseFocus, setFocusedChild, setFocusedChild, setWindow, showAllChildren, snapToChildren, takeFocus |
| Methods inherited from class danger.ui.View |
clear, copyStyle, getAcceptFocus, getBackgroundColor, getBottom, getBounds, getBounds, getFrame, getFrame, getHeight, getInterestingRect, 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, keepRectInView, localToGlobal, localToGlobal, localToWindow, moveBy, offsetOrigin, offsetOrigin, onAddedToParent, onDecoded, onPeriodicPulse, onRemovedFromParent, 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
kAlignLeft
public static final int kAlignLeft
kAlignRight
public static final int kAlignRight
kAlignTextBottom
public static final int kAlignTextBottom
kAlignTextTop
public static final int kAlignTextTop
Button
public Button()
Button
public Button(java.lang.String inTitle)
Button
public Button(Bitmap inBitmap)
Button
public Button(Bitmap inBitmap,
java.lang.String inTitle)
setMinWidth
public void setMinWidth(int minWidth)
onStyleChanged
protected void onStyleChanged(int attribute)
- Overrides:
onStyleChanged in class View
setBitmap
public void setBitmap(Bitmap inBitmap,
boolean inResize)
setBitmap
public void setBitmap(Bitmap inBitmap)
setBitmapAlignment
public void setBitmapAlignment(int alignment)
setBitmapInvertOnHighlight
public void setBitmapInvertOnHighlight(boolean invertOnHighlight)
calcSize
public void calcSize()
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
setTitle
public void setTitle(java.lang.String s)
- Overrides:
setTitle in class Control
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
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.
receiveEvent
public boolean receiveEvent(Event event)
- 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
makeDoneButton
public static Button makeDoneButton(Listener inListener,
int inEventType)
getShortcutBackBitmap
public static Bitmap getShortcutBackBitmap()
getShortcutDiamondBitmap
public static Bitmap getShortcutDiamondBitmap()
setShortcut
public void setShortcut(char inKey)
setShortcutPadding
public void setShortcutPadding(int padding)
setHasFrame
public void setHasFrame(boolean hasFrame)
Danger Confidential. Copyright © 2000-2003, Danger Inc.