public class IlvMenu extends IlvMenuItem
IlvMenuItem
s,
an IlvMenu
can also contain IlvMenuSeparator
s.IlvMenuItem
,
IlvMenuSeparator
,
Serialized FormConstructor and Description |
---|
IlvMenu(String label)
Creates a menu.
|
IlvMenu(String label,
String image)
Creates a menu.
|
IlvMenu(String label,
String image,
boolean enabled)
Creates a menu.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(IlvMenuItem menuItem)
Adds a child menu item to this menu.
|
IlvMenuItem |
getChild(int index)
Returns the child at the specific index, if possible.
|
ArrayList<IlvMenuItem> |
getChildren()
Returns the menu items children list of this menu.
|
boolean |
removeChild(IlvMenuItem menuItem)
Removes a child menu item.
|
boolean |
removeChild(int index)
Removes a child menu item at the specified index if possible.
|
fireActionPerformed, getActionListener, getBaseTextDirection, getId, getImage, getLabel, getParent, isEnabled, setActionListener, setBaseTextDirection, setEnabled, setId, setImage, setLabel, setParent
public IlvMenu(String label, String image, boolean enabled)
label
- The menu label.image
- The optional image.enabled
- The enabled boolean.public IlvMenu(String label, String image)
label
- The menu label.image
- The optional image.public IlvMenu(String label)
label
- The menu label.public void addChild(IlvMenuItem menuItem)
menuItem
- The menu item to add.public boolean removeChild(IlvMenuItem menuItem)
menuItem
- The menu item to remove.true
if the menu item was successfully removed,
false
otherwise.public boolean removeChild(int index)
index
- The index of the menu item to remove.true
if the menu item was successfully removed,
false
otherwise.public ArrayList<IlvMenuItem> getChildren()
public IlvMenuItem getChild(int index)
index
- The index or the menu item to remove.null
otherwise.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.