Class
zebkit.ui.Menu
extends <zebkit.ui.CompList> |
<zebkit.ui> |
Menu UI component class. The class implements popup menu UI component.
var m = new Menu([
{
content: "Menu Item 1",
sub : [
{
content: "SubMenu Checked Item 1",
checked: true
},
{
content: "SubMenu Checked Item 2",
checked: false
},
"-", // line
{
content: "SubMenu Checked Item 3",
checked: false
}
]
},
"Menu Item 2",
"Menu Item 3"
]);
protected
|
void | $canceled (m) |
protected
|
<zebkit.ui.Menu> | $childMenu ( ) |
protected
|
void | $hideMenu ( ) |
protected
|
void | $showSubMenu (sub) |
protected
|
<zebkit.ui.Menu> | $topMenu ( ) |
public | void | addDecorative (c) |
public | void | childCompEnabled (e) |
public | <zebkit.ui.Menu> | getMenuAt (index) |
public | <zebkit.ui.Panel> | getMenuItem (i) |
public | <Boolean> | hasSelectableItems ( ) |
public | <Integer> | indexMenuOf (menu) |
public | <Boolean> | isDecorative (i) |
public | void | keyPressed (e) |
public | void | pointerExited (e) |
public | void | setMenuAt (i, m) |
protected
void
$canceled (m )
Called when the menu or a sub-menu has been canceled (key ESCAPE has been pressed). Parameters:
|
protected
<zebkit.ui.Menu>
$childMenu ( )
Get a sub menu that is shown at the given moment.
Returns:
<zebkit.ui.Menu>
a child sub menu. null if no child sub-menu has been shown |
protected
void
$hideMenu ( )
Hide the menu and all visible sub-menus |
protected
void
$showSubMenu (sub )
Show the given sub menu Parameters:
|
protected
<zebkit.ui.Menu>
$topMenu ( )
Get the top menu in the given shown popup menu hierarchy
Returns:
<zebkit.ui.Menu>
a top menu |
public
void
addDecorative (c )
Add the specified component as a decorative item of the menu Parameters:
|
public
void
childCompEnabled (e )
Define component events handler. Parameters:
|
public
<zebkit.ui.Menu>
getMenuAt (index )
Get a sub menu for the given menu item Parameters:
Returns:
<zebkit.ui.Menu>
a sub menu or null if no sub menu is defined for the given menu item |
public
<zebkit.ui.Panel>
getMenuItem (i )
Get a menu item by the given index Parameters:
Returns:
<zebkit.ui.Panel>
a menu item component |
public
<Integer>
indexMenuOf (menu )
Get the specified sub-menu index Parameters:
Returns:
<Integer>
a sub menu index. -1 if the menu is not a sub menu of the given menu |
public
<Boolean>
isDecorative (i )
Test if the given menu item is a decorative (not selectable) menu item. Menu item is considered as decorative if it has been added with addDecorative(...) method or has "$isDecorative" property set to "true" Parameters:
Returns:
<Boolean>
true if the given menu item is decorative |
public
void
keyPressed (e )
Override key pressed events handler to handle key events according to context menu component requirements Parameters:
|
public
void
pointerExited (e )
Define pointer exited events handler Parameters:
|
public
chainable
setMenuAt (i, m )
Set the given menu as a sub-menu for the specified menu item Parameters:
|
















