|
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--com.droplets.api.Component
|
+--com.droplets.api.DeprecatedMenu
MenuBar instead.
Represents a pull-down application menu displayed at the top of the window.
Menus are added directly to a window using Window.addComponent,
not to a panel. The menus will appear in the order in which you add them,
left to right.
Each menu has a name, which is the text that appears in the menu bar, and
a set of choices (or "items"), which are passed to the constructor as a String array. The String "-" represents a menu separator
(a horizontal bar drawn between items). Once the DeprecatedMenu object is constructed,
its items cannot be changed.
When the user selects a menu item, a
MenuSelectionEvent is
delivered to all objects that have registered using
addMenuSelectionListener. The event
object contains a reference to the DeprecatedMenu and a menuItem property
indicating which item was selected.
| Fields inherited from class com.droplets.api.Component |
ANCHOR_CENTER, ANCHOR_EAST, ANCHOR_NORTH, ANCHOR_NORTHEAST, ANCHOR_NORTHWEST, ANCHOR_SOUTH, ANCHOR_SOUTHEAST, ANCHOR_SOUTHWEST, ANCHOR_WEST, FILL_BOTH, FILL_HORIZONTAL, FILL_NONE, FILL_VERTICAL |
| Constructor Summary | |
DeprecatedMenu(java.lang.String name,
java.lang.String[] items,
Window window)
Deprecated. |
|
| Method Summary | |
protected void |
action(java.lang.String action,
java.lang.String args)
Deprecated. Called by the server when the user has performed an action on this component. |
void |
addMenuSelectionListener(MenuSelectionListener l)
Deprecated. Adds a listener to be notified when the user selects an item in this menu. |
protected void |
fireMenuSelectionEvent(java.lang.String menuItem)
Deprecated. Dispatches a MenuSelectionEvent to all listeners. |
java.lang.String |
getName()
Deprecated. Gets the name of this menu, which is the string that appears on the menu bar. |
void |
removeMenuSelectionListener(MenuSelectionListener l)
Deprecated. Removes a MenuSelectionListener. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DeprecatedMenu(java.lang.String name,
java.lang.String[] items,
Window window)
name - the name of the menu. This is the string that will appear
on the menu bar.items - a string array containing the items in the menu. Use "-"
to display a menu separator.window - the window in which the menu should appear. Note that
you still must add the menu using Window.addComponent.Constructs a new DeprecatedMenu component.| Method Detail |
protected void action(java.lang.String action,
java.lang.String args)
Componentaction in class Componentcom.droplets.api.Componentaction - Identifies the type of action that occurredargs - Action-specific arguments (extra information)public void addMenuSelectionListener(MenuSelectionListener l)
l - the listenerprotected void fireMenuSelectionEvent(java.lang.String menuItem)
MenuSelectionEvent to all listeners.menuItem - the item within the menu that was selectedpublic java.lang.String getName()
public void removeMenuSelectionListener(MenuSelectionListener l)
MenuSelectionListener.l - the listener to remove
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||