danger.ui
Class NumberEditor

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

public class NumberEditor
extends Control


Field Summary
protected  Alarm mKeyInputAlarm
           
protected  java.lang.String mKeyString
           
protected  int mLastKeyTime
           
protected  int mMax
           
protected  int mMaxCharLength
           
protected  int mMin
           
protected  StaticText mNumberTextView
           
protected  boolean mWrap
           
protected static int STD_HEIGHT
           
protected static int STD_WIDTH
           
 
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
NumberEditor()
           
NumberEditor(int inValue, int inMin, int inMax)
           
NumberEditor(int inValue, int inMin, int inMax, boolean inWrap)
           
 
Method Summary
protected  void adjustPickerWindow(PickerWindow pw, View inAlignView)
           
 void disable()
           
protected  void drawBackground(Pen p, Rect inRect)
           
 void enable()
           
 boolean eventKeyDown(char c, Event event)
           
 int getValue()
           
protected  void layout()
           
 void loseFocus()
           
 void max(int inMax)
           
 void min(int inMin)
           
 void paint(Pen p)
          Draw the contents of this View.
 boolean receiveEvent(Event e)
          Entry point for event processing.
 void setRange(int minValue, int maxValue)
           
 void setSize(int inWidth, int inHeight)
           
 void setValue(int inValue)
           
 void setWrap(boolean wrap)
           
protected  void ShowPicker()
           
 
Methods inherited from class danger.ui.Control
drawFocusBox, drawIdleBox, drawIdleBox, getEvent, getEventListener, getEventType, getHasBorder, getString, getTitle, sendEvent, setEvent, setEvent, setEvent, setEvent, setEvent, setEventListener, setHasBorder, setTitle
 
Methods inherited from class danger.ui.Container
addChild, addChild, addChildAt, advanceFocus, childCount, childIsOnScreen, eventKeyHeld, eventKeyRepeat, eventKeyUp, eventPeriodicPulse, eventShortcut, eventWidgetDown, eventWidgetHeld, eventWidgetUp, getBottomChild, getChildAt, getChildIndex, getChildWithID, getDescendantWithID, getFirstChild, getFirstFocusableChild, getFocusedChild, getLastChild, getLastFocusableChild, hideAllChildren, 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, 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, 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

mNumberTextView

protected StaticText mNumberTextView

mMin

protected int mMin

mMax

protected int mMax

mMaxCharLength

protected int mMaxCharLength

mLastKeyTime

protected int mLastKeyTime

mKeyString

protected java.lang.String mKeyString

mKeyInputAlarm

protected Alarm mKeyInputAlarm

mWrap

protected boolean mWrap

STD_HEIGHT

protected static final int STD_HEIGHT

STD_WIDTH

protected static final int STD_WIDTH
Constructor Detail

NumberEditor

public NumberEditor()

NumberEditor

public NumberEditor(int inValue,
                    int inMin,
                    int inMax)

NumberEditor

public NumberEditor(int inValue,
                    int inMin,
                    int inMax,
                    boolean inWrap)
Method Detail

setRange

public void setRange(int minValue,
                     int maxValue)

setWrap

public void setWrap(boolean wrap)

layout

protected final void layout()

enable

public void enable()
Overrides:
enable in class Container

disable

public void disable()
Overrides:
disable in class Container

adjustPickerWindow

protected void adjustPickerWindow(PickerWindow pw,
                                  View inAlignView)

ShowPicker

protected void ShowPicker()

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

setSize

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

getValue

public int getValue()
Overrides:
getValue in class Control

setValue

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

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

drawBackground

protected final void drawBackground(Pen p,
                                    Rect inRect)

eventKeyDown

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

loseFocus

public void loseFocus()
Overrides:
loseFocus in class Container

min

public void min(int inMin)

max

public void max(int inMax)


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