ewe.ui
Class MenuEvent

java.lang.Object
  extended byewe.ui.Event
      extended byewe.ui.ControlEvent
          extended byewe.ui.MenuEvent
Direct Known Subclasses:
ListEvent

public class MenuEvent
extends ControlEvent


Field Summary
static int ABORTED
           
static int CLICKED
           
static int DESELECTED
           
 Menu menu
          This is the Menu that generated the event, which is not necessarily the "target" for the event.
static int NEXT_MENU_LEFT
           
static int NEXT_MENU_RIGHT
           
static int SELECTED
           
 Object selectedItem
          This is relevant only when the event type is SELECTED, DESELECTED or CLICKED.
static int SELECTION_CHANGED
           
 
Fields inherited from class ewe.ui.ControlEvent
action, CANCELLED, EXITED, exitKey, exitKeyModifiers, FOCUS_IN, FOCUS_OUT, MENU_SHOWN, oldOrNewFocus, OPERATION_CANCELLED, POPUP_CLOSED, PRESSED, TIMER
 
Fields inherited from class ewe.ui.Event
consumed, events, flags, target, timeStamp, type, window
 
Constructor Summary
MenuEvent(int type, Control target, Object item)
           
 
Methods inherited from class ewe.ui.Event
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode
 

Field Detail

SELECTED

public static final int SELECTED
See Also:
Constant Field Values

DESELECTED

public static final int DESELECTED
See Also:
Constant Field Values

CLICKED

public static final int CLICKED
See Also:
Constant Field Values

ABORTED

public static final int ABORTED
See Also:
Constant Field Values

SELECTION_CHANGED

public static final int SELECTION_CHANGED
See Also:
Constant Field Values

NEXT_MENU_RIGHT

public static final int NEXT_MENU_RIGHT
See Also:
Constant Field Values

NEXT_MENU_LEFT

public static final int NEXT_MENU_LEFT
See Also:
Constant Field Values

selectedItem

public Object selectedItem
This is relevant only when the event type is SELECTED, DESELECTED or CLICKED. It will be EITHER a MenuItem representing the relevant item, or a String representing the text of the relevant item.


menu

public Menu menu
This is the Menu that generated the event, which is not necessarily the "target" for the event. The target for the event may change as the event goes up a chain of sub-menus, or up into a MenuBar container. All these controls "take over" the event and make themselves the target. However the "menu" value will always stay the same.

Constructor Detail

MenuEvent

public MenuEvent(int type,
                 Control target,
                 Object item)