<POPUP_MENU> : Popup Menu

Java class : leon.view.LyPopupMenu

ROLE

A popup menu is a menu which positioning and content depends on the context that made possible to display it.
This context depends, most of the time, of an element belonging to a high-level graphical object (tree node, element of a map, line of a list,...).
If need be, this context is used as context for the launched action.
The context-sensitive menus are available only with the Swing and SWT viewers.

ATTRIBUTES

<!ATTLIST POPUP_MENU
	  id NMTOKEN #IMPLIED
	  template NMTOKEN #IMPLIED
	  controller CDATA #IMPLIED
	  enabled ( true | false) "true"
	  style ( STANDARD | LIGHT) "STANDARD"
	  x NMTOKEN "0"
	  y NMTOKEN "0"
	  font CDATA #IMPLIED
	  color CDATA #IMPLIED
	  fontColor CDATA #IMPLIED>
Attribute Mand. Description Default
id no Identifier of the popup menu.  
template no POPUP_MENU.template  
controller no Reference of the controller that manages the popup menu (i.e. handles user demands and refresh content).  
enabled no Indicates whether the popup menu is enabled or not (true if it is enabled). true
style no Style of the popup menu.
The following styles are managed:
STANDARD: Standard mode
LIGHT: Light mode (items with no label and horizontally displayed)
STANDARD
x no Position in abscissa of the popup menu. 0
y no Position en ordinate of the popup menu. 0
font no POPUP_MENU.font  
color no POPUP_MENU.color  
fontColor no POPUP_MENU.fontColor  

ELEMENTS

<!ELEMENT POPUP_MENU 
	  (ITEM |
	   SEP |
	   MENU)*>
Element Mand. Mult. Description
ITEM yes no Entry of the menu
SEP yes no Separation bar.
MENU yes no Sub-menu

SAMPLE

<!-- Context-sensitive menu containing 3 menu entries and a separator -->
<POPUP_MENU label="File">
	<ITEM id="LY_ACTION_CONSULT" label="Consult"/>
	<ITEM id="LY_ACTION_MODIFY" label="Modify"/>
	<SEP/>
	<ITEM id="LY_ACTION_PRINT" label="Print"/>
</POPUP_MENU>