|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.Listener
danger.ui.View
danger.ui.Container
danger.ui.Window
danger.ui.ScreenWindow
public class ScreenWindow
Basic screen window. This is the basic screen window, which covers the entire device display except the title bar area (unless the screen window is a full screen window). This object also handles the title (and sub-title) as shown in the upper left area of the title bar, and the action menu associated with the screen.
| Field Summary |
|---|
| Fields inherited from class danger.ui.Window |
|---|
mBusyPaintCount, mDefaultListener, STATE_AUTO_HIDE_IF_IDLE, STATE_DROP_ORPHANED_EVENTS, STATE_FULLSCREEN, STATE_UNUSED1 |
| Constructor Summary | |
|---|---|
ScreenWindow()
Construct an instance. |
|
ScreenWindow(boolean fullScreen)
Construct an instance. |
|
ScreenWindow(CharSequence inTitle)
Construct an instance. |
|
ScreenWindow(CharSequence inTitle,
Bitmap inIcon)
Construct an instance. |
|
ScreenWindow(String inTitle)
Construct an instance. |
|
ScreenWindow(String inTitle,
Bitmap inIcon)
Construct an instance. |
|
| Method Summary | |
|---|---|
protected void |
aboutToHideMenu()
This method gets called just before the action menu is closed. |
protected void |
aboutToShowMenu()
This method gets called just before the action menu is displayed to the user. |
void |
adjustActionMenuState()
Deprecated. deprecated Use adjustActionMenuState(Menu actionMenu)
instead. |
void |
adjustActionMenuState(Menu actionMenu)
Adjust the action menu state. |
boolean |
eventKeyUp(char c,
Event event)
Handle a key up event. |
boolean |
eventShortcut(char shortcut,
Event event)
Handle event shortcuts. |
boolean |
eventWidgetDown(int inWhichWidget,
Event event)
Handle a button down event. |
boolean |
eventWidgetUp(int inWhichWidget,
Event event)
Handle a button up event. |
Menu |
getActionMenu()
Get the action menu. |
Bitmap |
getIcon()
Get the icon associated with this screen. |
String |
getSubTitle()
Get the sub-title. |
protected Font |
getSubTitleFont()
Get the sub-title font. |
CharSequence |
getSubTitleSequence()
Get the sub-title. |
String |
getTitle()
Get the title. |
protected Font |
getTitleFont()
Get the title font. |
CharSequence |
getTitleSequence()
Get the title. |
boolean |
isActionMenuVisible()
Determine whether the action menu is currently showing on the screen. |
protected void |
onScreenWindowActivate()
Called when the window stack changes such that this screen window is now the active screen window. |
protected void |
onScreenWindowDeactivate()
Called when the window stack changes such that this screen window is no longer the active screen window. |
protected void |
onShortcut(char shortcut,
Event event)
This method is called before eventShortcut gets called. |
void |
removeAllChildren()
Remove all children from the screen window. |
void |
setFullScreen(boolean fullScreen)
Specify whether the screen should be full screen or not. |
void |
setIcon(Bitmap inIcon)
Set the icon. |
void |
setSubTitle(CharSequence inSubTitle)
Set the sub-title. |
void |
setSubTitle(CharSequence inSubTitle,
Font inSubTitleFont)
Set the sub-title and sub-title font. |
void |
setSubTitle(String inSubTitle)
Set the sub-title. |
void |
setSubTitle(String inSubTitle,
Font inSubTitleFont)
Set the sub-title and sub-title font. |
void |
setTitle(CharSequence inTitle)
Set the title. |
void |
setTitle(CharSequence inTitle,
Font inFont)
Set the title and title font. |
void |
setTitle(String inTitle)
Set the title. |
void |
setTitle(String inTitle,
Font inFont)
Set the title and title font. |
| Methods inherited from class danger.app.Listener |
|---|
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScreenWindow()
Window.show() to actually
show the window.
The screen will not be full screen (see setFullScreen(boolean)).
public ScreenWindow(boolean fullScreen)
Window.show() to actually
show the window.
fullScreen - specifies whether the screen is full screen
or not. (see setFullScreen(boolean)).public ScreenWindow(String inTitle)
Window.show() to actually
show the window.
The screen will not be full screen (see setFullScreen(boolean)).
inTitle - the title of the screenpublic ScreenWindow(CharSequence inTitle)
Window.show() to actually
show the window.
The screen will not be full screen (see setFullScreen(boolean)).
inTitle - the title of the screen
public ScreenWindow(String inTitle,
Bitmap inIcon)
Window.show() to actually
show the window.
The screen will not be full screen (see setFullScreen(boolean)).
inTitle - the title of the screeninIcon - bitmap to display next to the title
public ScreenWindow(CharSequence inTitle,
Bitmap inIcon)
Window.show() to actually
show the window.
The screen will not be full screen (see setFullScreen(boolean)).
inTitle - the title of the screeninIcon - bitmap to display next to the title| Method Detail |
|---|
public void setFullScreen(boolean fullScreen)
setFullScreen in class WindowfullScreen - whether the screen should be full screen or notpublic void setTitle(String inTitle)
setTitle in class Windowpublic final void setTitle(CharSequence inTitle)
setTitle in class Window
public void setTitle(String inTitle,
Font inFont)
public final void setTitle(CharSequence inTitle,
Font inFont)
public void setSubTitle(String inSubTitle)
public void setSubTitle(CharSequence inSubTitle)
public void setSubTitle(String inSubTitle,
Font inSubTitleFont)
public void setSubTitle(CharSequence inSubTitle,
Font inSubTitleFont)
public void setIcon(Bitmap inIcon)
The icon should be a 16x16 icon or smaller. The small application icon is most commonly used.
public String getTitle()
getTitle in class Windowpublic final CharSequence getTitleSequence()
getTitle()
directly it will use that instead of what it thinks internally
the title should be.
getTitleSequence in class Windowprotected Font getTitleFont()
public String getSubTitle()
public final CharSequence getSubTitleSequence()
protected Font getSubTitleFont()
public Bitmap getIcon()
public Menu getActionMenu()
adjustActionMenuState(),
which you will sometimes need to override.
public boolean isActionMenuVisible()
isActionMenuVisible in class WindowadjustActionMenuState()
public boolean eventShortcut(char shortcut,
Event event)
Container.handleButtonShortcut(char, danger.app.Event) if
you also want to handle button shortcuts.
eventShortcut in class Containershortcut - the key that was pressedevent - the event associated with the key press
true if the shortcut was handled
protected final void onShortcut(char shortcut,
Event event)
onShortcut in class View
public boolean eventKeyUp(char c,
Event event)
super.eventKeyUp.
eventKeyUp in class Containerc - the character being released.
public boolean eventWidgetDown(int inWhichWidget,
Event event)
eventWidgetDown in class WindowinWhichWidget - the widget that went up
public boolean eventWidgetUp(int inWhichWidget,
Event event)
super.eventWidgetUp.
eventWidgetUp in class WindowinWhichWidget - the widget that went down
public void adjustActionMenuState()
adjustActionMenuState(Menu actionMenu)
instead.
public void adjustActionMenuState(Menu actionMenu)
This method is called before the action menu is displayed to the user, and also before menu item shortcuts are executed.
You will generally want to override this method in order to enable/disable, and hide/show menu items appropriately.
If you override this method, be sure to
call super.adjustActionMenuState just before
returning. Doing so will assure the menu gets redrawn
properly, and that BaseMenu.updateTextEditItems(danger.ui.Window) will
be called automatically on the action menu.
adjustActionMenuState in class WindowadjustActionMenuState()public void removeAllChildren()
removeAllChildren in class ContainerContainer.removeAllChildren()protected void aboutToShowMenu()
adjustActionMenuState().
protected void aboutToHideMenu()
protected void onScreenWindowActivate()
protected void onScreenWindowDeactivate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||