multivalent.gui
public class VMenu extends IScrollPane implements EventListener
As children you can have any kind of node: VButton/VCheckButton/VRadioButton, IHBox for HTML OPTIONs, or VMenuButton for cascaded menus. In other words, there is no need for a separate group of MenuItem widgets. As mentioned on the package-wide description, since Multivalent widgets can have arbitrary content, having, say, a menu item with a image and text is easy.
If selected item has VScript in "script" attribute, it's executed upon selection.
Version: $Revision: 1.13 $ $Date: 2003/06/02 05:19:13 $
Field Summary | |
---|---|
static String | CATEGORY_MEDIUM Menu category ( medium ) for medium-specific options (where medium is PDF, HTML, LocalDirectory, ...). |
static int | Maxsize Maximum number of items to show at once (more uses scrolling). |
static String | MSG_CREATE_ANNO
Construct Anno menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_BOOKMARK
Construct Bookmark menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_EDIT
Construct Edit menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_FILE
Construct File menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_GO
Construct Go menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_HELP
Construct Help menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_LENS
Construct Lens menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_STYLE
Construct Style menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_VIEW
Construct View menu by passing around to behaviors and letting them add (or delete) entiries.
|
static String | VAR_MENUSTACK Key into Root's globals to get ordered List<> of menus currently posted. |
Constructor Summary | |
---|---|
VMenu(String name, Map<String,Object> attr, INode parent) |
Method Summary | |
---|---|
Node | addCategory(Node n, String category)
Immediate subtrees of menu are categories:
named VSeparator's used to cluster items from disparate behaviors.
|
void | event(AWTEvent e) Posted with grab, |
boolean | eventBeforeAfter(AWTEvent e, Point rel) Lets events pass through so disable behavior works. |
boolean | formatNode(int width, int height, Context cx) Like a IVBox, except is max of children (which are menitems). |
Node | getSelected() |
void | invoke() Execute active item's script, if any. |
void | paintNode(Rectangle docclip, Context cx) |
void | post(int x, int y, Browser br)
Show on screen by disconnecting from (old) parent and adding to root (which is in absolutely positioned space).
|
void | repaint(long ms, int x, int y, int w, int h) |
void | setSelected(Node n) Use invoke() to execute any associated script. |
void | unpost()
Unshow by removing from root and reconnecting to old parent (if any).
|
medium
) for medium-specific options (where medium is PDF, HTML, LocalDirectory, ...)."createWidget/Anno": out= VMenu instance-under-construction.
"createWidget/Bookmark": out= VMenu instance-under-construction.
"createWidget/Edit": out= VMenu instance-under-construction.
"createWidget/File": out= VMenu instance-under-construction.
"createWidget/Go": out= VMenu instance-under-construction.
"createWidget/Help": out= VMenu instance-under-construction.
"createWidget/Lens": out= VMenu instance-under-construction.
"createWidget/Style": out= VMenu instance-under-construction.
"createWidget/View": out= VMenu instance-under-construction.
See Also: ForwardBack Bookmark