multivalent.gui
public class VMenuButton extends IParaBox implements EventListener
VMenus can either be supplied as children (as in HTML), or can be made dynamic
.
Dynamic menus are constructed afresh each time they are posted,
by instantiating an empty VMenu and passing around a semantic event with the message
createWidget/dynamic-name.
Common menus -- which may or may not actually exist in a given Browser -- are given in VMenu
.
Can be given both a menu (either as a child or dynamically) and a script. In this case, a quick click executes the script, and a mouse press pops up the menu.
Version: $Revision: 1.8 $ $Date: 2003/06/02 05:19:35 $
Constructor Summary | |
---|---|
VMenuButton(String name, Map<String,Object> attr, INode parent) | |
VMenuButton(String name, Map<String,Object> attr, INode parent, String script) |
Method Summary | |
---|---|
boolean | breakAfter() |
boolean | breakBefore() |
void | event(AWTEvent e) |
boolean | eventNode(AWTEvent e, Point rel)
Just post associated menu and get out of the way.
|
boolean | formatNode(int width, int height, Context cx) Takes witdh and height from max dimensions of associated VMenu's children. |
void | paintNode(Rectangle docclip, Context cx) Shows active child by drawing it directly. |
void | post()
Post associated menu on screen, under root. |
void | setDynamic(String name)
Menus can be dynamically generated.
|