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.
-
MenuGadget()
- Constructs a new MenuGadget with a blank label.
-
MenuGadget(String)
- Constructs a new MenuGadget with the specified label.
-
MenuGadget(String, PopupMenuGadget)
- Constructs a new MenuGadget with the specified label and the given
popup menu.
-
add(MenuItemGadget)
- Adds the specified item to this menu.
-
add(SeparatorGadget)
- SeparatorGadget
Adds the specified item to this menu.
-
add(String)
- Adds an item with with the specified label to this menu.
-
addSeparator()
- Adds a separator line, or a hypen, to the menu at the current position.
-
componentHidden(ComponentEvent)
- componentHidden
-
componentMoved(ComponentEvent)
- componentMoved
-
componentResized(ComponentEvent)
- componentResized
-
componentShown(ComponentEvent)
- componentShown
-
getItem(int)
- Returns the item located at the specified index of this menu.
-
getItemCount()
- Returns the number of elements in this menu.
-
getPopup()
- PopupMenuGadget
-
handleLeftRightKey(KeyEvent)
- handleLeftRightKey
-
hideMenu()
- hideMenu
-
isTearOff()
- Returns true if this is a tear-off menu.
-
keyPressed(KeyEvent)
- keyPressed
-
keyReleased(KeyEvent)
- keyReleased
-
keyTyped(KeyEvent)
- keyTyped
-
processFocusEvent(FocusEvent)
- processFocusEvent
-
processKeyEvent(KeyEvent)
- processKeyEvent
-
processMouseEvent(MouseEvent)
- processMouseEvent
-
processMouseMotionEvent(MouseEvent)
- processMouseMotionEvent
-
remove(int)
- Deletes the item from this menu at the specified index.
-
showMenu()
- showMenu
MenuGadget
public MenuGadget()
- Constructs a new MenuGadget with a blank label.
- Parameters:
- label - the label to be added to this menu
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
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
isTearOff
public boolean isTearOff()
- Returns true if this is a tear-off menu.
- Returns:
- tearOff
getItemCount
public int getItemCount()
- Returns the number of elements in this menu.
- Returns:
- the number of elements in this menu.
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.
add
public MenuItemGadget add(MenuItemGadget mi)
- Adds the specified item to this menu.
- Parameters:
- mi - the item to be added
- Returns:
- MenuItemGadget
add
public SeparatorGadget add(SeparatorGadget s)
- SeparatorGadget
Adds the specified item to this menu.
- Parameters:
- s - the item to be added
- Returns:
- SeparatorGadget
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
addSeparator
public SeparatorGadget addSeparator()
- Adds a separator line, or a hypen, to the menu at the current position.
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
showMenu
public void showMenu()
- showMenu
hideMenu
public void hideMenu()
- hideMenu
processMouseEvent
public void processMouseEvent(MouseEvent mouse)
- processMouseEvent
- Parameters:
- mouse - the MouseEvent
- Overrides:
- processMouseEvent in class MenuItemGadget
processMouseMotionEvent
public void processMouseMotionEvent(MouseEvent e)
- processMouseMotionEvent
- Parameters:
- mouse - the MouseEvent
- Overrides:
- processMouseMotionEvent in class Gadget
processFocusEvent
protected void processFocusEvent(FocusEvent e)
- processFocusEvent
- Parameters:
- e - the firing FocusEvent
- Overrides:
- processFocusEvent in class MenuItemGadget
processKeyEvent
protected void processKeyEvent(KeyEvent e)
- processKeyEvent
- Parameters:
- e - the KeyEvent
- Overrides:
- processKeyEvent in class MenuItemGadget
getPopup
public PopupMenuGadget getPopup()
- PopupMenuGadget
- Returns:
- popup
componentResized
public void componentResized(ComponentEvent e)
- componentResized
- Parameters:
- e - firing ComponentEvent
componentMoved
public void componentMoved(ComponentEvent e)
- componentMoved
- Parameters:
- e - firing ComponentEvent
componentShown
public void componentShown(ComponentEvent e)
- componentShown
- Parameters:
- e - firing ComponentEvent
componentHidden
public void componentHidden(ComponentEvent e)
- componentHidden
- Parameters:
- e - firing ComponentEvent
keyTyped
public void keyTyped(KeyEvent e)
- keyTyped
- Parameters:
- e - firing KeyEvent
keyPressed
public void keyPressed(KeyEvent e)
- keyPressed
- Parameters:
- e - firing KeyEvent
handleLeftRightKey
public void handleLeftRightKey(KeyEvent e)
- handleLeftRightKey
- Parameters:
- e - firing KeyEvent
keyReleased
public void keyReleased(KeyEvent e)
- keyReleased
- Parameters:
- e - firing KeyEvent
All Packages Class Hierarchy This Package Previous Next Index