MenuComponent¶
-
public class
MenuComponent
implements Comparable¶ A MenuComponent represents a menu-type component having the following characteristics:
- A sequence number which indicates the menu position.
- A name or caption of the menu.
- A description of the menu.
- A link of the menu.
- A parent menu.
- A list of child menus.
- Visibility.
Author: Hugo Y. K. Lam
Methods¶
addChild¶
-
public void
addChild
(MenuComponent child)¶ Adds a child menu.
Parameters: - child – the child menu to be added.
compareTo¶
getDescription¶
getId¶
getLink¶
getName¶
getParent¶
-
public MenuComponent
getParent
()¶ Gets the parent menu component.
Returns: the parent menu component.
getSeqNo¶
-
public int
getSeqNo
()¶ Gets the sequence number of this menu component.
Returns: the sequence number of this menu component.
isVisible¶
-
public boolean
isVisible
()¶ Checks if this menu component is visible.
Returns: true if this menu component is visible.
setChildren¶
setDescription¶
setId¶
setLink¶
setName¶
setParent¶
-
public void
setParent
(MenuComponent parent)¶ Sets the parent menu component.
Parameters: - parent – the parent menu component.