danger.ui
Class Menu

java.lang.Object
  |
  +--danger.app.Listener
        |
        +--danger.ui.View
              |
              +--danger.ui.Container
                    |
                    +--danger.ui.Control
                          |
                          +--danger.ui.BaseMenu
                                |
                                +--danger.ui.Menu
Direct Known Subclasses:
PopupMenu

public class Menu
extends BaseMenu


Fields inherited from class danger.ui.BaseMenu
mTruncateOKToEllipsize
 
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
Menu(java.lang.String inTitle)
           
Menu(java.lang.String inTitle, boolean showTitle)
           
 
Method Summary
 void centerOnParentWindow(boolean flag)
           
 void centerOnScreen()
           
 void drawClosedMenu(Pen p)
           
 void enablePrefixHilite(boolean inEnablePrefixHilite)
           
 void enterMenu()
           
 boolean eventWidgetUp(int inWhichWidget, Event event)
          Handle the release of a device widget
 void exitMenu(boolean inKeepSelection)
           
 void forceCheckForTruncation()
           
 boolean isActionMenu()
           
 boolean matchAndDispatchShortcut(char shortcut)
           
protected  void onEnter()
           
protected  void onExit()
           
 void paint(Pen p)
          Draw the contents of this View.
 void selectItem(int i)
           
 void setActionMenu(boolean flag)
           
 void setExitEvent(Event prototype)
          A copy of the prototype event will be sent on menu exit, with a what field set to the selection or -1 if the menu was exited due to cancelation
 void setIgnoreBackButtonShortcut(boolean inIgnoreBackButtonShortcut)
           
 void setOpenWindowOffset(int hDelta, int vDelta)
           
protected  int systemItemCount()
           
 
Methods inherited from class danger.ui.BaseMenu
addDivider, addDivider, addDividerAndReturnMappedID, addDividerAtPosition, addFromResource, addFromResource, addFromResource, addItem, addItem, addItem, addItem, addItem, addItem, addItemAtPosition, addItemFromResource, addItemFromResource, addItems, addTextEditItems, checkItem, checkItemWithID, disableItem, disableItemWithID, enableItem, enableItemWithID, enterMenu, getAutoHideIfIdle, getCheckedIcon, getExplicitIDOfItem, getHierIcon, getIDOfItem, getItem, getItemFromID, getItemFromShortcut, getItemIndex, getItemText, getItemUserData, getMarkedIcon, getOwnerWindow, getSelectedItem, getSelectedItemID, getShowTitle, hasVisibleSubmenu, IndexOfItem, isDefaultSelectionFirstMenuItem, isItemChecked, isItemCheckedWithID, isItemDisabled, isItemDisabledWithID, isItemMarked, isItemMarkedWithID, isSubmenu, itemCount, markItem, markItemWithID, ownerWindowIsActive, receiveEvent, removeAllItems, removeItem, removeItem, removeItemWithID, sendSelectionChangedEvent, setAutoHideIfIdle, setCheckedIcon, setDefaultSelectionToFirstMenuItem, setItemText, setItemTextWithID, setItemUserData, setListenerForAllItems, setMarkedIcon, setMaxItemID, setSelectionChangedListener, setShowTitle, setSubmenu, setTitle, sortMenuItems, truncateEllipsizeMenuText, uncheckAll, uncheckItem, uncheckItemWithID, unmarkAll, unmarkItem, unmarkItemWithID, updateTextEditItems
 
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, eventKeyUp, 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, onStyleChanged, 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 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

Menu

public Menu(java.lang.String inTitle)

Menu

public Menu(java.lang.String inTitle,
            boolean showTitle)
Method Detail

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 BaseMenu

drawClosedMenu

public void drawClosedMenu(Pen p)

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

enterMenu

public final void enterMenu()
Overrides:
enterMenu in class BaseMenu

forceCheckForTruncation

public final void forceCheckForTruncation()

exitMenu

public final void exitMenu(boolean inKeepSelection)
Overrides:
exitMenu in class BaseMenu

onEnter

protected void onEnter()

onExit

protected void onExit()

systemItemCount

protected int systemItemCount()

selectItem

public void selectItem(int i)

enablePrefixHilite

public final void enablePrefixHilite(boolean inEnablePrefixHilite)

centerOnScreen

public final void centerOnScreen()

centerOnParentWindow

public final void centerOnParentWindow(boolean flag)

setActionMenu

public void setActionMenu(boolean flag)

isActionMenu

public boolean isActionMenu()

matchAndDispatchShortcut

public boolean matchAndDispatchShortcut(char shortcut)
Overrides:
matchAndDispatchShortcut in class BaseMenu

setIgnoreBackButtonShortcut

public final void setIgnoreBackButtonShortcut(boolean inIgnoreBackButtonShortcut)

setExitEvent

public void setExitEvent(Event prototype)
A copy of the prototype event will be sent on menu exit, with a what field set to the selection or -1 if the menu was exited due to cancelation

setOpenWindowOffset

public void setOpenWindowOffset(int hDelta,
                                int vDelta)


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