danger.ui
Class Window
java.lang.Object
|
+--danger.app.Listener
|
+--danger.ui.View
|
+--danger.ui.Container
|
+--danger.ui.Window
- Direct Known Subclasses:
- BaseMenuWindow, DatePickerWindow, DialogWindow, IconPickerWindow, PickerWindow, ScreenWindow, SliderWindow
- public class Window
- extends Container
|
Constructor Summary |
Window()
|
Window(boolean systemWindow,
int left,
int top,
int right,
int bottom)
|
Window(boolean systemWindow,
Rect r)
|
Window(int left,
int top,
int right,
int bottom)
|
Window(Rect r)
|
|
Method Summary |
void |
addFromDialogResource(int id)
|
void |
addFromDialogResource(int id,
Listener listener)
|
protected int |
addToChildIDList(View child)
|
protected void |
addToChildIDList(View child,
int id)
|
void |
adjustActionMenuState()
|
protected void |
autoHide()
|
boolean |
autoHideIfIdle()
Returns true if this window gets auto hidden if its idle for a
certain amount of time. |
void |
autoHideIfIdle(boolean flag)
Set a flag that controls whether this window auto hides if it has
been idle for certain amount of time (15 seconds) |
boolean |
blocksChooser()
Whether the window blocks from going to the chooser
Some applications, such as security/passcode lock and registration
block from going to the chooser when the JUMP button is pressed. |
void |
centerHorizontal()
|
void |
centerOnScreen()
|
void |
centerUnderTitleBar()
|
void |
centerVertical()
|
void |
disableControlWithID(int id)
|
void |
dropOrphanedEvents(boolean drop)
Set a flag that controls whether this window drops orphan events. |
void |
enableControlWithID(int id)
|
Application |
getApplication()
|
Control |
getControlWithID(int id)
|
View |
getDescendantWithID(int inID)
|
int |
getExplicitIDOfChild(View child)
|
int |
getIDOfChild(View child)
|
Listener |
getListener()
|
Window |
getWindowBelow()
|
void |
hide()
|
protected void |
hideActiveMenu(boolean onlyIfOrphaned)
|
void |
hideControlWithID(int id)
|
boolean |
isActionMenuVisible()
|
boolean |
isFloating()
|
boolean |
isFullScreen()
|
boolean |
isUnresponsive()
Returns true if this window is currently unresponsive. |
protected void |
onPeriodicPulse()
|
protected void |
onWindowPaint()
|
void |
receiveMessage(int inMessage,
int inData,
java.lang.Object inArgument)
|
protected void |
removeChildFromIDList(View child)
|
void |
setEventForControlWithID(int id,
Event newEvent)
|
void |
setFloating(boolean floating)
|
void |
setFormatDateForControlWithID(int id,
danger.internal.Date inDate)
|
void |
setFormatDateForTextControlWithID(int id,
danger.internal.Date inDate)
|
void |
setFormatTextForControlWithID(int id,
java.lang.String inArg0)
|
void |
setFormatTextForControlWithID(int id,
java.lang.String[] inArgs)
|
void |
setFormatTextForControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1)
|
void |
setFormatTextForControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1,
java.lang.String inArg2)
|
void |
setFormatTextForTextControlWithID(int id,
java.lang.String inArg0)
|
void |
setFormatTextForTextControlWithID(int id,
java.lang.String[] inArgs)
|
void |
setFormatTextForTextControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1)
|
void |
setFormatTextForTextControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1,
java.lang.String inArg2)
|
void |
setListenerForAllControls(Listener listener)
|
void |
setMaxChildID(int id)
|
void |
setMaxControlID(int id)
|
void |
setPosition(int x,
int y)
Moves this View to a new position specified in its parent's coordinate system |
void |
setSize(int width,
int height)
|
void |
setTitled(boolean titled)
|
protected boolean |
shouldDropEvent(Event event)
|
void |
show()
|
void |
showControlWithID(int id)
|
| Methods inherited from class danger.ui.Container |
addChild, addChild, addChildAt, advanceFocus, childCount, childIsOnScreen, disable, enable, eventKeyDown, eventKeyHeld, eventKeyRepeat, eventKeyUp, eventPeriodicPulse, eventShortcut, eventWidgetDown, eventWidgetHeld, eventWidgetUp, getBottomChild, getChildAt, getChildIndex, getChildWithID, getFirstChild, getFirstFocusableChild, getFocusedChild, getLastChild, getLastFocusableChild, hideAllChildren, loseFocus, moveChildToIndex, paint, paintChildren, receiveEvent, 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, invalidate, invalidate, invalidate, isEnabled, isFocusable, isFocused, isOnScreen, isTransparent, isVisible, keepRectInView, localToGlobal, localToGlobal, localToWindow, moveBy, offsetOrigin, offsetOrigin, onAddedToParent, onDecoded, onRemovedFromParent, onStyleChanged, receiveEventInternal, resetOrigin, sendEventToWindow, setAcceptFocus, setBackgroundColor, setBottom, setDebugBounds, setEnabled, setFrame, setHeight, setKeyedValue, setLeft, setOrigin, setOrigin, setRight, setStyle, setStyleColor, setStyleFont, setStyleFrameColor, setTop, setTransparent, setVisible, setWidth, styleIsDefault, willFocusWithin, windowToLocal |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATE_FULLSCREEN
protected static final int STATE_FULLSCREEN
STATE_FLOATING
protected static final int STATE_FLOATING
STATE_DROP_ORPHANED_EVENTS
protected static final int STATE_DROP_ORPHANED_EVENTS
STATE_AUTO_HIDE_IF_IDLE
protected static final int STATE_AUTO_HIDE_IF_IDLE
mBusyPaintCount
protected int mBusyPaintCount
Window
public Window()
Window
public Window(Rect r)
Window
public Window(boolean systemWindow,
Rect r)
Window
public Window(int left,
int top,
int right,
int bottom)
Window
public Window(boolean systemWindow,
int left,
int top,
int right,
int bottom)
addFromDialogResource
public void addFromDialogResource(int id)
addFromDialogResource
public void addFromDialogResource(int id,
Listener listener)
setPosition
public void setPosition(int x,
int y)
- Description copied from class:
View
- Moves this View to a new position specified in its parent's coordinate system
- Overrides:
setPosition in class View
setSize
public void setSize(int width,
int height)
- Overrides:
setSize in class View
show
public void show()
- Overrides:
show in class View
hide
public void hide()
- Overrides:
hide in class View
hideActiveMenu
protected void hideActiveMenu(boolean onlyIfOrphaned)
onWindowPaint
protected final void onWindowPaint()
- Overrides:
onWindowPaint in class View
onPeriodicPulse
protected final void onPeriodicPulse()
- Overrides:
onPeriodicPulse in class View
shouldDropEvent
protected final boolean shouldDropEvent(Event event)
- Overrides:
shouldDropEvent in class View
receiveMessage
public void receiveMessage(int inMessage,
int inData,
java.lang.Object inArgument)
adjustActionMenuState
public void adjustActionMenuState()
isActionMenuVisible
public boolean isActionMenuVisible()
centerOnScreen
public void centerOnScreen()
centerHorizontal
public void centerHorizontal()
centerVertical
public void centerVertical()
centerUnderTitleBar
public void centerUnderTitleBar()
getApplication
public Application getApplication()
getListener
public final Listener getListener()
setFloating
public void setFloating(boolean floating)
isFloating
public boolean isFloating()
isFullScreen
public boolean isFullScreen()
setTitled
public void setTitled(boolean titled)
getWindowBelow
public Window getWindowBelow()
blocksChooser
public boolean blocksChooser()
- Whether the window blocks from going to the chooser
Some applications, such as security/passcode lock and registration
block from going to the chooser when the JUMP button is pressed.
- Returns:
- A boolean containing true if the application blocks the
chooser.
dropOrphanedEvents
public void dropOrphanedEvents(boolean drop)
- Set a flag that controls whether this window drops orphan events.
Orphan events are "UI events" that get dispatched for this window,
at a time when it no longer is the active window. These include
EVENT_WIDGET_UP, EVENT_WIDGET_DOWN, KEY_UP, KEY_DOWN and their
variants/shortcuts.
isUnresponsive
public boolean isUnresponsive()
- Returns true if this window is currently unresponsive.
autoHideIfIdle
public void autoHideIfIdle(boolean flag)
- Set a flag that controls whether this window auto hides if it has
been idle for certain amount of time (15 seconds)
autoHideIfIdle
public boolean autoHideIfIdle()
- Returns true if this window gets auto hidden if its idle for a
certain amount of time.
autoHide
protected void autoHide()
setMaxControlID
public void setMaxControlID(int id)
getControlWithID
public Control getControlWithID(int id)
enableControlWithID
public void enableControlWithID(int id)
disableControlWithID
public void disableControlWithID(int id)
showControlWithID
public void showControlWithID(int id)
hideControlWithID
public void hideControlWithID(int id)
setEventForControlWithID
public void setEventForControlWithID(int id,
Event newEvent)
setListenerForAllControls
public void setListenerForAllControls(Listener listener)
setFormatTextForControlWithID
public void setFormatTextForControlWithID(int id,
java.lang.String inArg0)
setFormatTextForControlWithID
public void setFormatTextForControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1)
setFormatTextForControlWithID
public void setFormatTextForControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1,
java.lang.String inArg2)
setFormatTextForControlWithID
public void setFormatTextForControlWithID(int id,
java.lang.String[] inArgs)
setFormatTextForTextControlWithID
public void setFormatTextForTextControlWithID(int id,
java.lang.String inArg0)
setFormatTextForTextControlWithID
public void setFormatTextForTextControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1)
setFormatTextForTextControlWithID
public void setFormatTextForTextControlWithID(int id,
java.lang.String inArg0,
java.lang.String inArg1,
java.lang.String inArg2)
setFormatTextForTextControlWithID
public void setFormatTextForTextControlWithID(int id,
java.lang.String[] inArgs)
setFormatDateForControlWithID
public void setFormatDateForControlWithID(int id,
danger.internal.Date inDate)
setFormatDateForTextControlWithID
public void setFormatDateForTextControlWithID(int id,
danger.internal.Date inDate)
setMaxChildID
public void setMaxChildID(int id)
getDescendantWithID
public View getDescendantWithID(int inID)
- Overrides:
getDescendantWithID in class Container
getIDOfChild
public int getIDOfChild(View child)
getExplicitIDOfChild
public int getExplicitIDOfChild(View child)
addToChildIDList
protected void addToChildIDList(View child,
int id)
addToChildIDList
protected int addToChildIDList(View child)
removeChildFromIDList
protected void removeChildFromIDList(View child)
Danger Confidential. Copyright © 2000-2003, Danger Inc.