danger.ui
Class TextField

java.lang.Object
  |
  +--danger.app.Listener
        |
        +--danger.ui.View
              |
              +--danger.ui.Container
                    |
                    +--danger.ui.Control
                          |
                          +--danger.ui.EditText
                                |
                                +--danger.ui.TextField
Direct Known Subclasses:
NumberField, PasswordTextField, TypeAheadTextField

public class TextField
extends EditText


Fields inherited from class danger.ui.EditText
mCursorRect, mFont
 
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
TextField()
           
TextField(boolean autoText, boolean autoCap)
           
TextField(java.lang.String inLabel)
           
TextField(java.lang.String inLabel, boolean autoText, boolean autoCap)
           
 
Method Summary
 void bringCursorIntoView()
           
 boolean eventKeyDown(char c, Event event)
           
 boolean eventKeyUp(char c, Event event)
          Processes key releases directed at this container.
 boolean eventWidgetDown(int inWhichWidget, Event event)
          Handles 'down' actions on the gizmo widgets.
 boolean eventWidgetUp(int inWhichWidget, Event event)
          Handle the release of a device widget
 Rect getInterestingRect(Rect r)
           
 void paint(Pen p)
          Draw the contents of this View.
 void setAutoResize(boolean inResize)
           
 void setFont(Font inFont)
           
 void setSize(int inWidth, int inHeight)
          Resize the block of text.
 void takeFocus(boolean inFromAbove)
           
 
Methods inherited from class danger.ui.EditText
addTextEditMenuItems, canScrollDown, canScrollUp, charAt, clear, copySelection, cutSelection, delete, deleteChar, deleteLineAtPoint, drawFrame, eventKeyRepeat, eventPeriodicPulse, eventShortcut, eventWidgetHeld, forwardDeleteChar, forwardDeleteChar, getAcceptKeyRepeats, getActiveMetaKey, getAutoCap, getAutoResize, getAutoText, getChars, getChars, getCursorLine, getInsertionPoint, getInterestingRect, getLine, getString, getStringCRLF, grabSelection, insert, insert, invalidateCursor, isEditable, isShortcutTrigger, justifyCenter, justifyLeft, justifyRight, loadCursorRect, loseFocus, numChars, numLines, paste, receiveEvent, resetSelection, scrollDown, scrollUp, selectAll, selectionEnd, setAcceptKeyRepeats, setActiveMetaKey, setAllowCursorBlink, setAutoCap, setAutoText, setCursorLine, setEditable, setHasBorder, setInputFilter, setInsertionPoint, setSelection, setText, setWantQuoteHack, willFocusWithin
 
Methods inherited from class danger.ui.Control
drawFocusBox, drawIdleBox, drawIdleBox, getEvent, getEventListener, getEventType, getHasBorder, 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, eventKeyHeld, getBottomChild, getChildAt, getChildIndex, getChildWithID, getDescendantWithID, getFirstChild, getFirstFocusableChild, getFocusedChild, getLastChild, getLastFocusableChild, hideAllChildren, moveChildToIndex, paintChildren, 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, 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, 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
 

Constructor Detail

TextField

public TextField()

TextField

public TextField(boolean autoText,
                 boolean autoCap)

TextField

public TextField(java.lang.String inLabel)

TextField

public TextField(java.lang.String inLabel,
                 boolean autoText,
                 boolean autoCap)
Method Detail

setSize

public void setSize(int inWidth,
                    int inHeight)
Description copied from class: EditText
Resize the block of text. The parent will Invalidate() as a side-effect if the View is visible. The number of displayable lines will also be recalculated based on the new height.
Overrides:
setSize in class EditText

eventWidgetUp

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

eventWidgetDown

public boolean eventWidgetDown(int inWhichWidget,
                               Event event)
Description copied from class: EditText
Handles 'down' actions on the gizmo widgets. The wheel controls movement of the insertion point.
Overrides:
eventWidgetDown in class EditText
Following copied from class: danger.ui.EditText
Parameters:
inWhichWidget - indicates which of the controls on the device went 'down'

eventKeyDown

public boolean eventKeyDown(char c,
                            Event event)
Overrides:
eventKeyDown in class EditText

eventKeyUp

public boolean eventKeyUp(char c,
                          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.

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 EditText

setAutoResize

public void setAutoResize(boolean inResize)
Overrides:
setAutoResize in class EditText

bringCursorIntoView

public void bringCursorIntoView()
Overrides:
bringCursorIntoView in class EditText

getInterestingRect

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

setFont

public void setFont(Font inFont)
Overrides:
setFont in class EditText

takeFocus

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


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