All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dtai.gwt.MenuGadget

java.lang.Object
   |
   +----dtai.gwt.Gadget
           |
           +----dtai.gwt.ContainerGadget
                   |
                   +----dtai.gwt.PanelGadget
                           |
                           +----dtai.gwt.BorderGadget
                                   |
                                   +----dtai.gwt.MenuItemGadget
                                           |
                                           +----dtai.gwt.MenuGadget

public class MenuGadget
extends MenuItemGadget
implements ComponentListener, KeyListener
A MenuGadget that is a component of a menu bar.


Constructor Index

 o MenuGadget()
Constructs a new MenuGadget with a blank label.
 o MenuGadget(String)
Constructs a new MenuGadget with the specified label.
 o MenuGadget(String, PopupMenuGadget)
Constructs a new MenuGadget with the specified label and the given popup menu.

Method Index

 o add(MenuItemGadget)
Adds the specified item to this menu.
 o add(SeparatorGadget)
SeparatorGadget Adds the specified item to this menu.
 o add(String)
Adds an item with with the specified label to this menu.
 o addSeparator()
Adds a separator line, or a hypen, to the menu at the current position.
 o componentHidden(ComponentEvent)
componentHidden
 o componentMoved(ComponentEvent)
componentMoved
 o componentResized(ComponentEvent)
componentResized
 o componentShown(ComponentEvent)
componentShown
 o getItem(int)
Returns the item located at the specified index of this menu.
 o getItemCount()
Returns the number of elements in this menu.
 o getPopup()
PopupMenuGadget
 o handleLeftRightKey(KeyEvent)
handleLeftRightKey
 o hideMenu()
hideMenu
 o isTearOff()
Returns true if this is a tear-off menu.
 o keyPressed(KeyEvent)
keyPressed
 o keyReleased(KeyEvent)
keyReleased
 o keyTyped(KeyEvent)
keyTyped
 o processFocusEvent(FocusEvent)
processFocusEvent
 o processKeyEvent(KeyEvent)
processKeyEvent
 o processMouseEvent(MouseEvent)
processMouseEvent
 o processMouseMotionEvent(MouseEvent)
processMouseMotionEvent
 o remove(int)
Deletes the item from this menu at the specified index.
 o showMenu()
showMenu

Constructors

 o MenuGadget
 public MenuGadget()
Constructs a new MenuGadget with a blank label.

Parameters:
label - the label to be added to this menu
 o MenuGadget
 public MenuGadget(String label)
Constructs a new MenuGadget with the specified label. This menu can not be torn off - the menu will still appear on screen after the the mouse button has been released.

Parameters:
label - the label to be added to this menu
 o MenuGadget
 public MenuGadget(String label,
                   PopupMenuGadget popup)
Constructs a new MenuGadget with the specified label and the given popup menu.

Parameters:
label - the label to be added to this menu
popup - the pre-existing popup menu

Methods

 o isTearOff
 public boolean isTearOff()
Returns true if this is a tear-off menu.

Returns:
tearOff
 o getItemCount
 public int getItemCount()
Returns the number of elements in this menu.

Returns:
the number of elements in this menu.
 o getItem
 public MenuItemGadget getItem(int index)
Returns the item located at the specified index of this menu.

Parameters:
index - the position of the item to be returned
Returns:
the item located at the specified index of this menu.
 o add
 public MenuItemGadget add(MenuItemGadget mi)
Adds the specified item to this menu.

Parameters:
mi - the item to be added
Returns:
MenuItemGadget
 o add
 public SeparatorGadget add(SeparatorGadget s)
SeparatorGadget Adds the specified item to this menu.

Parameters:
s - the item to be added
Returns:
SeparatorGadget
 o add
 public MenuItemGadget add(String label)
Adds an item with with the specified label to this menu.

Parameters:
label - the text on the item
Returns:
MenuItemGadget
 o addSeparator
 public SeparatorGadget addSeparator()
Adds a separator line, or a hypen, to the menu at the current position.

 o remove
 public void remove(int index)
Deletes the item from this menu at the specified index.

Parameters:
index - the position of the item to be removed
Overrides:
remove in class ContainerGadget
 o showMenu
 public void showMenu()
showMenu

 o hideMenu
 public void hideMenu()
hideMenu

 o processMouseEvent
 public void processMouseEvent(MouseEvent mouse)
processMouseEvent

Parameters:
mouse - the MouseEvent
Overrides:
processMouseEvent in class MenuItemGadget
 o processMouseMotionEvent
 public void processMouseMotionEvent(MouseEvent e)
processMouseMotionEvent

Parameters:
mouse - the MouseEvent
Overrides:
processMouseMotionEvent in class Gadget
 o processFocusEvent
 protected void processFocusEvent(FocusEvent e)
processFocusEvent

Parameters:
e - the firing FocusEvent
Overrides:
processFocusEvent in class MenuItemGadget
 o processKeyEvent
 protected void processKeyEvent(KeyEvent e)
processKeyEvent

Parameters:
e - the KeyEvent
Overrides:
processKeyEvent in class MenuItemGadget
 o getPopup
 public PopupMenuGadget getPopup()
PopupMenuGadget

Returns:
popup
 o componentResized
 public void componentResized(ComponentEvent e)
componentResized

Parameters:
e - firing ComponentEvent
 o componentMoved
 public void componentMoved(ComponentEvent e)
componentMoved

Parameters:
e - firing ComponentEvent
 o componentShown
 public void componentShown(ComponentEvent e)
componentShown

Parameters:
e - firing ComponentEvent
 o componentHidden
 public void componentHidden(ComponentEvent e)
componentHidden

Parameters:
e - firing ComponentEvent
 o keyTyped
 public void keyTyped(KeyEvent e)
keyTyped

Parameters:
e - firing KeyEvent
 o keyPressed
 public void keyPressed(KeyEvent e)
keyPressed

Parameters:
e - firing KeyEvent
 o handleLeftRightKey
 public void handleLeftRightKey(KeyEvent e)
handleLeftRightKey

Parameters:
e - firing KeyEvent
 o keyReleased
 public void keyReleased(KeyEvent e)
keyReleased

Parameters:
e - firing KeyEvent

All Packages  Class Hierarchy  This Package  Previous  Next  Index