IlvObject | +--IlvPanel | +--IlvMenuItem | +--IlvMenu
Each item in a menu must belong to the IlvMenuItem
class.
It can be an instance of IlvMenuItem
or a submenu
(an instance of IlvMenu
).
Constructor Attributes | Constructor Name and Description |
---|---|
IlvMenu(label, isEnabled, image, path)
|
Method Attributes | Method Name and Description |
---|---|
add(menuItem)
Adds the specified menu item to this menu.
|
|
collapse()
Collapses this menu and every child.
|
|
Compute and sets the size of the children using the getPreferredSize method.
|
|
getChild(index)
Returns the child at the specified index or
null. |
|
Returns a copy of the children array of this menu.
|
|
Returns the number of children of this menu.
|
|
Returns the height of the submenu made up of all the children of this menu.
|
|
Returns the width of the submenu made up of all the children of this menu.
|
|
Checks whether this menu is expanded (that is, if the submenu is visible).
|
|
Checks whether this menu is visible.
|
|
Invoked each time the user moves the mouse over this menu.
|
|
recycle()
Prepares this menu to be recycled.
|
|
setExpanded(isEnabled)
Specifies whether this menu is expanded (that is, if the submenu is visible).
|
|
setHighlighted(isHighlighted)
Specifies whether this menu is highlighted.
|
|
setHighlightedChild(child)
Highlights the given child, and lowlights any other.
|
|
setLocation(left, top)
Sets the location of this menu.
|
|
setVisible(isVisible)
Specifies whether this menu is visible.
|
createHTMLContent, getAction, getIcon, getIconPreferredSize, getLabel, getParent, getPreferredSize, getRoot, isEnabled, isHighlighted, isRoot, onmouseup, performServerAction, setAction, setEnabled, setIcon, setLabel, setPreferredSize, setSize, update |
dispose, getBounds, getClip, getCursor, getHeight, getLeft, getMouseEventSource, getScrollPosition, getTop, getWidth, getZIndex, setBackgroundColor, setBackgroundImage, setBounds, setClip, setCursor, setScrollPosition, setZIndex, translate |
getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility |
null.
true
if the menu is expanded; otherwise, it returns false
.true
if the menu item is visible; otherwise, it returns false
.true
, this menu is expanded.
true
, this menu is highlighted.
y
coordinate of the top-left corner of the menu.
x
coordinate of the top-left corner of the menu.