com.droplets.api
Class MenuComponent

java.lang.Object
  |
  +--com.droplets.api.MenuComponent
Direct Known Subclasses:
MenuBar, MenuItem

public class MenuComponent
extends java.lang.Object

This is the base class for MenuItems, Menus and anything that can be placed into a MenuContainer.


Method Summary
 void addActionListener(ActionListener l)
          Adds a listener to this menu item.
 MenuContainer getParent()
          Returns the container of this component.
 void removeActionListener(ActionListener l)
          Removes the specified action listener from this menu item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addActionListener

public void addActionListener(ActionListener l)
Adds a listener to this menu item. The ActionListener.actionPerformed(com.droplets.api.event.ActionEvent) method of the listener is called when the menu item is selected. It is passed an ActionEvent which contains the following information:
Parameters:
l - the listener to add.

getParent

public MenuContainer getParent()
Returns the container of this component.
Returns:
the container of this component.

removeActionListener

public void removeActionListener(ActionListener l)
Removes the specified action listener from this menu item. The listener is no longer called for menu events by this component.
Parameters:
l - com.droplets.api.event.ActionListener


Copyright © Droplets, 2001. All Rights Reserved.